OSDN Git Service

Change callers in config/[h-l]*/ to match:
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / dgux.h
1 /* Target definitions for GNU compiler for Intel 80x86 running DG/ux
2    Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000
3    Free Software Foundation, Inc.
4    Currently maintained by gcc@dg-rtp.dg.com.
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, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA.  */
22
23 /* for now, we are just like the sysv4 version with a
24    few hacks
25 */
26
27 #include "i386/sysv4.h"
28
29 #ifndef VERSION_INFO2
30 #define VERSION_INFO2   "$Revision: 1.11 $"
31 #endif
32
33 #ifndef VERSION_STRING
34 #define VERSION_STRING  version_string
35 #endif
36
37 /* Identify the compiler.  */
38 /* TARGET_VERSION used by toplev.c VERSION_STRING used by -midentify-revision */
39
40 #undef  TARGET_VERSION
41 #define TARGET_VERSION fprintf (stderr, " (%s%s, %s)", \
42                                 VERSION_INFO1, VERSION_INFO2, __DATE__)
43 #undef  VERSION_INFO1
44 #define VERSION_INFO1 "ix86 DG/ux, "
45
46 /* Augment TARGET_SWITCHES with the MXDB options.  */
47 #define MASK_STANDARD           0x40000000 /* Retain standard information */
48 #define MASK_NOLEGEND           0x20000000 /* Discard legend information */
49 #define MASK_EXTERNAL_LEGEND    0x10000000 /* Make external legends */
50 #define MASK_IDENTIFY_REVISION  0x08000000 /* Emit 'ident' to .s */
51 #define MASK_WARN_PASS_STRUCT   0x04000000 /* Warn when structures are passed */
52
53 #define TARGET_STANDARD           (target_flags & MASK_STANDARD)
54 #define TARGET_NOLEGEND           (target_flags & MASK_NOLEGEND)
55 #define TARGET_EXTERNAL_LEGEND    (target_flags & MASK_EXTERNAL_LEGEND)
56 #define TARGET_IDENTIFY_REVISION  (target_flags & MASK_IDENTIFY_REVISION)
57 #define TARGET_WARN_PASS_STRUCT   (target_flags & MASK_WARN_PASS_STRUCT)
58
59 #undef  SUBTARGET_SWITCHES
60 #define SUBTARGET_SWITCHES \
61     { "standard",               MASK_STANDARD,                  \
62       N_("Retain standard MXDB information") },                 \
63     { "legend",                 -MASK_NOLEGEND,                 \
64       N_("Retain legend information") },                        \
65     { "no-legend",              MASK_NOLEGEND, "" },            \
66     { "external-legend",        MASK_EXTERNAL_LEGEND,           \
67       N_("Generate external legend information") },             \
68     { "identify-revision",      MASK_IDENTIFY_REVISION,         \
69       N_("Emit identifying info in .s file") },                 \
70     { "warn-passed-structs",    MASK_WARN_PASS_STRUCT,          \
71       N_("Warn when a function arg is a structure") },
72
73 #undef  DWARF_DEBUGGING_INFO
74 #define DWARF_DEBUGGING_INFO
75
76 /*
77   allow -gstabs so that those who have gnu-as installed
78   can debug c++ programs.
79 */
80 #undef  DBX_DEBUGGING_INFO
81 #define DBX_DEBUGGING_INFO
82
83 #define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG
84
85 /* Override svr[34].h.  */
86 #undef  ASM_FILE_START
87 #define ASM_FILE_START(FILE) \
88   output_file_start (FILE, f_options, ARRAY_SIZE (f_options), \
89                      W_options, ARRAY_SIZE (W_options))
90
91 /* ix86 abi specified type for wchar_t */
92
93 #undef WCHAR_TYPE
94 #define WCHAR_TYPE "long int"
95
96 #undef WCHAR_TYPE_SIZE
97 #define WCHAR_TYPE_SIZE BITS_PER_WORD
98
99
100 /* Some machines may desire to change what optimizations are performed for
101    various optimization levels.   This macro, if defined, is executed once
102    just after the optimization level is determined and before the remainder
103    of the command options have been parsed.  Values set in this macro are
104    used as the default values for the other command line options.
105
106    LEVEL is the optimization level specified; 2 if -O2 is specified,
107    1 if -O is specified, and 0 if neither is specified.  */
108
109 /* This macro used to store 0 in flag_signed_bitfields.
110    Not only is that misuse of this macro; the whole idea is wrong.
111
112    The GNU C dialect makes bitfields signed by default,
113    regardless of machine type.  Making any machine inconsistent in this
114    regard is bad for portability.
115
116    I chose to make bitfields signed by default because this is consistent
117    with the way ordinary variables are handled: `int' equals `signed int'.
118    If there is a good reason to prefer making bitfields unsigned by default,
119    it cannot have anything to do with the choice of machine.
120    If the reason is good enough, we should change the convention for all machines.
121
122    -- rms, 20 July 1991.  */
123
124 /*
125   this really should go into dgux-local.h 
126 */
127
128 #undef  OPTIMIZATION_OPTIONS
129 #define OPTIMIZATION_OPTIONS(LEVEL,SIZE)                \
130   do {                                                  \
131     extern int flag_signed_bitfields;                   \
132     flag_signed_bitfields = 0;                          \
133     optimization_options (LEVEL,SIZE);                  \
134   } while (0)
135
136
137 /* The normal location of the `ld' and `as' programs */
138
139 #undef MD_EXEC_PREFIX
140 #define MD_EXEC_PREFIX "/usr/bin/"
141
142 /* The normal location of the various *crt*.o files is the */
143
144 #undef MD_STARTFILE_PREFIX
145 #define MD_STARTFILE_PREFIX "/usr/lib/"
146
147 /* Macros to be automatically defined.  
148    __CLASSIFY_TYPE__ is used in the <varargs.h> and <stdarg.h> header
149    files with DG/UX revision 5.40 and later.  This allows GNU CC to
150    operate without installing the header files.  */
151
152 #undef  CPP_PREDEFINES
153 #define CPP_PREDEFINES "-D__ix86 -Dunix -DDGUX -D__CLASSIFY_TYPE__=2\
154    -Asystem(unix) -Asystem(svr4)"
155
156    /*
157      If not -ansi, -traditional, or restricting include files to one
158      specific source target, specify full DG/UX features.
159    */
160 #undef  CPP_SPEC
161 #define CPP_SPEC "%(cpp_cpu) %{!ansi:%{!traditional:-D__OPEN_NAMESPACE__}}"
162
163 /* Assembler support (legends for mxdb).  */
164 #undef  ASM_SPEC
165 #define ASM_SPEC "\
166 %{mno-legend:%{mstandard:-Wc,off}}\
167 %{g:%{!mno-legend:-Wc,-fix-bb,-s\"%i\"\
168 %{traditional:,-lc}%{!traditional:,-lansi-c}\
169 %{mstandard:,-keep-std}\
170 %{mexternal-legend:,-external}}}"
171
172 /* Override svr4.h.  */
173
174 /* hassey 3/12/94 keep svr4 ASM_FINAL_SPEC allows -pipe to work */
175
176 /* Linker and library spec's.
177    -static, -shared, -symbolic, -h* and -z* access AT&T V.4 link options.
178    -svr4 instructs gcc to place /usr/lib/values-X[cat].o on link the line.
179    The absence of -msvr4 indicates linking done in a COFF environment and
180    adds the link script to the link line.  In all environments, the first
181    and last objects are crtbegin.o and crtend.o.
182    When the -G link option is used (-shared and -symbolic) a final link is
183    not being done.  */
184
185 #undef  LIB_SPEC
186 #define LIB_SPEC \
187 "%{!shared:%{!symbolic:-lc}}"
188
189 #undef  LINK_SPEC
190 #define LINK_SPEC "%{z*} %{h*} %{v:-V} \
191                    %{static:-dn -Bstatic} \
192                    %{shared:-G -dy} \
193                    %{symbolic:-Bsymbolic -G -dy} \
194                    %{pg:-L/usr/lib/libp}%{p:-L/usr/lib/libp}"
195
196 #ifdef CROSS_COMPILE
197
198 #undef  STARTFILE_SPEC
199 #define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt1.o%s}           \
200                                               %{!pg:%{p:mcrt1.o%s}      \
201                                               %{!p:crt1.o%s}}}}         \
202                          %{pg:gcrti.o%s}%{!pg:crti.o%s}                 \
203                          crtbegin.o%s                                   \
204                          %{ansi:values-Xc.o%s}                          \
205                          %{!ansi:%{traditional:values-Xt.o%s}           \
206                                  %{!traditional:values-Xa.o%s}}"
207
208 #undef  ENDFILE_SPEC
209 #define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:crtn.o%s}"
210
211 #else
212
213 #undef  STARTFILE_SPEC
214 #define STARTFILE_SPEC "%{!shared:%{!symbolic:%{pg:gcrt1.o%s}           \
215                                               %{!pg:%{p:/lib/mcrt1.o%s} \
216                                              %{!p:/lib/crt1.o%s}}}}    \
217                        %{pg:gcrti.o%s}%{!pg:/lib/crti.o%s}           \
218                         crtbegin.o%s                                    \
219                         %{ansi:/lib/values-Xc.o%s}                      \
220                         %{!ansi:%{traditional:/lib/values-Xt.o%s}       \
221                                 %{!traditional:/lib/values-Xa.o%s}}"
222
223 #undef  ENDFILE_SPEC
224 #define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o}%{!pg:/lib/crtn.o}"
225
226 #endif /* CROSS_COMPILE */
227
228 /* The maximum alignment which the object file format can support.
229    page alignment would seem to be enough */
230 #undef MAX_OFILE_ALIGNMENT
231 #define MAX_OFILE_ALIGNMENT 0x1000
232
233 /* Must use data section for relocatable constants when pic.  */
234 #undef SELECT_RTX_SECTION
235 #define SELECT_RTX_SECTION(MODE,RTX)            \
236 {                                               \
237   if (flag_pic && symbolic_operand (RTX, VOIDmode)) \
238     data_section ();                            \
239   else                                          \
240     const_section ();                           \
241 }
242
243 /* This supplements FUNCTION_ARG's definition in i386.h to check
244    TARGET_WARN_PASS_STRUCT */
245
246 #undef  FUNCTION_ARG
247 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
248 ((((MODE) == BLKmode && TARGET_WARN_PASS_STRUCT) ? \
249     warning ("argument is a structure"),0 : 0), \
250     (function_arg (&CUM, MODE, TYPE, NAMED)))
251
252 /* Add .align 1 to avoid .backalign bug in assembler */
253 #undef CONST_SECTION_ASM_OP
254 #define CONST_SECTION_ASM_OP    "\t.section\t.rodata\n\t.align 1"