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

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