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 >
C/C++ Source or Header  |  1994-02-06  |  42KB  |  1,194 lines

  1. /* Definitions of target machine for GNU compiler.  Convex version.
  2.    Copyright (C) 1992 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. /* Standard GCC variables that we reference. */
  22.  
  23. extern int target_flags;
  24.  
  25. /* Interface to convex.c. */
  26.  
  27. extern int current_section_is_text;
  28. extern int const_double_low_int ();
  29. extern int const_double_high_int ();
  30. extern char *set_cmp (), *gen_cmp ();
  31. extern char *output_call ();
  32.  
  33. /* Use the proper incantation to search Posix-compliant libraries. */
  34.  
  35. #define LINK_SPEC \
  36. "%{!traditional:-Eposix}%{traditional:-Enoposix}\
  37.  -A__iob=___ap$iob\
  38.  -A_use_libc_sema=___ap$use_libc_sema\
  39.  -L /usr/lib"
  40.  
  41. /* Use the matching startup files. */
  42.  
  43. #define STARTFILE_SPEC \
  44. "%{pg:/usr/lib/crt/gcrt0.o}\
  45. %{!pg:%{p:/usr/lib/crt/mcrt0.o}\
  46. %{!p:/usr/lib/crt/crt0.o}}"
  47.  
  48. /* Names to predefine in the preprocessor for this target machine.  */
  49.  
  50. #define CPP_PREDEFINES "-Dconvex -Dunix"
  51.  
  52. /* Print subsidiary information on the compiler version in use.  */
  53.  
  54. #define TARGET_VERSION fprintf (stderr, " (convex)");
  55.  
  56. /* Macros used in the machine description to test the flags.  */
  57.  
  58. /* 
  59.    -mc1        C1 target (avoid C2-only instructions)
  60.    -mc2        C2 target
  61.    -mc32    vitesse
  62.    -mc34    javelin
  63.    -mc38    neptune
  64.    -margcount    use standard calling sequence, with arg count word
  65.    -mnoargcount don't push arg count, depend on symbol table
  66. */
  67.  
  68. #define TARGET_C1 (target_flags & 1)
  69. #define TARGET_C2 (target_flags & 2)
  70. #define TARGET_C34 (target_flags & 4)
  71. #define TARGET_C38 (target_flags & 010)
  72. #define TARGET_INDIRECTS (1)
  73. #define TARGET_ARGCOUNT (target_flags & 040)
  74.  
  75. /* Macro to define tables used to set the flags.
  76.    This is a list in braces of pairs in braces,
  77.    each pair being { "NAME", VALUE }
  78.    where VALUE is the bits to set or minus the bits to clear.
  79.    An empty string NAME is used to identify the default VALUE.  */
  80.  
  81. #define TARGET_SWITCHES \
  82.   { { "c1", 021 },     \
  83.     { "c2", 022 },    \
  84.     { "c32", 022 },    \
  85.     { "c34", 006 },    \
  86.     { "c38", 012 },    \
  87.     { "noc1", -001 },     \
  88.     { "noc2", -002 },    \
  89.     { "argcount", 040 },  \
  90.     { "noargcount", -040 }, \
  91.     { "", TARGET_DEFAULT }}
  92.  
  93. /* Default target_flags if no switches specified.  */
  94.  
  95. #ifndef TARGET_DEFAULT
  96. #define TARGET_DEFAULT 0
  97. #endif
  98.  
  99. /* Allow $ in identifiers. */
  100.  
  101. #define DOLLARS_IN_IDENTIFIERS 2
  102.  
  103. /* Target machine storage layout */
  104.  
  105. /* Define this if most significant bit is lowest numbered
  106.    in instructions that operate on numbered bit-fields. */
  107. #define BITS_BIG_ENDIAN 1
  108.  
  109. /* Define this if most significant byte of a word is the lowest numbered.  */
  110. #define BYTES_BIG_ENDIAN 1
  111.  
  112. /* Define this if most significant word of a multiword number is numbered.  */
  113. #define WORDS_BIG_ENDIAN 1
  114.  
  115. /* Number of bits in an addressable storage unit */
  116. #define BITS_PER_UNIT 8
  117.  
  118. /* Width in bits of a "word", which is the contents of a machine register.
  119.    Note that this is not necessarily the width of data type `int';
  120.    if using 16-bit ints on a 68000, this would still be 32.
  121.    But on a machine with 16-bit registers, this would be 16.  */
  122. #define BITS_PER_WORD 64
  123.  
  124. /* Width of a word, in units (bytes).  */
  125. #define UNITS_PER_WORD 8
  126.  
  127. /* Width in bits of a pointer.
  128.    See also the macro `Pmode' defined below.  */
  129. #define POINTER_SIZE 32
  130.  
  131. /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
  132. #define PARM_BOUNDARY 32
  133.  
  134. /* Boundary (in *bits*) on which stack pointer should be aligned.  */
  135. #define STACK_BOUNDARY 32
  136.  
  137. /* Allocation boundary (in *bits*) for the code of a function.  */
  138. #define FUNCTION_BOUNDARY 16
  139.  
  140. /* Alignment of field after `int : 0' in a structure.  */
  141. #define EMPTY_FIELD_BOUNDARY 32
  142.  
  143. /* Every structure's size must be a multiple of this.  */
  144. #define STRUCTURE_SIZE_BOUNDARY 8
  145.  
  146. /* A bitfield declared as `int' forces `int' alignment for the struct.  */
  147. #define PCC_BITFIELD_TYPE_MATTERS 1
  148.  
  149. /* No data type wants to be aligned rounder than this.  */
  150. /* beware of doubles in structs -- 64 is incompatible with pcc */
  151. #define BIGGEST_ALIGNMENT 32
  152.  
  153. /* Set this nonzero if move instructions will actually fail to work
  154.    when given unaligned data.  */
  155. #define STRICT_ALIGNMENT 0
  156.  
  157. /* Define sizes of basic C types to conform to ordinary usage -- these
  158.    types depend on BITS_PER_WORD otherwise.  */
  159. #define CHAR_TYPE_SIZE        8
  160. #define SHORT_TYPE_SIZE        16
  161. #define INT_TYPE_SIZE        32
  162. #define LONG_TYPE_SIZE        32
  163. #define LONG_LONG_TYPE_SIZE    64
  164. #define FLOAT_TYPE_SIZE        32
  165. #define DOUBLE_TYPE_SIZE    64
  166. #define LONG_DOUBLE_TYPE_SIZE    64
  167.  
  168. /* Declare the standard types used by builtins to match convex stddef.h --
  169.    with int rather than long.  */
  170.  
  171. #define SIZE_TYPE "unsigned int"
  172. #define PTRDIFF_TYPE "int"
  173.  
  174. /* Standard register usage.  */
  175.  
  176. /* Number of actual hardware registers.
  177.    The hardware registers are assigned numbers for the compiler
  178.    from 0 to just below FIRST_PSEUDO_REGISTER.
  179.    All registers that the compiler knows about must be given numbers,
  180.    even those that are not normally considered general registers.  */
  181. #define FIRST_PSEUDO_REGISTER 16
  182.  
  183. /* 1 for registers that have pervasive standard uses
  184.    and are not available for the register allocator.
  185.    For Convex, these are AP, FP, and SP.  */
  186. #define FIXED_REGISTERS {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1} 
  187.  
  188. /* 1 for registers not available across function calls.
  189.    These must include the FIXED_REGISTERS and also any
  190.    registers that can be used without being saved.
  191.    The latter must include the registers where values are returned
  192.    and the register where structure-value addresses are passed.
  193.    Aside from that, you can include as many other registers as you like.  */
  194. #define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
  195.  
  196. /* Return number of consecutive hard regs needed starting at reg REGNO
  197.    to hold something of mode MODE.
  198.    This is ordinarily the length in words of a value of mode MODE
  199.    but can be less for certain modes in special long registers. */
  200. #define HARD_REGNO_NREGS(REGNO, MODE) \
  201.    ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
  202.  
  203. /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
  204.    On Convex, S registers can hold any type, A registers any nonfloat. */
  205. #define HARD_REGNO_MODE_OK(REGNO, MODE) \
  206.   ((REGNO) < 8 || (GET_MODE_CLASS (MODE) != MODE_FLOAT &&        \
  207.            GET_MODE_CLASS (MODE) != MODE_COMPLEX_FLOAT &&    \
  208.            (MODE) != DImode))
  209.  
  210. /* Value is 1 if it is a good idea to tie two pseudo registers
  211.    when one has mode MODE1 and one has mode MODE2.
  212.    If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
  213.    for any hard reg, then this must be 0 for correct output.  */
  214. #define MODES_TIEABLE_P(MODE1, MODE2)  \
  215.     ((GET_MODE_CLASS (MODE1) == MODE_FLOAT \
  216.       || GET_MODE_CLASS (MODE1) == MODE_COMPLEX_FLOAT \
  217.       || (MODE1) == DImode) \
  218.      == (GET_MODE_CLASS (MODE2) == MODE_FLOAT \
  219.      || GET_MODE_CLASS (MODE2) == MODE_COMPLEX_FLOAT \
  220.      || (MODE2) == DImode))
  221.  
  222. /* Specify the registers used for certain standard purposes.
  223.    The values of these macros are register numbers.  */
  224.  
  225. /* Register to use for pushing function arguments.  */
  226. #define STACK_POINTER_REGNUM 8
  227.  
  228. /* Base register for access to local variables of the function.  */
  229. #define FRAME_POINTER_REGNUM 15
  230.  
  231. /* Value should be nonzero if functions must have frame pointers.
  232.    Zero means the frame pointer need not be set up (and parms
  233.    may be accessed via the stack pointer) in functions that seem suitable.
  234.    This is computed in `reload', in reload1.c.  */
  235. #define FRAME_POINTER_REQUIRED 1
  236.  
  237. /* Base register for access to arguments of the f