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 / we32k.h < prev    next >
C/C++ Source or Header  |  1994-02-06  |  36KB  |  1,040 lines

  1. /* Definitions of target machine for GNU compiler.  AT&T we32000 version.
  2.    Contributed by John Wehle (john@feith1.uucp)
  3.    Copyright (C) 1991-1992 Free Software Foundation, Inc.
  4.  
  5. This file is part of GNU CC.
  6.  
  7. GNU CC is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 1, or (at your option)
  10. any later version.
  11.  
  12. GNU CC is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with GNU CC; see the file COPYING.  If not, write to
  19. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21.  
  22. /* Names to predefine in the preprocessor for this target machine.  */
  23.  
  24. #define CPP_PREDEFINES "-Dwe32000 -Du3b -Dunix"
  25.  
  26. /* Print subsidiary information on the compiler version in use.  */
  27.  
  28. #define TARGET_VERSION fprintf (stderr, " (we32000)");
  29.  
  30. /* Run-time compilation parameters selecting different hardware subsets.  */
  31.  
  32. extern int target_flags;
  33.  
  34. /* Macros used in the machine description to test the flags.  */
  35.  
  36. /* Macro to define tables used to set the flags.
  37.    This is a list in braces of pairs in braces,
  38.    each pair being { "NAME", VALUE }
  39.    where VALUE is the bits to set or minus the bits to clear.
  40.    An empty string NAME is used to identify the default VALUE.  */
  41.  
  42. #define TARGET_SWITCHES  \
  43.   { { "", TARGET_DEFAULT}}
  44.  
  45. #define TARGET_DEFAULT 0
  46.  
  47.  
  48. /* target machine storage layout */
  49.  
  50. /* Define this if most significant bit is lowest numbered
  51.    in instructions that operate on numbered bit-fields. */
  52. #define BITS_BIG_ENDIAN 0
  53.  
  54. /* Define this if most significant byte of a word is the lowest numbered.  */
  55. /* That is true on the we32000.  */
  56. #define BYTES_BIG_ENDIAN 1
  57.  
  58. /* Define this if most significant word of a multiword is lowest numbered.  */
  59. /* For we32000 we can decide arbitrarily
  60.    since there are no machine instructions for them.  */
  61. #define WORDS_BIG_ENDIAN 1
  62.  
  63. /* number of bits in an addressable storage unit */
  64. #define BITS_PER_UNIT 8
  65.  
  66. /* Width in bits of a "word", which is the contents of a machine register.
  67.    Note that this is not necessarily the width of data type `int';
  68.    if using 16-bit ints on a we32000, this would still be 32.
  69.    But on a machine with 16-bit registers, this would be 16.  */
  70. #define BITS_PER_WORD 32
  71.  
  72. /* Width of a word, in units (bytes).  */
  73. #define UNITS_PER_WORD 4
  74.  
  75. /* Width in bits of a pointer.
  76.    See also the macro `Pmode' defined below.  */
  77. #define POINTER_SIZE 32
  78.  
  79. /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
  80. #define PARM_BOUNDARY 32
  81.  
  82. /* Boundary (in *bits*) on which stack pointer should be aligned.  */
  83. #define STACK_BOUNDARY 32
  84.  
  85. /* Allocation boundary (in *bits*) for the code of a function.  */
  86. #define FUNCTION_BOUNDARY 32
  87.  
  88. /* Alignment of field after `int : 0' in a structure.  */
  89. #define EMPTY_FIELD_BOUNDARY 32
  90.  
  91. /* No data type wants to be aligned rounder than this.  */
  92. #define BIGGEST_ALIGNMENT 32
  93.  
  94. /* Every structure's size must be a multiple of this.  */
  95. #define STRUCTURE_SIZE_BOUNDARY 32
  96.  
  97. /* Define this if move instructions will actually fail to work
  98.    when given unaligned data.  */
  99. #define STRICT_ALIGNMENT 1
  100.  
  101. /* Define number of bits in most basic integer type.
  102.    (If undefined, default is BITS_PER_WORD).  */
  103. #define INT_TYPE_SIZE 32
  104.  
  105. /* Integer bit fields should have the same size and alignment
  106.    as actual integers */
  107. #define PCC_BITFIELD_TYPE_MATTERS 1
  108.  
  109. /* Specify the size_t type.  */
  110. #define SIZE_TYPE "unsigned int"
  111.  
  112. /* Standard register usage.  */
  113.  
  114. /* Number of actual hardware registers.
  115.    The hardware registers are assigned numbers for the compiler
  116.    from 0 to just below FIRST_PSEUDO_REGISTER.
  117.    All registers that the compiler knows about must be given numbers,
  118.    even those that are not normally considered general registers. */
  119. #define FIRST_PSEUDO_REGISTER 16
  120.  
  121. /* 1 for registers that have pervasive standard uses
  122.    and are not available for the register allocator. */
  123. #define FIXED_REGISTERS  \
  124.  {0, 0, 0, 0, 0, 0, 0, 0, \
  125.   0, 1, 1, 1, 1, 1, 1, 1, }
  126.  
  127. /* 1 for registers not available across function calls.
  128.    These must include the FIXED_REGISTERS and also any
  129.    registers that can be used without being saved.
  130.    The latter must include the registers where values are returned
  131.    and the register where structure-value addresses are passed.
  132.    Aside from that, you can include as many other registers as you like.  */
  133. #define CALL_USED_REGISTERS \
  134.  {1, 1, 1, 0, 0, 0, 0, 0, \
  135.   0, 1, 1, 1, 1, 1, 1, 1, }
  136.  
  137. /* Make sure everything's fine if we *don't* have a given processor.
  138.    This assumes that putting a register in fixed_regs will keep the
  139.    compilers mitt's completely off it.  We don't bother to zero it out
  140.    of register classes.  */
  141. /* #define CONDITIONAL_REGISTER_USAGE */
  142.  
  143. /* Return number of consecutive hard regs needed starting at reg REGNO
  144.    to hold something of mode MODE.
  145.    This is ordinarily the length in words of a value of mode MODE
  146.    but can be less for certain modes in special long registers. */
  147. #define HARD_REGNO_NREGS(REGNO, MODE)   \
  148.   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
  149.  
  150. /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
  151. #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
  152.  
  153. /* Value is 1 if it is a good idea to tie two pseudo registers
  154.    when one has mode MODE1 and one has mode MODE2.
  155.    If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
  156.    for any hard reg, then this must be 0 for correct output.  */
  157. #define MODES_TIEABLE_P(MODE1, MODE2) 0
  158.  
  159. /* Specify the registers used for certain standard purposes.
  160.    The values of these macros are register numbers.  */
  161.  
  162. /* Register used for the program counter */
  163. #define PC_REGNUM  15
  164.  
  165. /* Register to use for pushing function arguments.  */
  166. #define STACK_POINTER_REGNUM 12
  167.  
  168. /* Base register for access to local variables of the function.  */
  169. #define FRAME_POINTER_REGNUM 9
  170.  
  171. /* Value should be nonzero if functions must have frame pointers.
  172.    Zero means the frame pointer need not be set up (and parms
  173.    may be accessed via the stack pointer) in functions that seem suitable.
  174.    This is computed in `reload', in reload1.c.  */
  175. #define FRAME_POINTER_REQUIRED 1
  176.  
  177. /* Base register for access to arguments of the function.  */
  178. #define ARG_POINTER_REGNUM 10
  179.  
  180. /* Register in which static-chain is passed to a function.  */
  181. #define STATIC_CHAIN_REGNUM 8
  182.  
  183. /* Register in which address to store a structure value
  184.    is passed to a function.  */
  185. #define STRUCT_VALUE_REGNUM 2
  186.  
  187. /* Order in which to allocate registers. */
  188. #define REG_ALLOC_ORDER  \
  189.  {0, 1, 8, 7, 6, 5, 4, 3}
  190.  
  191. /* Define the classes of registers for register constraints in the
  192.    machine description.  Also define ranges of constants.
  193.  
  194.    One of the classes must always be named ALL_REGS and include all hard regs.
  195.    If there is more than one class, another class must be named NO_REGS
  196.    and contain no registers.
  197.  
  198.    The name GENERAL_REGS must be the name of a class (or an alias for
  199.    another name such as ALL_REGS).  This is the class of registers
  200.    that is allowed by "g" or "r" in a register constraint.
  201.    Also, registers outside this class are allocated only when
  202.    instructions express preferences for them.
  203.  
  204.    The classes must be numbered in nondecreasing order; that is,
  205.    a larger-numbered class must never be contained completely
  206.    in a smaller-numbered class.
  207.  
  208.    For any two classes, it is very desirable that there be another
  209.    class that represents their union.  */
  210.  
  211. enum reg_class { NO_REGS, GENERAL_REGS,
  212.   ALL_REGS, LIM_REG_CLASSES };
  213.  
  214. #define N_REG_CLASSES (int) LIM_REG_CLASSES
  215.  
  216. /* Give names of register classes as strings for dump file.   */
  217.  
  218. #define REG_CLASS_NAMES \
  219.  { "NO_REGS", "GENERAL_REGS", "ALL_REGS" }
  220.  
  221. /* Define which registers fit in which classes.
  222.    This is an initializer for a vector of HARD_REG_SET
  223.    of length N_REG_CLASSES.  */
  224.  
  225. #define REG_CLASS_CONTENTS \
  226. {                            \
  227.  0,            /* NO_REGS */        \
  228.  0x000017ff,        /* GENERAL_REG