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

  1. /* Definitions of target machine for GNU compiler.  Alliant FX version.
  2.    Copyright (C) 1989 Free Software Foundation, Inc.
  3.    Adapted from m68k.h by Paul Petersen (petersen@uicsrd.csrd.uiuc.edu)
  4.    and Joe Weening (weening@gang-of-four.stanford.edu).
  5.  
  6. This file is part of GNU CC.
  7.  
  8. GNU CC is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2, or (at your option)
  11. any later version.
  12.  
  13. GNU CC is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with GNU CC; see the file COPYING.  If not, write to
  20. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  21.  
  22.  
  23. /* This file is based on m68k.h, simplified by removing support for
  24.    the Sun FPA and other things not applicable to the Alliant.  Some
  25.    remnants of these features remain.  */
  26.  
  27. /* Names to predefine in the preprocessor for this target machine.  */
  28.  
  29. #define CPP_PREDEFINES "-Dmc68000 -Dalliant -Dunix"
  30.  
  31. /* Print subsidiary information on the compiler version in use.  */
  32.  
  33. #define TARGET_VERSION fprintf (stderr, " (Alliant)");
  34.  
  35. /* Run-time compilation parameters selecting different hardware
  36.    subsets.  The Alliant IP is an mc68020.  (Older mc68010-based IPs
  37.    are no longer supported.)  The Alliant CE is 68020-compatible, and
  38.    also has floating point, vector and concurrency instructions.
  39.  
  40.    Although the IP doesn't have floating point, it emulates it in the
  41.    operating system.  Using this generally is faster than running code
  42.    compiled with -msoft-float, because the soft-float code still uses
  43.    (simulated) FP registers and ends up emulating several fmove{s,d}
  44.    instructions per call.  So I don't recommend using soft-float for
  45.    any Alliant code.  -- JSW
  46. */
  47.  
  48. extern int target_flags;
  49.  
  50. /* Macros used in the machine description to test the flags.  */
  51.  
  52. /* Compile for a 68020 (not a 68000 or 68010).  */
  53. #define TARGET_68020 (target_flags & 1)
  54. /* Compile CE insns for floating point (not library calls).  */
  55. #define TARGET_CE (target_flags & 2)
  56. /* Compile using 68020 bitfield insns.  */
  57. #define TARGET_BITFIELD (target_flags & 4)
  58. /* Compile with 16-bit `int'.  */
  59. #define TARGET_SHORT (target_flags & 040)
  60.  
  61. /* Default 3 means compile 68020 and CE instructions.  We don't use
  62.    bitfield instructions because there appears to be a bug in the
  63.    implementation of bfins on the CE.  */
  64.  
  65. #define TARGET_DEFAULT 3
  66.  
  67. /* Define __HAVE_CE__ in preprocessor according to the -m flags.
  68.    This will control the use of inline FP insns in certain macros.
  69.    Also inform the program which CPU this is for.  */
  70.  
  71. #if TARGET_DEFAULT & 02
  72.  
  73. /* -mce is the default */
  74. #define CPP_SPEC \
  75. "%{!msoft-float:-D__HAVE_CE__ }\
  76. %{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}"
  77.  
  78. #else
  79.  
  80. /* -msoft-float is the default */
  81. #define CPP_SPEC \
  82. "%{mce:-D__HAVE_CE__ }\
  83. %{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}"
  84.  
  85. #endif
  86.  
  87. /* Link with libg.a when debugging, for dbx's sake.  */
  88.  
  89. #define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} "
  90.  
  91. /* Make the linker remove temporary labels, since the Alliant assembler
  92.    doesn't.  */
  93.  
  94. #define LINK_SPEC "-X"
  95.  
  96. /* Every structure or union's size must be a multiple of 2 bytes.  */
  97.  
  98. #define STRUCTURE_SIZE_BOUNDARY 16
  99.  
  100. /* This is BSD, so it wants DBX format.  */
  101.  
  102. #define DBX_DEBUGGING_INFO
  103.  
  104. /* Macro to define tables used to set the flags.
  105.    This is a list in braces of pairs in braces,
  106.    each pair being { "NAME", VALUE }
  107.    where VALUE is the bits to set or minus the bits to clear.
  108.    An empty string NAME is used to identify the default VALUE.  */
  109.  
  110. #define TARGET_SWITCHES  \
  111.   { { "68020", 5},                \
  112.     { "c68020", 5},                \
  113.     { "bitfield", 4},                \
  114.     { "68000", -7},                \
  115.     { "c68000", -7},                \
  116.     { "soft-float", -2},            \
  117.     { "nobitfield", -4},            \
  118.     { "short", 040},                \
  119.     { "noshort", -040},                \
  120.     { "", TARGET_DEFAULT}}
  121.  
  122. /* target machine storage layout */
  123.  
  124. /* Define this if most significant bit is lowest numbered
  125.    in instructions that operate on numbered bit-fields.
  126.    This is true for 68020 insns such as bfins and bfexts.
  127.    We make it true always by avoiding using the single-bit insns
  128.    except in special cases with constant bit numbers.  */
  129. #define BITS_BIG_ENDIAN 1
  130.  
  131. /* Define this if most significant byte of a word is the lowest numbered.  */
  132. /* That is true on the 68000.  */
  133. #define BYTES_BIG_ENDIAN 1
  134.  
  135. /* Define this if most significant word of a multiword number is the lowest
  136.    numbered.  */
  137. /* For 68000 we can decide arbitrarily
  138.    since there are no machine instructions for them.  */
  139. #define WORDS_BIG_ENDIAN 0
  140.  
  141. /* number of bits in an addressable storage unit */
  142. #define BITS_PER_UNIT 8
  143.  
  144. /* Width in bits of a "word", which is the contents of a machine register.
  145.    Note that this is not necessarily the width of data type `int';
  146.    if using 16-bit ints on a 68000, this would still be 32.
  147.    But on a machine with 16-bit registers, this would be 16.  */
  148. #define BITS_PER_WORD 32
  149.  
  150. /* Width of a word, in units (bytes).  */
  151. #define UNITS_PER_WORD 4
  152.  
  153. /* Width in bits of a pointer.
  154.    See also the macro `Pmode' defined below.  */
  155. #define POINTER_SIZE 32
  156.  
  157. /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
  158. #define PARM_BOUNDARY (TARGET_SHORT ? 16 : 32)
  159.  
  160. /* Boundary (in *bits*) on which stack pointer should be aligned.  */
  161. #define STACK_BOUNDARY 16
  162.  
  163. /* Allocation boundary (in *bits*) for the code of a function.  */
  164. #define FUNCTION_BOUNDARY 16
  165.  
  166. /* Alignment of field after `int : 0' in a structure.  */
  167. #define EMPTY_FIELD_BOUNDARY 16
  168.  
  169. /* No data type wants to be aligned rounder than this.  */
  170. #define BIGGEST_ALIGNMENT 16
  171.  
  172. /* Set this non-zero if move instructions will actually fail to work
  173.    when given unaligned data.  */
  174. #define STRICT_ALIGNMENT 1
  175.  
  176. /* Define number of bits in most basic integer type.
  177.    (If undefined, default is BITS_PER_WORD).  */
  178.  
  179. #define INT_TYPE_SIZE (TARGET_SHORT ? 16 : 32)
  180.  
  181. /* Define these to avoid dependence on meaning of `int'.
  182.    Note that WCHAR_TYPE_SIZE is used in cexp.y,
  183.    where TARGET_SHORT is not available.  */
  184.  
  185. #define WCHAR_TYPE "long int"
  186. #define WCHAR_TYPE_SIZE 32
  187.  
  188. /* Standard register usage.  */
  189.  
  190. /* Number of actual hardware registers.
  191.    The hardware registers are assigned numbers for the compiler
  192.    from 0 to just below FIRST_PSEUDO_REGISTER.
  193.    All registers that the compiler knows about must be given numbers,
  194.    even those that are not normally considered general registers.
  195.    For the Alliant, we give the data registers numbers 0-7,
  196.    the address registers numbers 010-017,
  197.    and the floating point registers numbers 020-027.  */
  198. #define FIRST_PSEUDO_REGISTER 24
  199.  
  200. /* 1 for registers that have pervasive standard uses
  201.    and are not available for the register allocator.
  202.    On the Alliant, these are a0 (argument pointer),
  203.    a6 (frame pointer) and a7 (stack pointer).  */
  204. #define FIXED_REGISTERS  \
  205.  {0, 0, 0, 0, 0, 0, 0, 0, \
  206.   1, 0, 0, 0, 0, 0, 1, 1, \
  207.   0, 0, 0, 0, 0, 0, 0, 0  }
  208.  
  209. /* 1 for registers not available across function calls.
  210.    These must include the FIXED_REGISTERS and also any
  211.    registers that can be used without being saved.
  212.    The latter must include the registers where values are returned
  213.    and the register where structure-value addresses are passed.
  214.    Aside from that, you can include as many other registers as you like.
  215.    The Alliant calling sequence allows a function to use any register,
  216.    so we include them all here.  */
  217.  
  218. #define CALL_USED_REGISTERS \
  219.  {1, 1, 1, 1, 1, 1, 1, 1, \
  220.   1, 1, 1, 1, 1, 1, 1, 1, \
  221.   1, 1, 1, 1, 1, 1, 1, 1  }
  222.  
  223. /* Return number of consecutive hard regs needed starting at reg REGNO
  224.    to hold something of mode MODE.
  225.    This is ordinarily the length in words of a value of mode MODE
  226.    but can be less for certain modes in special long registers.
  227.  
  228.    On the Alliant, ordinary registers hold 32 bits worth;
  229.    for the FP registers, a single register is alway