README.C4X: New file with information about the c4x ports.

* README.C4X: New file with information about the c4x ports.
        * ginclude/va-c4x.h: New file for c4x varargs support.
        * config/c4x: New directory with c4x port files.

From-SVN: r22475
This commit is contained in:
Michael Hayes 1998-09-19 00:03:07 +00:00 committed by Jeff Law
parent 289c9aa3c7
commit cb0ca2844b
8 changed files with 15141 additions and 0 deletions

View File

@ -1,3 +1,9 @@
Sat Sep 19 01:00:32 1998 Michael Hayes (mph@elec.canterbury.ac.nz)
* README.C4X: New file with information about the c4x ports.
* ginclude/va-c4x.h: New file for c4x varargs support.
* config/c4x: New directory with c4x port files.
Fri Sep 18 22:52:05 1998 Jeffrey A Law (law@cygnus.com)
* reload.c (find_reloads): Do not replace a pseudo with

48
gcc/README.C4X Normal file
View File

@ -0,0 +1,48 @@
This file describes the implementation notes of the GNU C Compiler for
the Texas Instruments Floating Point Digital Signal Processor
families, TMS320C3x and TMS320C4x (including the C30, C31, C32, C40,
and C44 chips).
Currently, only two code variants are generated---those for the C3x
and C4x architectures. Note that the new operand combinations for
parallel instructions, included in newer silicon revisions, are not
yet supported. These should be trivial to add for someone with the
newer chips and the inclination.
While the generated assembly code is fairly similar to that recognised
by the TI assembler, there are a few differences (currently the machine
option -mti, designed to enfore compatibility, is not fully
implemented). The major difference is the use of the ^ operator to
load the 16 MSBs of an address or constant for the C4x.
The generated assembly code requires the GNU assembler (GAS). This is
not currently included as part of the binutils package, due to the
many hacks required to be compatible with TI's kludged COFF
implementation, and the binutils not being designed for 32-bit bytes.
Patches against binutils-2.7.2 can be obtained from
ftp://ongaonga.chch.cri.nz/pub/c4x. This site also has patches for
the GNU debugger (GDB), incoporating a cycle accurate simulator that
can display profiles and histories of code execution, detailing
pipeline conflicts etc.
GCC can be configured as a cross compiler for both the C3x and C4x
architectures on the same system. Use `configure --target=c4x' to
configure GCC for both the C3x and C4x. Then use the -m30 option to
generate code for the C30 or -m40 (the default) for the C40.
Further installation notes and other optimization patches for GCC can
also be obtained from ftp://ongaonga.chch.cri.nz/pub/c4x.
A Majordomo mailing list, gcc_c40@atlantek.com.au, exists to discuss
related issues and suggestions for further optimizations. To
subscribe send a message with `subscribe gcc_c40' in the body to
majordomo@atlantek.com.au.
Michael Hayes, 16 Sep 98

5597
gcc/config/c4x/c4x.c Normal file

File diff suppressed because it is too large Load Diff

2608
gcc/config/c4x/c4x.h Normal file

File diff suppressed because it is too large Load Diff

6798
gcc/config/c4x/c4x.md Normal file

File diff suppressed because it is too large Load Diff

29
gcc/config/c4x/t-c4x Normal file
View File

@ -0,0 +1,29 @@
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = c4x/libgcc.S
LIB1ASMFUNCS = _divqf3 _divqi3 _udivqi3 _umodqi3 _modqi3 _mulqi3 \
_mulhf3 _divhf3 _unsfltconst _unsfltcompare \
_mulhi3 _umulhi3_high _smulhi3_high _divhi3 _modhi3 _umodhi3 _udivhi3 \
_fix_truncqfhi2 _ufix_truncqfhi2 _floathiqf2 _ufloathiqf2 \
_floathihf2 _ufloathihf2 _fix_trunchfhi2 _ufix_trunchfhi2 _ffs
# We do not have DF or DI types (or SF and SI for that matter),
# so fake out the libgcc2 compilation.
LIBGCC2_CFLAGS = -O2 -Dexit=unused_exit $(GCC_CFLAGS) $(LIBGCC2_INCLUDES) -DDF=HF -DDI=HI -DSF=QF -DSI=QI
MULTILIB_OPTIONS = m30 msmall mmemparm
MULTILIB_DIRNAMES = c3x small mem
MULTILIB_MATCHES = m30=mcpu?30 m30=mcpu?31 m30=mcpu?32 m30=m31 m30=m32
MULTILIB_EXCEPTIONS =
MULTILIB_EXTRA_OPTS =
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
# Don't make libgcc1-test since require crt0.o
LIBGCC1_TEST =
# Don't make objective C because we can't compile the libraries.
LANGUAGES = c proto c++
# C[34]x has its own float and limits.h
TARGET_FLOAT_H=config/c4x/c4x-float.h
TARGET_LIMITS_H=config/c4x/c4x-limits.h

21
gcc/config/c4x/xm-c4x.h Normal file
View File

@ -0,0 +1,21 @@
/* #defines that need visibility everywhere. */
#define FALSE 0
#define TRUE 1
/* This describes the machine the compiler is hosted on. */
#define HOST_BITS_PER_CHAR 32
#define HOST_BITS_PER_SHORT 32
#define HOST_BITS_PER_INT 32
#define HOST_BITS_PER_LONG 32
#define HOST_BITS_PER_LONGLONG 64
#define HOST_WORDS_BIG_ENDIAN
/* target machine dependencies.
tm.h is a symbolic link to the actual target specific file. */
#include "tm.h"
/* Arguments to use with `exit'. */
#define SUCCESS_EXIT_CODE 0
#define FATAL_EXIT_CODE 33

34
gcc/ginclude/va-c4x.h Normal file
View File

@ -0,0 +1,34 @@
/* GNU C varargs support for the TMS320C[34]x */
/* C[34]x arguments grow in weird ways (downwards) that the standard
varargs stuff can't handle. */
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef void *__gnuc_va_list;
#endif /* not __GNUC_VA_LIST */
/* If this is for internal libc use, don't define anything but
__gnuc_va_list. */
#if defined (_STDARG_H) || defined (_VARARGS_H)
#ifdef _STDARG_H /* stdarg.h support */
#define va_start(AP,LASTARG) AP=(__gnuc_va_list) __builtin_next_arg (LASTARG)
#else /* varargs.h support */
#define __va_ellipsis ...
#define va_alist __builtin_va_alist
#define va_dcl int __builtin_va_alist; __va_ellipsis
#define va_start(AP) AP=(__gnuc_va_list) ((int *)&__builtin_va_alist + 1)
#endif /* _STDARG_H */
#define va_end(AP) ((void) 0)
#define va_arg(AP,TYPE) (AP = (__gnuc_va_list) ((char *) (AP) - sizeof(TYPE)), \
*((TYPE *) ((char *) (AP))))
#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */