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

  1. /* Definitions of target machine for GNU compiler, for Intel 80960
  2.    Copyright (C) 1992 Free Software Foundation, Inc.
  3.    Contributed by Steven McGeady, Intel Corp.
  4.    Additional Work by Glenn Colon-Bonet, Jonathan Shapiro, Andy Wilson
  5.    Converted to GCC 2.0 by Jim Wilson and Michael Tiemann, Cygnus Support.
  6.  
  7. This file is part of GNU CC.
  8.  
  9. GNU CC is free software; you can redistribute it and/or modify
  10. it under the terms of the GNU General Public License as published by
  11. the Free Software Foundation; either version 2, or (at your option)
  12. any later version.
  13.  
  14. GNU CC is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. GNU General Public License for more details.
  18.  
  19. You should have received a copy of the GNU General Public License
  20. along with GNU CC; see the file COPYING.  If not, write to
  21. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  22.  
  23. /* Note that some other tm.h files may include this one and then override
  24.    many of the definitions that relate to assembler syntax.  */
  25.  
  26. /* Names to predefine in the preprocessor for this target machine.  */
  27. #define CPP_PREDEFINES "-Di960 -Di80960 -DI960 -DI80960"
  28.  
  29. /* Name to predefine in the preprocessor for processor variations.  */
  30. #define    CPP_SPEC "%{mic*:-D__i960\
  31.             %{mka:-D__i960KA}%{mkb:-D__i960KB}%{mkc:-D__i960KC}\
  32.             %{msa:-D__i960SA}%{msb:-D__i960SB}%{msc:-D__i960SC}\
  33.             %{mmc:-D__i960MC}\
  34.             %{mca:-D__i960CA}%{mcb:-D__i960CB}%{mcc:-D__i960CC}\
  35.             %{mcf:-D__i960CF}}\
  36.     %{mka:-D__i960KA__ -D__i960_KA__}\
  37.     %{mkb:-D__i960KB__ -D__i960_KB__}\
  38.     %{mkc:-D__i960KC__ -D__i960_KC__}\
  39.     %{msa:-D__i960SA__ -D__i960_SA__}\
  40.     %{msb:-D__i960SB__ -D__i960_SB__}\
  41.     %{msc:-D__i960SC__ -D__i960_SC__}\
  42.     %{mmc:-D__i960MC__ -D__i960_MC__}\
  43.     %{mca:-D__i960CA__ -D__i960_CA__}\
  44.     %{mcb:-D__i960CB__ -D__i960_CB__}\
  45.     %{mcc:-D__i960CC__ -D__i960_CC__}\
  46.     %{mcf:-D__i960CF__ -D__i960_CF__}\
  47.     %{!mka:%{!mkb:%{!mkc:%{!msa:%{!msb:%{!msc:%{!mmc:%{!mca:%{!mcb:\
  48.         %{!mcc:%{!mcf:-D__i960_KB -D__i960KB__ %{mic*:-D__i960KB}}}}}}}}}}}}"
  49.  
  50. /* -mic* options make characters signed by default.  */
  51. #define SIGNED_CHAR_SPEC  \
  52.   (DEFAULT_SIGNED_CHAR ? "%{funsigned-char:-D__CHAR_UNSIGNED__}"    \
  53.    : "%{!fsigned-char:%{!mic*:-D__CHAR_UNSIGNED__}}")
  54.  
  55. /* Specs for the compiler, to handle processor variations.  */
  56. #define CC1_SPEC \
  57.     "%{!mka:%{!mkb:%{!mkc:%{!msa:%{!msb:%{!msc:%{!mmc:%{!mca:%{!mcb:\
  58.         %{!mcc:%{!mcf:-mkb}}}}}}}}}}}\
  59.     %{mbout:%{g*:-gstabs}}\
  60.     %{mcoff:%{g*:-gcoff}}\
  61.     %{!mbout:%{!mcoff:%{g*:-gstabs}}}"
  62.  
  63. /* Specs for the assembler, to handle processor variations.
  64.    For compatibility with Intel's gnu960 tool chain, pass -A options to
  65.    the assembler.  */
  66. #define ASM_SPEC \
  67.     "%{mka:-AKA}%{mkb:-AKB}%{mkc:-AKC}%{msa:-ASA}%{msb:-ASB}\
  68.     %{msc:-ASC}%{mmc:-AMC}%{mca:-ACA}%{mcb:-ACB}%{mcc:-ACC}%{mcf:-ACF}\
  69.     %{!mka:%{!mkb:%{!mkc:%{!msa:%{!msb:%{!msc:%{!mmc:%{!mca:%{!mcb:\
  70.         %{!mcc:%{!mcf:-AKB}}}}}}}}}}}"
  71.  
  72. /* Specs for the linker, to handle processor variations.
  73.    For compatibility with Intel's gnu960 tool chain, pass -F and -A options
  74.    to the linker.  */
  75. #define LINK_SPEC \
  76.     "%{mka:-AKA}%{mkb:-AKB}%{mkc:-AKC}%{msa:-ASA}%{msb:-ASB}\
  77.     %{msc:-ASC}%{mmc:-AMC}%{mca:-ACA}%{mcb:-ACB}%{mcc:-ACC}%{mcf:-ACF}\
  78.     %{!mka:%{!mkb:%{!mkc:%{!msa:%{!msb:%{!msc:%{!mmc:%{!mca:%{!mcb:\
  79.         %{!mcc:%{!mcf:-AKB}}}}}}}}}}}\
  80.     %{mbout:-Fbout}%{mcoff:-Fcoff}"
  81.  
  82. /* Specs for the libraries to link with, to handle processor variations.
  83.    Compatible with Intel's gnu960 tool chain.  */
  84. #define LIB_SPEC "%{!nostdlib:-lcg %{p:-lprof}%{pg:-lgprof}\
  85.       %{mka:-lfpg}%{msa:-lfpg}%{mca:-lfpg}%{mcf:-lfpg} -lgnu}"
  86.  
  87. /* Omit frame pointer at -O2.  Inline functions at -O3.  */
  88. #define OPTIMIZATION_OPTIONS(LEVEL)        \
  89. {                        \
  90.   if ((LEVEL) >= 2)                \
  91.     {                        \
  92.       flag_omit_frame_pointer = 1;        \
  93.       target_flags |= TARGET_FLAG_LEAFPROC;    \
  94.       target_flags |= TARGET_FLAG_TAILCALL;    \
  95.     }                        \
  96.   if ((LEVEL) >= 3)                \
  97.     flag_inline_functions = 1;            \
  98. }
  99.  
  100. /* Print subsidiary information on the compiler version in use.  */
  101. #define TARGET_VERSION fprintf (stderr," (intel 80960)");
  102.  
  103. /* Generate DBX debugging information.  */
  104. #define DBX_DEBUGGING_INFO
  105.  
  106. /* Generate SDB style debugging information.  */
  107. #define SDB_DEBUGGING_INFO
  108.  
  109. /* Generate DBX_DEBUGGING_INFO by default.  */
  110. #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
  111.  
  112. /* Redefine this to print in hex like iC960.  */
  113. #define PUT_SDB_TYPE(A) fprintf (asm_out_file, "\t.type\t0x%x;", A)
  114.  
  115. /* Run-time compilation parameters selecting different hardware subsets.  */
  116.  
  117. /* 960 architecture with floating-point.  */
  118. #define TARGET_FLAG_NUMERICS    0x01
  119. #define TARGET_NUMERICS        (target_flags & TARGET_FLAG_NUMERICS)
  120.  
  121. /* 960 architecture with memory management.  */
  122. /* ??? Not used currently.  */
  123. #define    TARGET_FLAG_PROTECTED    0x02
  124. #define    TARGET_PROTECTED    (target_flags & TARGET_FLAG_PROTECTED)
  125.  
  126. /* The following three are mainly used to provide a little sanity checking
  127.    against the -mARCH flags given.  */
  128.  
  129. /* Nonzero if we should generate code for the KA and similar processors.
  130.    No FPU, no microcode instructions.  */
  131. #define TARGET_FLAG_K_SERIES    0x04
  132. #define TARGET_K_SERIES        (target_flags & TARGET_FLAG_K_SERIES)
  133.  
  134. /* Nonzero if we should generate code for the MC processor.
  135.    Not really different from KB for our purposes.  */
  136. #define    TARGET_FLAG_MC        0x08
  137. #define TARGET_MC         (target_flags & TARGET_FLAG_MC)
  138.  
  139. /* Nonzero if we should generate code for the CA processor.
  140.    Enables different optimization strategies.  */
  141. #define    TARGET_FLAG_C_SERIES    0x10
  142. #define    TARGET_C_SERIES     (target_flags & TARGET_FLAG_C_SERIES)
  143.  
  144. /* Nonzero if we should generate leaf-procedures when we find them.
  145.    You may not want to do this because leaf-proc entries are
  146.    slower when not entered via BAL - this would be true when
  147.    a linker not supporting the optimization is used.  */
  148. #define    TARGET_FLAG_LEAFPROC    0x20
  149. #define    TARGET_LEAFPROC        (target_flags & TARGET_FLAG_LEAFPROC)
  150.  
  151. /* Nonzero if we should perform tail-call optimizations when we find them.
  152.    You may not want to do this because the detection of cases where
  153.    this is not valid is not totally complete.  */
  154. #define    TARGET_FLAG_TAILCALL    0x40
  155. #define    TARGET_TAILCALL        (target_flags & TARGET_FLAG_TAILCALL)
  156.  
  157. /* Nonzero if use of a complex addressing mode is a win on this implementation.
  158.    Complex addressing modes are probably not worthwhile on the K-series,
  159.    but they definitely are on the C-series.  */
  160. #define    TARGET_FLAG_COMPLEX_ADDR 0x80
  161. #define    TARGET_COMPLEX_ADDR    (target_flags & TARGET_FLAG_COMPLEX_ADDR)
  162.  
  163. /* Align code to 8 byte boundaries for faster fetching.  */
  164. #define    TARGET_FLAG_CODE_ALIGN    0x100
  165. #define    TARGET_CODE_ALIGN    (target_flags  & TARGET_FLAG_CODE_ALIGN)
  166.  
  167. /* Append branch prediction suffixes to branch opcodes.  */
  168. /* ??? Not used currently.  */
  169. #define    TARGET_FLAG_BRANCH_PREDICT 0x200
  170. #define    TARGET_BRANCH_PREDICT    (target_flags  & TARGET_FLAG_BRANCH_PREDICT)
  171.  
  172. /* Forces prototype and return promotions.  */
  173. /* ??? This does not work.  */
  174. #define    TARGET_FLAG_CLEAN_LINKAGE 0x400
  175. #define    TARGET_CLEAN_LINKAGE    (target_flags & TARGET_FLAG_CLEAN_LINKAGE)
  176.  
  177. /* For compatibility with iC960 v3.0.  */
  178. #define    TARGET_FLAG_IC_COMPAT3_0 0x800 
  179. #define    TARGET_IC_COMPAT3_0    (target_flags & TARGET_FLAG_IC_COMPAT3_0)
  180.  
  181. /* For compatibility with iC960 v2.0.  */
  182. #define    TARGET_FLAG_IC_COMPAT2_0 0x1000
  183. #define    TARGET_IC_COMPAT2_0    (target_flags & TARGET_FLAG_IC_COMPAT2_0)
  184.  
  185. /* If no unaligned accesses are to be permitted.  */
  186. #define    TARGET_FLAG_STRICT_ALIGN 0x2000
  187. #define    TARGET_STRICT_ALIGN    (target_flags & TARGET_FLAG_STRICT_ALIGN)
  188.  
  189. /* For compatibility with iC960 assembler.  */
  190. #define    TARGET_FLAG_ASM_COMPAT    0x4000
  191. #define    TARGET_ASM_COMPAT    (target_flags & TARGET_FLAG_ASM_COMPAT)
  192.  
  193. /* For compatibility with the gcc960 v1.2 compiler.  Use the old structure
  194.    alignement rules.  Also, turns on STRICT_ALIGNMENT.  */
  195. #define TARGET_FLAG_OLD_ALIGN    0x8000
  196. #define TARGET_OLD_ALIGN    (target_flags & TARGET_FLAG_OLD_ALIGN)
  197.  
  198. extern int target_flags;
  199.  
  200. /* Macro to define tables used to set the flags.
  201.    This is a list in braces of pairs in braces,
  202.    each pair being { "NAME", VALUE }
  203.    where VALUE is the bits