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
/
romp.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-02-06
|
63KB
|
1,618 lines
/* Definitions of target machine for GNU compiler, for ROMP chip.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@nyu.edu)
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. */
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-Dibm032 -Dunix"
/* Print subsidiary information on the compiler version in use. */
#define TARGET_VERSION ;
/* Add -lfp_p when running with -p or -pg. */
#define LIB_SPEC "%{pg:-lfp_p}%{p:-lfp_p} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
/* Run-time compilation parameters selecting different hardware subsets. */
/* Flag to generate all multiplies as an in-line sequence of multiply-step
insns instead of calling a library routine. */
#define TARGET_IN_LINE_MUL (target_flags & 1)
/* Flag to generate padded floating-point data blocks. Otherwise, we generate
them the minimum size. This trades off execution speed against size. */
#define TARGET_FULL_FP_BLOCKS (target_flags & 2)
/* Flag to pass and return floating point values in floating point registers.
Since this violates the linkage convention, we feel free to destroy fr2
and fr3 on function calls.
fr1-fr3 are used to pass the arguments. */
#define TARGET_FP_REGS (target_flags & 4)
/* Flag to return structures of more than one word in memory. This is for
compatibility with the MetaWare HighC (hc) compiler. */
#define TARGET_HC_STRUCT_RETURN (target_flags & 010)
extern int target_flags;
/* 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 \
{ {"in-line-mul", 1}, \
{"call-lib-mul", -1}, \
{"full-fp-blocks", 2}, \
{"minimum-fp-blocks", -2}, \
{"fp-arg-in-fpregs", 4}, \
{"fp-arg-in-gregs", -4}, \
{"hc-struct-return", 010}, \
{"nohc-struct-return", - 010}, \
{ "", TARGET_DEFAULT}}
#define TARGET_DEFAULT 3
/* Define this to change the optimizations performed by default.
This used to depend on the value of write_symbols,
but that is contrary to the general plan for GCC options. */
#define OPTIMIZATION_OPTIONS(LEVEL) \
{ \
if ((LEVEL) > 0) \
{ \
flag_force_addr = 1; \
flag_force_mem = 1; \
} \
}
/* Match <sys/types.h>'s definition. */
#define SIZE_TYPE "long int"
/* target machine storage layout */
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields. */
/* That is true on ROMP. */
#define BITS_BIG_ENDIAN 1
/* Define this if most significant byte of a word is the lowest numbered. */
/* That is true on ROMP. */
#define BYTES_BIG_ENDIAN 1
/* Define this if most significant word of a multiword number is lowest
numbered.
For ROMP we can decide arbitrarily since there are no machine instructions
for them. Might as well be consistent with bits and bytes. */
#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 32
/* Width of a word, in units (bytes). */
#define UNITS_PER_WORD 4
/* 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
/* No data type wants to be aligned rounder than this. */
#define BIGGEST_ALIGNMENT 32
/* 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
/* Make strings word-aligned so strcpy from constants will be faster. */
#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
(TREE_CODE (EXP) == STRING_CST \
&& (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
/* Make arrays of chars word-aligned for the same reasons. */
#define DATA_ALIGNMENT(TYPE, ALIGN) \
(TREE_CODE (TYPE) == ARRAY_TYPE \
&& TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
&& (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
/* Set this nonzero if move instructions will actually fail to work
when given unaligned data. */
#define STRICT_ALIGNMENT 1
/* 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.
ROMP has 16 fullword registers and 8 floating point registers.
In addition, the difference between the frame and argument pointers is
a function of the number of registers saved, so we need to have a register
to use for AP that will later be eliminated in favor of sp or fp. This is
a normal register, but it is fixed. */
#define FIRST_PSEUDO_REGISTER 25
/* 1 for registers that have pervasive standard uses
and are not available for the register allocator.
On ROMP, r1 is used for the stack and r14 is used for a
data area pointer.
HACK WARNING: On the RT, there is a bug in code generation for
the MC68881 when the first and third operands are the same floating-point
register. See the definition of the FINAL_PRESCAN_INSN macro for details.
Here we need to reserve fr0 for this purpose. */
#define FIXED_REGISTERS \
{0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
1, \
1, 0, 0, 0, 0, 0, 0, 0}
/* 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
1, \
1, 1, 0, 0, 0, 0, 0, 0}
/* List the order in which to allocate registers. Each register must be
listed once, even those in FIXED_REGISTERS.
We allocate in the following order:
fr0, fr1 (not saved)
fr2 ... fr6
fr7 (more expensive for some FPA's)
r0 (not saved and won't conflict with parameter register)
r4, r3, r2 (not saved, highest used first to make less conflict)
r5 (not saved, but forces r6 to be saved if DI/DFmode)
r15, r14, r13, r12, r11, r10, r9, r8, r7, r6 (less to save)
r1, ap */
#define REG_ALLOC_ORDER \
{17, 18, \
19, 20, 21, 22, 23, \
24, \
0, \
4, 3, 2, \
5, \
15, 14, 13, 12, 11, 10, \
9, 8, 7, 6, \
1, 16}
/* True if register is floating-point. */
#define FP_REGNO_P(N) ((N) >= 17)
/* Return number of consecutive hard regs needed starting at reg REGNO
to hold something of mode MODE.
Th