home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 7
/
FreshFishVol7.bin
/
bbs
/
gnu
/
gcc-2.3.3-src.lha
/
GNU
/
src
/
amiga
/
gcc-2.3.3
/
config
/
convex.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-02-06
|
42KB
|
1,194 lines
/* Definitions of target machine for GNU compiler. Convex version.
Copyright (C) 1992 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Standard GCC variables that we reference. */
extern int target_flags;
/* Interface to convex.c. */
extern int current_section_is_text;
extern int const_double_low_int ();
extern int const_double_high_int ();
extern char *set_cmp (), *gen_cmp ();
extern char *output_call ();
/* Use the proper incantation to search Posix-compliant libraries. */
#define LINK_SPEC \
"%{!traditional:-Eposix}%{traditional:-Enoposix}\
-A__iob=___ap$iob\
-A_use_libc_sema=___ap$use_libc_sema\
-L /usr/lib"
/* Use the matching startup files. */
#define STARTFILE_SPEC \
"%{pg:/usr/lib/crt/gcrt0.o}\
%{!pg:%{p:/usr/lib/crt/mcrt0.o}\
%{!p:/usr/lib/crt/crt0.o}}"
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-Dconvex -Dunix"
/* Print subsidiary information on the compiler version in use. */
#define TARGET_VERSION fprintf (stderr, " (convex)");
/* Macros used in the machine description to test the flags. */
/*
-mc1 C1 target (avoid C2-only instructions)
-mc2 C2 target
-mc32 vitesse
-mc34 javelin
-mc38 neptune
-margcount use standard calling sequence, with arg count word
-mnoargcount don't push arg count, depend on symbol table
*/
#define TARGET_C1 (target_flags & 1)
#define TARGET_C2 (target_flags & 2)
#define TARGET_C34 (target_flags & 4)
#define TARGET_C38 (target_flags & 010)
#define TARGET_INDIRECTS (1)
#define TARGET_ARGCOUNT (target_flags & 040)
/* Macro to define tables used to set the flags.
This is a list in braces of pairs in braces,
each pair being { "NAME", VALUE }
where VALUE is the bits to set or minus the bits to clear.
An empty string NAME is used to identify the default VALUE. */
#define TARGET_SWITCHES \
{ { "c1", 021 }, \
{ "c2", 022 }, \
{ "c32", 022 }, \
{ "c34", 006 }, \
{ "c38", 012 }, \
{ "noc1", -001 }, \
{ "noc2", -002 }, \
{ "argcount", 040 }, \
{ "noargcount", -040 }, \
{ "", TARGET_DEFAULT }}
/* Default target_flags if no switches specified. */
#ifndef TARGET_DEFAULT
#define TARGET_DEFAULT 0
#endif
/* Allow $ in identifiers. */
#define DOLLARS_IN_IDENTIFIERS 2
/* Target machine storage layout */
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields. */
#define BITS_BIG_ENDIAN 1
/* Define this if most significant byte of a word is the lowest numbered. */
#define BYTES_BIG_ENDIAN 1
/* Define this if most significant word of a multiword number is numbered. */
#define WORDS_BIG_ENDIAN 1
/* Number of bits in an addressable storage unit */
#define BITS_PER_UNIT 8
/* Width in bits of a "word", which is the contents of a machine register.
Note that this is not necessarily the width of data type `int';
if using 16-bit ints on a 68000, this would still be 32.
But on a machine with 16-bit registers, this would be 16. */
#define BITS_PER_WORD 64
/* Width of a word, in units (bytes). */
#define UNITS_PER_WORD 8
/* Width in bits of a pointer.
See also the macro `Pmode' defined below. */
#define POINTER_SIZE 32
/* Allocation boundary (in *bits*) for storing arguments in argument list. */
#define PARM_BOUNDARY 32
/* Boundary (in *bits*) on which stack pointer should be aligned. */
#define STACK_BOUNDARY 32
/* Allocation boundary (in *bits*) for the code of a function. */
#define FUNCTION_BOUNDARY 16
/* Alignment of field after `int : 0' in a structure. */
#define EMPTY_FIELD_BOUNDARY 32
/* Every structure's size must be a multiple of this. */
#define STRUCTURE_SIZE_BOUNDARY 8
/* A bitfield declared as `int' forces `int' alignment for the struct. */
#define PCC_BITFIELD_TYPE_MATTERS 1
/* No data type wants to be aligned rounder than this. */
/* beware of doubles in structs -- 64 is incompatible with pcc */
#define BIGGEST_ALIGNMENT 32
/* Set this nonzero if move instructions will actually fail to work
when given unaligned data. */
#define STRICT_ALIGNMENT 0
/* Define sizes of basic C types to conform to ordinary usage -- these
types depend on BITS_PER_WORD otherwise. */
#define CHAR_TYPE_SIZE 8
#define SHORT_TYPE_SIZE 16
#define INT_TYPE_SIZE 32
#define LONG_TYPE_SIZE 32
#define LONG_LONG_TYPE_SIZE 64
#define FLOAT_TYPE_SIZE 32
#define DOUBLE_TYPE_SIZE 64
#define LONG_DOUBLE_TYPE_SIZE 64
/* Declare the standard types used by builtins to match convex stddef.h --
with int rather than long. */
#define SIZE_TYPE "unsigned int"
#define PTRDIFF_TYPE "int"
/* Standard register usage. */
/* Number of actual hardware registers.
The hardware registers are assigned numbers for the compiler
from 0 to just below FIRST_PSEUDO_REGISTER.
All registers that the compiler knows about must be given numbers,
even those that are not normally considered general registers. */
#define FIRST_PSEUDO_REGISTER 16
/* 1 for registers that have pervasive standard uses
and are not available for the register allocator.
For Convex, these are AP, FP, and SP. */
#define FIXED_REGISTERS {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1}
/* 1 for registers not available across function calls.
These must include the FIXED_REGISTERS and also any
registers that can be used without being saved.
The latter must include the registers where values are returned
and the register where structure-value addresses are passed.
Aside from that, you can include as many other registers as you like. */
#define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
/* Return number of consecutive hard regs needed starting at reg REGNO
to hold something of mode MODE.
This is ordinarily the length in words of a value of mode MODE
but can be less for certain modes in special long registers. */
#define HARD_REGNO_NREGS(REGNO, MODE) \
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
On Convex, S registers can hold any type, A registers any nonfloat. */
#define HARD_REGNO_MODE_OK(REGNO, MODE) \
((REGNO) < 8 || (GET_MODE_CLASS (MODE) != MODE_FLOAT && \
GET_MODE_CLASS (MODE) != MODE_COMPLEX_FLOAT && \
(MODE) != DImode))
/* Value is 1 if it is a good idea to tie two pseudo registers
when one has mode MODE1 and one has mode MODE2.
If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
for any hard reg, then this must be 0 for correct output. */
#define MODES_TIEABLE_P(MODE1, MODE2) \
((GET_MODE_CLASS (MODE1) == MODE_FLOAT \
|| GET_MODE_CLASS (MODE1) == MODE_COMPLEX_FLOAT \
|| (MODE1) == DImode) \
== (GET_MODE_CLASS (MODE2) == MODE_FLOAT \
|| GET_MODE_CLASS (MODE2) == MODE_COMPLEX_FLOAT \
|| (MODE2) == DImode))
/* Specify the registers used for certain standard purposes.
The values of these macros are register numbers. */
/* Register to use for pushing function arguments. */
#define STACK_POINTER_REGNUM 8
/* Base register for access to local variables of the function. */
#define FRAME_POINTER_REGNUM 15
/* Value should be nonzero if functions must have frame pointers.
Zero means the frame pointer need not be set up (and parms
may be accessed via the stack pointer) in functions that seem suitable.
This is computed in `reload', in reload1.c. */
#define FRAME_POINTER_REQUIRED 1
/* Base register for access to arguments of the f