]>
gcc.gnu.org Git - gcc.git/blob - gcc/config/i386/osfrose.h
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.
5 This file is part of GNU CC.
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)
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.
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. */
21 /* Put leading underscores in front of names. */
22 #define YES_UNDERSCORES
25 #include "i386/gstabs.h"
27 /* Get perform_* macros to build libgcc.a. */
28 #include "i386/perform.h"
32 #undef WORD_SWITCH_TAKES_ARG
33 #define WORD_SWITCH_TAKES_ARG(STR) \
34 (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) || !strcmp (STR, "pic-names"))
36 #define MASK_HALF_PIC 0x40000000 /* Mask for half-pic code */
37 #define MASK_HALF_PIC_DEBUG 0x20000000 /* Debug flag */
38 #define MASK_ELF 0x10000000 /* ELF not rose */
39 #define MASK_NO_IDENT 0x08000000 /* suppress .ident */
40 #define MASK_NO_UNDERSCORES 0x04000000 /* suppress leading _ */
41 #define MASK_LARGE_ALIGN 0x02000000 /* align to >word boundaries */
43 #define TARGET_HALF_PIC (target_flags & MASK_HALF_PIC)
44 #define TARGET_DEBUG (target_flags & MASK_HALF_PIC_DEBUG)
45 #define HALF_PIC_DEBUG TARGET_DEBUG
46 #define TARGET_ELF (target_flags & MASK_ELF)
47 #define TARGET_ROSE ((target_flags & MASK_ELF) == 0)
48 #define TARGET_IDENT ((target_flags & MASK_NO_IDENT) == 0)
49 #define TARGET_UNDERSCORES ((target_flags & MASK_NO_UNDERSCORES) == 0)
50 #define TARGET_LARGE_ALIGN (target_flags & MASK_LARGE_ALIGN)
52 #undef SUBTARGET_SWITCHES
53 #define SUBTARGET_SWITCHES \
54 { "half-pic", MASK_HALF_PIC}, \
55 { "no-half-pic", -MASK_HALF_PIC}, \
56 { "debug-half-pic", MASK_HALF_PIC_DEBUG}, \
57 { "debugb", MASK_HALF_PIC_DEBUG}, \
59 { "rose", -MASK_ELF}, \
60 { "ident", -MASK_NO_IDENT}, \
61 { "no-ident", MASK_NO_IDENT}, \
62 { "underscores", -MASK_NO_UNDERSCORES}, \
63 { "no-underscores", MASK_NO_UNDERSCORES}, \
64 { "no-large-align",-MASK_LARGE_ALIGN}, \
65 { "large-align", MASK_LARGE_ALIGN},
67 /* OSF/rose uses stabs, not dwarf. */
68 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
70 #ifndef DWARF_DEBUGGING_INFO
71 #define DWARF_DEBUGGING_INFO /* enable dwarf debugging for testing */
74 /* Handle #pragma weak and #pragma pack. */
76 #define HANDLE_SYSV_PRAGMA
78 /* Change default predefines. */
80 #define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386)"
85 %{!melf: -D__ROSE__} %{melf: -D__ELF__} \
86 %{mno-underscores: -D__NO_UNDERSCORES__} \
87 %{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
88 %{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
89 %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
90 %{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \
91 %{.C: -D__LANGUAGE_C_PLUS_PLUS} \
92 %{.m: -D__LANGUAGE_OBJECTIVE_C} \
93 %{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
97 %{!melf: -D__ROSE__} %{melf: -D__ELF__} \
98 %{mno-underscores: -D__NO_UNDERSCORES__} \
99 %{melf: %{!munderscores: -D__NO_UNDERSCORES__}} \
100 %{.S: %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
101 %{.S: -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
102 %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
103 %{.cxx: -D__LANGUAGE_C_PLUS_PLUS} \
104 %{.C: -D__LANGUAGE_C_PLUS_PLUS} \
105 %{.m: -D__LANGUAGE_OBJECTIVE_C} \
106 %{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
109 /* Turn on -pic-extern by default. */
111 #ifndef NO_UNDERSCORE
113 %{!melf: %{!mrose: -mrose }} \
114 %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
115 %{!melf: %{pic-none: -mno-half-pic} \
116 %{pic-extern: } %{pic-lib: } %{pic-calls: } %{pic-names*: } \
117 %{!pic-none: -mhalf-pic }}"
121 %{!melf: %{!mrose: -mrose }} \
122 %{melf: %{!munderscores: %{!mno-underscores: -mno-underscores }}} \
123 %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
124 %{!melf: %{pic-none: -mno-half-pic} \
125 %{pic-extern: } %{pic-lib: } %{pic-calls: } %{pic-names*: } \
126 %{!pic-none: -mhalf-pic }}"
130 #define ASM_SPEC "%{v*: -v}"
133 #define LINK_SPEC "%{v*: -v} \
134 %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \
135 %{nostdlib} %{noshrlib} %{glue}"
138 #define LIB_SPEC "-lc"
143 #undef STARTFILE_SPEC
144 #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
146 #undef TARGET_VERSION_INTERNAL
147 #undef TARGET_VERSION
149 #define I386_VERSION " 80386, OSF/rose objects"
151 #define TARGET_VERSION_INTERNAL(STREAM) fputs (I386_VERSION, STREAM)
152 #define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr)
154 #undef MD_EXEC_PREFIX
155 #define MD_EXEC_PREFIX "/usr/ccs/gcc/"
157 #undef MD_STARTFILE_PREFIX
158 #define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
160 /* Specify size_t, ptrdiff_t, and wchar_t types. */
164 #undef WCHAR_TYPE_SIZE
166 #define SIZE_TYPE "long unsigned int"
167 #define PTRDIFF_TYPE "int"
168 #define WCHAR_TYPE "unsigned int"
169 #define WCHAR_TYPE_SIZE BITS_PER_WORD
171 /* Temporarily turn off long double being 96 bits. */
172 #undef LONG_DOUBLE_TYPE_SIZE
174 /* Tell final.c we don't need a label passed to mcount. */
175 #define NO_PROFILE_DATA
177 #undef FUNCTION_PROFILER
178 #define FUNCTION_PROFILER(FILE, LABELNO) fprintf (FILE, "\tcall _mcount\n")
180 /* A C statement or compound statement to output to FILE some
181 assembler code to initialize basic-block profiling for the current
182 object module. This code should call the subroutine
183 `__bb_init_func' once per object module, passing it as its sole
184 argument the address of a block allocated in the object module.
186 The name of the block is a local symbol made with this statement:
188 ASM_GENERATE_INTERNAL_LABEL (BUFFER, "LPBX", 0);
190 Of course, since you are writing the definition of
191 `ASM_GENERATE_INTERNAL_LABEL' as well as that of this macro, you
192 can take a short cut in the definition of this macro and use the
193 name that you know will result.
195 The first word of this block is a flag which will be nonzero if the
196 object module has already been initialized. So test this word
197 first, and do not call `__bb_init_func' if the flag is nonzero. */
199 #undef FUNCTION_BLOCK_PROFILER
200 #define FUNCTION_BLOCK_PROFILER(STREAM, LABELNO) \
205 fprintf (STREAM, "\tcmpl $0,%sPBX0\n", LPREFIX); \
206 fprintf (STREAM, "\tjne 0f\n"); \
207 fprintf (STREAM, "\tpushl $%sPBX0\n", LPREFIX); \
208 fprintf (STREAM, "\tcall %s__bb_init_func\n", \
209 (TARGET_UNDERSCORES) ? "_" : ""); \
210 fprintf (STREAM, "0:\n"); \
214 fprintf (STREAM, "\tpushl %eax\n"); \
215 fprintf (STREAM, "\tmovl %sPBX0@GOT(%ebx),%eax\n"); \
216 fprintf (STREAM, "\tcmpl $0,(%eax)\n"); \
217 fprintf (STREAM, "\tjne 0f\n"); \
218 fprintf (STREAM, "\tpushl %eax\n"); \
219 fprintf (STREAM, "\tcall %s__bb_init_func@PLT\n", \
220 (TARGET_UNDERSCORES) ? "_" : ""); \
221 fprintf (STREAM, "0:\n"); \
222 fprintf (STREAM, "\tpopl %eax\n"); \
227 /* A C statement or compound statement to increment the count
228 associated with the basic block number BLOCKNO. Basic blocks are
229 numbered separately from zero within each compilation. The count
230 associated with block number BLOCKNO is at index BLOCKNO in a
231 vector of words; the name of this array is a local symbol made
234 ASM_GENERATE_INTERNAL_LABEL (BUFFER, "LPBX", 2);
236 Of course, since you are writing the definition of
237 `ASM_GENERATE_INTERNAL_LABEL' as well as that of this macro, you
238 can take a short cut in the definition of this macro and use the
239 name that you know will result. */
241 #undef BLOCK_PROFILER
242 #define BLOCK_PROFILER(STREAM, BLOCKNO) \
246 fprintf (STREAM, "\tincl %sPBX2+%d\n", LPREFIX, (BLOCKNO)*4); \
249 fprintf (STREAM, "\tpushl %eax\n"); \
250 fprintf (STREAM, "\tmovl %sPBX2@GOT(%ebx),%eax\n", LPREFIX); \
251 fprintf (STREAM, "\tincl %d(%eax)\n", (BLOCKNO)*4); \
252 fprintf (STREAM, "\tpopl %eax\n"); \
257 /* A C function or functions which are needed in the library to
258 support block profiling. When support goes into libc, undo
262 #undef BLOCK_PROFILING_CODE
263 #define BLOCK_PROFILING_CODE
266 /* Prefix for internally generated assembler labels. If we aren't using
267 underscores, we are using prefix `.'s to identify labels that should
268 be ignored, as in `i386/gas.h' --karl@cs.umb.edu */
270 #define LPREFIX ((TARGET_UNDERSCORES) ? "L" : ".L")
272 /* This is how to store into the string BUF
273 the symbol_ref name of an internal numbered label where
274 PREFIX is the class of label and NUM is the number within the class.
275 This is suitable for output with `assemble_name'. */
277 #undef ASM_GENERATE_INTERNAL_LABEL
278 #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
279 sprintf ((BUF), "*%s%s%d", (TARGET_UNDERSCORES) ? "" : ".", \
282 /* This is how to output an internal numbered label where
283 PREFIX is the class of label and NUM is the number within the class. */
285 #undef ASM_OUTPUT_INTERNAL_LABEL
286 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
287 fprintf (FILE, "%s%s%d:\n", (TARGET_UNDERSCORES) ? "" : ".", \
290 /* This is how to output a reference to a user-level label named NAME. */
292 #undef ASM_OUTPUT_LABELREF
293 #define ASM_OUTPUT_LABELREF(FILE,NAME) \
294 fprintf (FILE, "%s%s", (TARGET_UNDERSCORES) ? "_" : "", NAME)
296 /* A C expression to output text to align the location counter in the
297 way that is desirable at a point in the code that is reached only
300 This macro need not be defined if you don't want any special
301 alignment to be done at such a time. Most machine descriptions do
302 not currently define the macro. */
304 #undef ASM_OUTPUT_ALIGN_CODE
305 #define ASM_OUTPUT_ALIGN_CODE(STREAM) \
306 fprintf (STREAM, "\t.align\t%d\n", \
307 (TARGET_486 && TARGET_LARGE_ALIGN) ? 4 : 2)
309 /* A C expression to output text to align the location counter in the
310 way that is desirable at the beginning of a loop.
312 This macro need not be defined if you don't want any special
313 alignment to be done at such a time. Most machine descriptions do
314 not currently define the macro. */
316 #undef ASM_OUTPUT_LOOP_ALIGN
317 #define ASM_OUTPUT_LOOP_ALIGN(STREAM) \
318 fprintf (STREAM, "\t.align\t2\n")
320 /* A C statement to output to the stdio stream STREAM an assembler
321 command to advance the location counter to a multiple of 2 to the
322 POWER bytes. POWER will be a C expression of type `int'. */
324 #undef ASM_OUTPUT_ALIGN
325 #define ASM_OUTPUT_ALIGN(STREAM, POWER) \
326 fprintf (STREAM, "\t.align\t%d\n", \
327 (!TARGET_LARGE_ALIGN && (POWER) > 2) ? 2 : (POWER))
329 /* A C expression that is 1 if the RTX X is a constant which is a
330 valid address. On most machines, this can be defined as
331 `CONSTANT_P (X)', but a few machines are more restrictive in
332 which constant addresses are supported.
334 `CONSTANT_P' accepts integer-values expressions whose values are
335 not explicitly known, such as `symbol_ref', `label_ref', and
336 `high' expressions and `const' arithmetic expressions, in
337 addition to `const_int' and `const_double' expressions. */
339 #define CONSTANT_ADDRESS_P_ORIG(X) \
340 (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
341 || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
342 || GET_CODE (X) == HIGH)
344 #undef CONSTANT_ADDRESS_P
345 #define CONSTANT_ADDRESS_P(X) \
346 ((CONSTANT_ADDRESS_P_ORIG (X)) && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X)))
348 /* Nonzero if the constant value X is a legitimate general operand.
349 It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
351 #undef LEGITIMATE_CONSTANT_P
352 #define LEGITIMATE_CONSTANT_P(X) \
354 || GET_CODE (X) == CONST_DOUBLE \
355 || GET_CODE (X) == CONST_INT \
356 || !HALF_PIC_ADDRESS_P (X))
358 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
359 that is a valid memory address for an instruction.
360 The MODE argument is the machine mode for the MEM expression
361 that wants to use this address. */
363 #define GO_IF_LEGITIMATE_ADDRESS_ORIG(MODE, X, ADDR) \
365 if (CONSTANT_ADDRESS_P (X) \
366 && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (X))) \
368 GO_IF_INDEXING (X, ADDR); \
369 if (GET_CODE (X) == PLUS && CONSTANT_ADDRESS_P (XEXP (X, 1))) \
371 rtx x0 = XEXP (X, 0); \
372 if (! flag_pic || ! SYMBOLIC_CONST (XEXP (X, 1))) \
373 { GO_IF_INDEXING (x0, ADDR); } \
374 else if (x0 == pic_offset_table_rtx) \
376 else if (GET_CODE (x0) == PLUS) \
378 if (XEXP (x0, 0) == pic_offset_table_rtx) \
379 { GO_IF_INDEXABLE_BASE (XEXP (x0, 1), ADDR); } \
380 if (XEXP (x0, 1) == pic_offset_table_rtx) \
381 { GO_IF_INDEXABLE_BASE (XEXP (x0, 0), ADDR); } \
386 #undef GO_IF_LEGITIMATE_ADDRESS
387 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
389 if (! HALF_PIC_P ()) \
391 GO_IF_LEGITIMATE_ADDRESS_ORIG(MODE, X, ADDR); \
395 if (CONSTANT_P (X) && ! HALF_PIC_ADDRESS_P (X)) \
398 GO_IF_INDEXING (X, ADDR); \
399 if (GET_CODE (X) == PLUS) \
401 rtx x1 = XEXP (X, 1); \
403 if (CONSTANT_P (x1) && ! HALF_PIC_ADDRESS_P (x1)) \
405 rtx x0 = XEXP (X, 0); \
406 GO_IF_INDEXING (x0, ADDR); \
412 /* Sometimes certain combinations of command options do not make sense
413 on a particular target machine. You can define a macro
414 `OVERRIDE_OPTIONS' to take account of this. This macro, if
415 defined, is executed once just after all the command options have
418 #undef SUBTARGET_OVERRIDE_OPTIONS
419 #define SUBTARGET_OVERRIDE_OPTIONS \
422 if (TARGET_ELF && TARGET_HALF_PIC) \
424 target_flags &= ~MASK_HALF_PIC; \
429 if (TARGET_ROSE && flag_pic) \
431 target_flags |= MASK_HALF_PIC; \
435 if (TARGET_HALF_PIC) \
439 /* Define this macro if references to a symbol must be treated
440 differently depending on something about the variable or
441 function named by the symbol (such as what section it is in).
443 The macro definition, if any, is executed immediately after the
444 rtl for DECL has been created and stored in `DECL_RTL (DECL)'.
445 The value of the rtl will be a `mem' whose address is a
448 The usual thing for this macro to do is to a flag in the
449 `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
450 name string in the `symbol_ref' (if one bit is not enough
453 The best way to modify the name string is by adding text to the
454 beginning, with suitable punctuation to prevent any ambiguity.
455 Allocate the new name in `saveable_obstack'. You will have to
456 modify `ASM_OUTPUT_LABELREF' to remove and decode the added text
457 and output the name accordingly.
459 You can also check the information stored in the `symbol_ref' in
460 the definition of `GO_IF_LEGITIMATE_ADDRESS' or
461 `PRINT_OPERAND_ADDRESS'. */
463 #undef ENCODE_SECTION_INFO
464 #define ENCODE_SECTION_INFO(DECL) \
468 HALF_PIC_ENCODE (DECL); \
473 /* On most machines, read-only variables, constants, and jump tables
474 are placed in the text section. If this is not the case on your
475 machine, this macro should be defined to be the name of a function
476 (either `data_section' or a function defined in `EXTRA_SECTIONS')
477 that switches to the section to be used for read-only items.
479 If these items should be placed in the text section, this macro
480 should not be defined. */
483 #undef READONLY_DATA_SECTION
484 #define READONLY_DATA_SECTION() \
489 if (in_section != in_rodata) \
491 fprintf (asm_out_file, "\t.section \"rodata\"\n"); \
492 in_section = in_rodata; \
501 /* A list of names for sections other than the standard two, which are
502 `in_text' and `in_data'. You need not define this macro on a
503 system with no other sections (that GCC needs to use). */
505 #undef EXTRA_SECTIONS
506 #define EXTRA_SECTIONS in_rodata, in_data1
508 /* Given a decl node or constant node, choose the section to output it in
509 and select that section. */
511 #undef SELECT_RTX_SECTION
512 #define SELECT_RTX_SECTION(MODE, RTX) \
515 if (MODE == Pmode && HALF_PIC_P () && HALF_PIC_ADDRESS_P (RTX)) \
518 readonly_data_section (); \
522 #undef SELECT_SECTION
523 #define SELECT_SECTION(DECL, RELOC) \
525 if (RELOC && HALF_PIC_P ()) \
528 else if (TREE_CODE (DECL) == STRING_CST) \
530 if (flag_writable_strings) \
533 readonly_data_section (); \
536 else if (TREE_CODE (DECL) != VAR_DECL) \
537 readonly_data_section (); \
539 else if (!TREE_READONLY (DECL)) \
543 readonly_data_section (); \
547 /* Define the strings used for the special svr4 .type and .size directives.
548 These strings generally do not vary from one system running svr4 to
549 another, but if a given system (e.g. m88k running svr) needs to use
550 different pseudo-op names for these, they may be overridden in the
551 file which includes this one. */
553 #define TYPE_ASM_OP ".type"
554 #define SIZE_ASM_OP ".size"
555 #define WEAK_ASM_OP ".weak"
557 /* The following macro defines the format used to output the second
558 operand of the .type assembler directive. Different svr4 assemblers
559 expect various different forms for this operand. The one given here
560 is just a default. You may need to override it in your machine-
561 specific tm.h file (depending upon the particulars of your assembler). */
563 #define TYPE_OPERAND_FMT "@%s"
565 /* A C statement (sans semicolon) to output to the stdio stream
566 STREAM any text necessary for declaring the name NAME of an
567 initialized variable which is being defined. This macro must
568 output the label definition (perhaps using `ASM_OUTPUT_LABEL').
569 The argument DECL is the `VAR_DECL' tree node representing the
572 If this macro is not defined, then the variable name is defined
573 in the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */
575 #undef ASM_DECLARE_OBJECT_NAME
576 #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
579 ASM_OUTPUT_LABEL(STREAM,NAME); \
580 HALF_PIC_DECLARE (NAME); \
583 fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP); \
584 assemble_name (STREAM, NAME); \
585 putc (',', STREAM); \
586 fprintf (STREAM, TYPE_OPERAND_FMT, "object"); \
587 putc ('\n', STREAM); \
588 if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
590 fprintf (STREAM, "\t%s\t ", SIZE_ASM_OP); \
591 assemble_name (STREAM, NAME); \
592 fprintf (STREAM, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
598 /* This is how to declare a function name. */
600 #undef ASM_DECLARE_FUNCTION_NAME
601 #define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \
604 ASM_OUTPUT_LABEL(STREAM,NAME); \
605 HALF_PIC_DECLARE (NAME); \
608 fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP); \
609 assemble_name (STREAM, NAME); \
610 putc (',', STREAM); \
611 fprintf (STREAM, TYPE_OPERAND_FMT, "function"); \
612 putc ('\n', STREAM); \
613 ASM_DECLARE_RESULT (STREAM, DECL_RESULT (DECL)); \
618 /* Write the extra assembler code needed to declare a function's result.
619 Most svr4 assemblers don't require any special declaration of the
620 result value, but there are exceptions. */
622 #ifndef ASM_DECLARE_RESULT
623 #define ASM_DECLARE_RESULT(FILE, RESULT)
626 /* This is how to declare the size of a function. */
628 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
631 if (TARGET_ELF && !flag_inhibit_size_directive) \
634 static int labelno; \
636 ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
637 ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
638 fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
639 assemble_name (FILE, (FNAME)); \
640 fprintf (FILE, ","); \
641 assemble_name (FILE, label); \
642 fprintf (FILE, "-"); \
643 assemble_name (FILE, (FNAME)); \
649 /* Attach a special .ident directive to the end of the file to identify
650 the version of GCC which compiled this code. The format of the
651 .ident string is patterned after the ones produced by native svr4
654 #define IDENT_ASM_OP ".ident"
656 /* Allow #sccs in preprocessor. */
658 #define SCCS_DIRECTIVE
660 /* This says what to print at the end of the assembly file */
661 #define ASM_FILE_END(STREAM) \
665 HALF_PIC_FINISH (STREAM); \
669 char *fstart = main_input_filename; \
673 fstart = "<no file>"; \
675 fname = fstart + strlen (fstart) - 1; \
676 while (fname > fstart && *fname != '/') \
682 fprintf ((STREAM), "\t%s\t\"GCC: (GNU) %s %s -O%d", \
683 IDENT_ASM_OP, version_string, fname, optimize); \
685 if (write_symbols == PREFERRED_DEBUGGING_TYPE) \
686 fprintf ((STREAM), " -g%d", (int)debug_info_level); \
688 else if (write_symbols == DBX_DEBUG) \
689 fprintf ((STREAM), " -gstabs%d", (int)debug_info_level); \
691 else if (write_symbols == DWARF_DEBUG) \
692 fprintf ((STREAM), " -gdwarf%d", (int)debug_info_level); \
694 else if (write_symbols != NO_DEBUG) \
695 fprintf ((STREAM), " -g??%d", (int)debug_info_level); \
697 if (flag_omit_frame_pointer) \
698 fprintf ((STREAM), " -fomit-frame-pointer"); \
700 if (flag_strength_reduce) \
701 fprintf ((STREAM), " -fstrength-reduce"); \
703 if (flag_unroll_loops) \
704 fprintf ((STREAM), " -funroll-loops"); \
706 if (flag_force_mem) \
707 fprintf ((STREAM), " -fforce-mem"); \
709 if (flag_force_addr) \
710 fprintf ((STREAM), " -fforce-addr"); \
712 if (flag_inline_functions) \
713 fprintf ((STREAM), " -finline-functions"); \
715 if (flag_caller_saves) \
716 fprintf ((STREAM), " -fcaller-saves"); \
719 fprintf ((STREAM), (flag_pic > 1) ? " -fPIC" : " -fpic"); \
721 if (flag_inhibit_size_directive) \
722 fprintf ((STREAM), " -finhibit-size-directive"); \
724 if (flag_gnu_linker) \
725 fprintf ((STREAM), " -fgnu-linker"); \
728 fprintf ((STREAM), " -p"); \
730 if (profile_block_flag) \
731 fprintf ((STREAM), " -a"); \
733 if (TARGET_IEEE_FP) \
734 fprintf ((STREAM), " -mieee-fp"); \
736 if (TARGET_HALF_PIC) \
737 fprintf ((STREAM), " -mhalf-pic"); \
739 fprintf ((STREAM), (TARGET_486) ? " -m486" : " -m386"); \
740 fprintf ((STREAM), (TARGET_ELF) ? " -melf\"\n" : " -mrose\"\n"); \
745 /* Tell collect that the object format is OSF/rose. */
746 #define OBJECT_FORMAT_ROSE
748 /* Tell collect where the appropriate binaries are. */
749 #define REAL_LD_FILE_NAME "/usr/ccs/gcc/gld"
750 #define REAL_NM_FILE_NAME "/usr/ccs/bin/nm"
751 #define REAL_STRIP_FILE_NAME "/usr/ccs/bin/strip"
753 /* Use atexit for static constructors/destructors, instead of defining
754 our own exit function. */
757 /* Define this macro meaning that gcc should find the library 'libgcc.a'
758 by hand, rather than passing the argument '-lgcc' to tell the linker
760 #define LINK_LIBGCC_SPECIAL
762 /* A C statement to output assembler commands which will identify the object
763 file as having been compile with GNU CC. We don't need or want this for
764 OSF1. GDB doesn't need it and kdb doesn't like it */
765 #define ASM_IDENTIFY_GCC(FILE)
767 /* Identify the front-end which produced this file. To keep symbol
768 space down, and not confuse kdb, only do this if the language is
771 #define ASM_IDENTIFY_LANGUAGE(STREAM) \
773 if (strcmp (lang_identify (), "c") != 0) \
774 output_lang_identify (STREAM); \
777 /* This is how to output an assembler line defining a `double' constant.
778 Use "word" pseudos to avoid printing NaNs, infinity, etc. */
780 /* This is how to output an assembler line defining a `double' constant. */
782 #undef ASM_OUTPUT_DOUBLE
784 #ifndef CROSS_COMPILE
785 #define ASM_OUTPUT_DOUBLE(STREAM, VALUE) \
788 long value_long[2]; \
789 REAL_VALUE_TO_TARGET_DOUBLE (VALUE, value_long); \
791 fprintf (STREAM, "\t.long\t0x%08lx\t\t# %.20g\n\t.long\t0x%08lx\n", \
792 value_long[0], VALUE, value_long[1]); \
797 #define ASM_OUTPUT_DOUBLE(STREAM, VALUE) \
798 fprintf (STREAM, "\t.double\t%.20g\n", VALUE)
801 /* This is how to output an assembler line defining a `float' constant. */
803 #undef ASM_OUTPUT_FLOAT
805 #ifndef CROSS_COMPILE
806 #define ASM_OUTPUT_FLOAT(STREAM, VALUE) \
810 REAL_VALUE_TO_TARGET_SINGLE (VALUE, value_long); \
812 fprintf (STREAM, "\t.long\t0x%08lx\t\t# %.12g (float)\n", \
813 value_long, VALUE); \
818 #define ASM_OUTPUT_FLOAT(STREAM, VALUE) \
819 fprintf (STREAM, "\t.float\t%.12g\n", VALUE)
823 /* Generate calls to memcpy, etc., not bcopy, etc. */
824 #define TARGET_MEM_FUNCTIONS
826 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
827 we want to retain compatibility with older gcc versions. */
828 #define DEFAULT_PCC_STRUCT_RETURN 0
830 /* Map i386 registers to the numbers dwarf expects. Of course this is different
831 from what stabs expects. */
833 #define DWARF_DBX_REGISTER_NUMBER(n) \
842 : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \
845 /* Now what stabs expects in the register. */
846 #define STABS_DBX_REGISTER_NUMBER(n) \
857 #undef DBX_REGISTER_NUMBER
858 #define DBX_REGISTER_NUMBER(n) ((write_symbols == DWARF_DEBUG) \
859 ? DWARF_DBX_REGISTER_NUMBER(n) \
860 : STABS_DBX_REGISTER_NUMBER(n))
This page took 0.104295 seconds and 6 git commands to generate.