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 / i386rose.h < prev    next >
C/C++ Source or Header  |  1994-02-06  |  14KB  |  466 lines

  1. /* Definitions of target machine for GNU compiler.
  2.    Intel 386 (OSF/1 with OSF/rose) version.
  3.    Copyright (C) 1991 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 2, 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. /* Put leading underscores in front of names. */
  22. #define YES_UNDERSCORES
  23.  
  24. #include "halfpic.h"
  25. #include "i386gstabs.h"
  26.  
  27. #define OSF_OS
  28.  
  29. #undef  WORD_SWITCH_TAKES_ARG
  30. #define WORD_SWITCH_TAKES_ARG(STR)                    \
  31.  (!strcmp (STR, "Tdata") || !strcmp (STR, "Ttext")            \
  32.   || !strcmp (STR, "Tbss") || !strcmp (STR, "include")            \
  33.   || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info")        \
  34.   || !strcmp (STR, "pic-names"))
  35.  
  36. #define MASK_HALF_PIC         0x40000000    /* Mask for half-pic code */
  37. #define MASK_HALF_PIC_DEBUG    0x20000000    /* Debug flag */
  38.  
  39. #define TARGET_HALF_PIC    (target_flags & MASK_HALF_PIC)
  40. #define TARGET_DEBUG    (target_flags & MASK_HALF_PIC_DEBUG)
  41. #define HALF_PIC_DEBUG    TARGET_DEBUG
  42.  
  43. #undef    SUBTARGET_SWITCHES
  44. #define SUBTARGET_SWITCHES \
  45.      { "half-pic",     MASK_HALF_PIC},                \
  46.      { "no-half-pic",    -MASK_HALF_PIC},                \
  47.      { "debugb",     MASK_HALF_PIC_DEBUG},
  48.  
  49. /* Prefix that appears before all global/static identifiers, except for
  50.    temporary labels.  */
  51.  
  52. #define IDENTIFIER_PREFIX "_"
  53.  
  54. /* Suffix that appears after all global/static identifiers, except for
  55.    temporary labels.  */
  56.  
  57. #define IDENTIFIER_SUFFIX ""
  58.  
  59. /* Change default predefines.  */
  60. #undef    CPP_PREDEFINES
  61. #define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Di386"
  62.  
  63. #undef  CPP_SPEC
  64. #define CPP_SPEC "\
  65. %{.S:    -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
  66. %{.cc:    -D__LANGUAGE_C_PLUS_PLUS} \
  67. %{.cxx:    -D__LANGUAGE_C_PLUS_PLUS} \
  68. %{.C:    -D__LANGUAGE_C_PLUS_PLUS} \
  69. %{.m:    -D__LANGUAGE_OBJECTIVE_C} \
  70. %{!.S:    -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
  71.  
  72. /* Turn on -mpic-extern by default.  */
  73. #undef  CC1_SPEC
  74. #define CC1_SPEC "\
  75. %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
  76. %{pic-none:   -mno-half-pic} \
  77. %{pic-lib:    -mhalf-pic} \
  78. %{pic-extern: -mhalf-pic} \
  79. %{pic-calls:  -mhalf-pic} \
  80. %{pic-names*: -mhalf-pic} \
  81. %{!pic-*:     -mhalf-pic}"
  82.  
  83. #undef    ASM_SPEC
  84. #define ASM_SPEC       ""
  85.  
  86. #undef  LINK_SPEC
  87. #define LINK_SPEC      "%{v*: -v}                           \
  88.                    %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \
  89.                    %{nostdlib} %{noshrlib} %{glue}"
  90.  
  91. #undef  LIB_SPEC
  92. #define LIB_SPEC "-lc"
  93.  
  94. #undef  LIBG_SPEC
  95. #define LIBG_SPEC ""
  96.  
  97. #undef  STARTFILE_SPEC
  98. #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
  99.  
  100. #undef TARGET_VERSION_INTERNAL
  101. #undef TARGET_VERSION
  102.  
  103. #define I386_VERSION " 80386, OSF/rose objects"
  104.  
  105. #define TARGET_VERSION_INTERNAL(STREAM) fputs (I386_VERSION, STREAM)
  106. #define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr)
  107.  
  108. #undef  MD_EXEC_PREFIX
  109. #define MD_EXEC_PREFIX        "/usr/ccs/gcc/"
  110.  
  111. #undef  MD_STARTFILE_PREFIX
  112. #define MD_STARTFILE_PREFIX    "/usr/ccs/lib/"
  113.  
  114. /* Specify size_t, ptrdiff_t, and wchar_t types.  */
  115. #undef    SIZE_TYPE
  116. #undef    PTRDIFF_TYPE
  117. #undef    WCHAR_TYPE
  118. #undef    WCHAR_TYPE_SIZE
  119.  
  120. #define SIZE_TYPE    "long unsigned int"
  121. #define PTRDIFF_TYPE    "int"
  122. #define WCHAR_TYPE    "unsigned int"
  123. #define WCHAR_TYPE_SIZE BITS_PER_WORD
  124.  
  125. /* Tell final.c we don't need a label passed to mcount.  */
  126. #define NO_PROFILE_DATA
  127.  
  128. #undef  FUNCTION_PROFILER
  129. #define FUNCTION_PROFILER(FILE, LABELNO) fprintf (FILE, "\tcall _mcount\n")
  130.  
  131. /* Some machines may desire to change what optimizations are
  132.    performed for various optimization levels.   This macro, if
  133.    defined, is executed once just after the optimization level is
  134.    determined and before the remainder of the command options have
  135.    been parsed.  Values set in this macro are used as the default
  136.    values for the other command line options.
  137.  
  138.    LEVEL is the optimization level specified; 2 if -O2 is
  139.    specified, 1 if -O is specified, and 0 if neither is specified.  */
  140.  
  141. #define OPTIMIZATION_OPTIONS(LEVEL)                    \
  142. {                                    \
  143.   flag_gnu_linker = FALSE;                        \
  144.                                     \
  145.   if (LEVEL >= 3)                            \
  146.     flag_inline_functions = TRUE;                    \
  147. }
  148.  
  149. /* A C expression that is 1 if the RTX X is a constant which is a
  150.    valid address.  On most machines, this can be defined as
  151.    `CONSTANT_P (X)', but a few machines are more restrictive in
  152.    which constant addresses are supported.
  153.  
  154.    `CONSTANT_P' accepts integer-values expressions whose values are
  155.    not explicitly known, such as `symbol_ref', `label_ref', and
  156.    `high' expressions and `const' arithmetic expressions, in
  157.    addition to `const_int' and `const_double' expressions.  */
  158.  
  159. #undef    CONSTANT_ADDRESS_P
  160. #define CONSTANT_ADDRESS_P(X)                                           \
  161.   (CONSTANT_P (X) && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X)))
  162.  
  163. /* Nonzero if the constant value X is a legitimate general operand.
  164.    It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
  165.  
  166. #undef    LEGITIMATE_CONSTANT_P
  167. #define LEGITIMATE_CONSTANT_P(X)                    \
  168.   (!HALF_PIC_P ()                            \
  169.    || GET_CODE (X) == CONST_DOUBLE                    \
  170.    || GET_CODE (X) == CONST_INT                        \
  171.    || !HALF_PIC_ADDRESS_P (X))
  172.  
  173. /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
  174.    that is a valid memory address for an instruction.
  175.    The MODE argument is the machine mode for the MEM expression
  176.    that wants to use this address. */
  177.  
  178. #undef    GO_IF_LEGITIMATE_ADDRESS
  179. #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                \
  180. {                                    \
  181.   if (CONSTANT_P (X))                            \
  182.     {                                    \
  183.       if (! HALF_PIC_P () || ! HALF_PIC_ADDRESS_P (X))            \
  184.     goto ADDR;                            \
  185.     }                                    \
  186.   else                                    \
  187.     {                                    \
  188.       GO_IF_INDEXING (X, ADDR);                        \
  189.                                     \
  190.       if (GET_CODE (X) == PLUS)                        \
  191.     {                                \
  192.       rtx x1 = XEXP (X, 1);                        \
  193.                                     \
  194.       if (CONSTANT_P (x1))                        \
  195.         {                                \
  196.           if (! HALF_PIC_P () || ! HALF_PIC_ADDRESS_P (x1))        \
  197.         {                            \
  198.           rtx x0 = XEXP (X, 0);                    \
  199.           GO_IF_INDEXING (x0, ADDR);                \
  200.         }                            \
  201.         }                                \
  202.     }                                \
  203.     }                                    \
  204. }
  205.  
  206. /* Sometimes certain combinations of command options do not make sense
  207.    on a particular target machine.  You can define a macro
  208.    `OVERRIDE_OPTIONS' to take account of this.  This macro, if
  209.    defined, is executed once just after all the command options have
  210.    been parsed.  */
  211.  
  212. #define OVERRIDE_OPTIONS                        \
  213. {                                    \
  214.   if (TARGET_HALF_PIC)                            \
  215.     half_pic_init ();                            \
  216. }
  217.  
  218. /* Define this macro if references to a symbol must be treated
  219.    differently depending on something about the variable or
  220.    function named by the symbol (such as what section it is in).
  221.  
  222.    The macro definition, if any, is executed immediately after the
  223.    rtl for DECL has been created and stored in `DECL_RTL (DECL)'. 
  224.    The value of the rtl will be a `mem' whose address is a
  225.    `symbol_ref'.
  226.  
  227.    The usual thing for this macro to do is to a flag in the
  228.    `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
  229.    name string in the `symbol_ref' (if one bit is not enough
  230.    information).
  231.  
  232.    The best way to modify the name string is by adding text to the
  233.    beginning, with suitable punctuation to prevent any ambiguity. 
  234.    Allocate the new name in `saveable_obstack'.  You will have to
  235.    modify `ASM_OUTPUT_LABELREF' to remove and decode the added text
  236.    and output the name accordingly.
  237.  
  238.    You can also check the information stored in the `symbol_ref' in
  239.    the definition of `GO_IF_LEGITIMATE_ADDRESS' or
  240.    `PRINT_OPERAND_ADDRESS'. */
  241.  
  242. #undef    ENCODE_SECTION_INFO
  243. #define ENCODE_SECTION_INFO(DECL)                    \
  244. do                                    \
  245.   {                                    \
  246.    if (HALF_PIC_P ())                                \
  247.       HALF_PIC_ENCODE (DECL);                        \
  248.   }                                    \
  249. while (0)
  250.  
  251.  
  252. /* Given a decl node or constant node, choose the section to output it in
  253.    and select that section.