1/* Definitions for Intel 386 running FreeBSD with either a.out or ELF format 2 Copyright (C) 1996 Free Software Foundation, Inc. 3 Contributed by Eric Youngdale. 4 Modified for stabs-in-ELF by H.J. Lu. 5 Adapted from GNU/Linux version by John Polstra. 6 Added support for generating "old a.out gas" on the fly by Peter Wemm.
| 1/* Definitions for Intel 386 running FreeBSD with either a.out or ELF format 2 Copyright (C) 1996 Free Software Foundation, Inc. 3 Contributed by Eric Youngdale. 4 Modified for stabs-in-ELF by H.J. Lu. 5 Adapted from GNU/Linux version by John Polstra. 6 Added support for generating "old a.out gas" on the fly by Peter Wemm.
|
| 7 Continued development by David O'Brien <obrien@freebsd.org>
|
7 8This file is part of GNU CC. 9 10GNU CC is free software; you can redistribute it and/or modify 11it under the terms of the GNU General Public License as published by 12the Free Software Foundation; either version 2, or (at your option) 13any later version. 14 15GNU CC is distributed in the hope that it will be useful, 16but WITHOUT ANY WARRANTY; without even the implied warranty of 17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18GNU General Public License for more details. 19 20You should have received a copy of the GNU General Public License 21along with GNU CC; see the file COPYING. If not, write to 22the Free Software Foundation, 59 Temple Place - Suite 330, 23Boston, MA 02111-1307, USA. */ 24
| 8 9This file is part of GNU CC. 10 11GNU CC is free software; you can redistribute it and/or modify 12it under the terms of the GNU General Public License as published by 13the Free Software Foundation; either version 2, or (at your option) 14any later version. 15 16GNU CC is distributed in the hope that it will be useful, 17but WITHOUT ANY WARRANTY; without even the implied warranty of 18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19GNU General Public License for more details. 20 21You should have received a copy of the GNU General Public License 22along with GNU CC; see the file COPYING. If not, write to 23the Free Software Foundation, 59 Temple Place - Suite 330, 24Boston, MA 02111-1307, USA. */ 25
|
25/* $FreeBSD: head/contrib/gcc/config/i386/freebsd.h 52111 1999-10-10 22:17:24Z obrien $ */
| 26/* $FreeBSD: head/contrib/gcc/config/i386/freebsd.h 52112 1999-10-10 22:33:40Z obrien $ */
|
26 27 28#undef TARGET_VERSION 29#define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)"); 30 31#define MASK_PROFILER_EPILOGUE 010000000000 32#define MASK_AOUT 004000000000 /* a.out not elf */ 33#define MASK_UNDERSCORES 002000000000 /* use leading _ */ 34 35#define TARGET_PROFILER_EPILOGUE (target_flags & MASK_PROFILER_EPILOGUE) 36#define TARGET_AOUT (target_flags & MASK_AOUT) 37#define TARGET_ELF ((target_flags & MASK_AOUT) == 0) 38#define TARGET_UNDERSCORES ((target_flags & MASK_UNDERSCORES) != 0) 39 40#undef SUBTARGET_SWITCHES
| 27 28 29#undef TARGET_VERSION 30#define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)"); 31 32#define MASK_PROFILER_EPILOGUE 010000000000 33#define MASK_AOUT 004000000000 /* a.out not elf */ 34#define MASK_UNDERSCORES 002000000000 /* use leading _ */ 35 36#define TARGET_PROFILER_EPILOGUE (target_flags & MASK_PROFILER_EPILOGUE) 37#define TARGET_AOUT (target_flags & MASK_AOUT) 38#define TARGET_ELF ((target_flags & MASK_AOUT) == 0) 39#define TARGET_UNDERSCORES ((target_flags & MASK_UNDERSCORES) != 0) 40 41#undef SUBTARGET_SWITCHES
|
41#define SUBTARGET_SWITCHES \ 42 { "profiler-epilogue", MASK_PROFILER_EPILOGUE}, \ 43 { "no-profiler-epilogue", -MASK_PROFILER_EPILOGUE}, \ 44 { "aout", MASK_AOUT}, \ 45 { "no-aout", -MASK_AOUT}, \ 46 { "underscores", MASK_UNDERSCORES}, \
| 42#define SUBTARGET_SWITCHES \ 43 { "profiler-epilogue", MASK_PROFILER_EPILOGUE}, \ 44 { "no-profiler-epilogue", -MASK_PROFILER_EPILOGUE}, \ 45 { "aout", MASK_AOUT}, \ 46 { "no-aout", -MASK_AOUT}, \ 47 { "underscores", MASK_UNDERSCORES}, \
|
47 { "no-underscores", -MASK_UNDERSCORES}, 48 49/* Prefix for internally generated assembler labels. If we aren't using 50 underscores, we are using prefix `.'s to identify labels that should 51 be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ 52#undef LPREFIX 53#define LPREFIX ((TARGET_UNDERSCORES) ? "L" : ".L") 54 55/* Override the default comment-starter of "/". */ 56#undef ASM_COMMENT_START 57#define ASM_COMMENT_START "#" 58 59#undef ASM_APP_ON 60#define ASM_APP_ON "#APP\n" 61 62#undef ASM_APP_OFF 63#define ASM_APP_OFF "#NO_APP\n" 64
| 48 { "no-underscores", -MASK_UNDERSCORES}, 49 50/* Prefix for internally generated assembler labels. If we aren't using 51 underscores, we are using prefix `.'s to identify labels that should 52 be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ 53#undef LPREFIX 54#define LPREFIX ((TARGET_UNDERSCORES) ? "L" : ".L") 55 56/* Override the default comment-starter of "/". */ 57#undef ASM_COMMENT_START 58#define ASM_COMMENT_START "#" 59 60#undef ASM_APP_ON 61#define ASM_APP_ON "#APP\n" 62 63#undef ASM_APP_OFF 64#define ASM_APP_OFF "#NO_APP\n" 65
|
| 66#undef SET_ASM_OP
|
65#define SET_ASM_OP ".set" 66 67/* Output at beginning of assembler file. */ 68/* The .file command should always begin the output. */ 69 70#undef ASM_FILE_START 71#define ASM_FILE_START(FILE) \ 72 do { \
| 67#define SET_ASM_OP ".set" 68 69/* Output at beginning of assembler file. */ 70/* The .file command should always begin the output. */ 71 72#undef ASM_FILE_START 73#define ASM_FILE_START(FILE) \ 74 do { \
|
73 output_file_directive (FILE, main_input_filename); \
| 75 output_file_directive ((FILE), main_input_filename); \
|
74 if (TARGET_ELF) \
| 76 if (TARGET_ELF) \
|
75 fprintf (FILE, "\t.version\t\"01.01\"\n"); \
| 77 fprintf ((FILE), "\t.version\t\"01.01\"\n"); \
|
76 } while (0) 77 78/* Identify the front-end which produced this file. To keep symbol 79 space down, and not confuse kdb, only do this if the language is 80 not C. (svr4.h defines ASM_IDENTIFY_GCC but neglects this) */ 81#undef ASM_IDENTIFY_LANGUAGE 82#define ASM_IDENTIFY_LANGUAGE(STREAM) \ 83{ \ 84 if (strcmp (lang_identify (), "c") != 0) \ 85 output_lang_identify (STREAM); \ 86} 87 88/* This is how to store into the string BUF 89 the symbol_ref name of an internal numbered label where 90 PREFIX is the class of label and NUM is the number within the class. 91 This is suitable for output with `assemble_name'. */ 92#undef ASM_GENERATE_INTERNAL_LABEL 93#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ 94 sprintf ((BUF), "*%s%s%d", (TARGET_UNDERSCORES) ? "" : ".", \ 95 (PREFIX), (NUMBER)) 96 97/* This is how to output an internal numbered label where 98 PREFIX is the class of label and NUM is the number within the class. */ 99#undef ASM_OUTPUT_INTERNAL_LABEL 100#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
| 78 } while (0) 79 80/* Identify the front-end which produced this file. To keep symbol 81 space down, and not confuse kdb, only do this if the language is 82 not C. (svr4.h defines ASM_IDENTIFY_GCC but neglects this) */ 83#undef ASM_IDENTIFY_LANGUAGE 84#define ASM_IDENTIFY_LANGUAGE(STREAM) \ 85{ \ 86 if (strcmp (lang_identify (), "c") != 0) \ 87 output_lang_identify (STREAM); \ 88} 89 90/* This is how to store into the string BUF 91 the symbol_ref name of an internal numbered label where 92 PREFIX is the class of label and NUM is the number within the class. 93 This is suitable for output with `assemble_name'. */ 94#undef ASM_GENERATE_INTERNAL_LABEL 95#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ 96 sprintf ((BUF), "*%s%s%d", (TARGET_UNDERSCORES) ? "" : ".", \ 97 (PREFIX), (NUMBER)) 98 99/* This is how to output an internal numbered label where 100 PREFIX is the class of label and NUM is the number within the class. */ 101#undef ASM_OUTPUT_INTERNAL_LABEL 102#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
|
101 fprintf (FILE, "%s%s%d:\n", (TARGET_UNDERSCORES) ? "" : ".", \ 102 PREFIX, NUM)
| 103 fprintf ((FILE), "%s%s%d:\n", (TARGET_UNDERSCORES) ? "" : ".", \ 104 (PREFIX), (NUM))
|
103 104/* This is how to output a reference to a user-level label named NAME. */ 105#undef ASM_OUTPUT_LABELREF
| 105 106/* This is how to output a reference to a user-level label named NAME. */ 107#undef ASM_OUTPUT_LABELREF
|
106#define ASM_OUTPUT_LABELREF(FILE,NAME) \ 107 fprintf (FILE, "%s%s", (TARGET_UNDERSCORES) ? "_" : "", NAME)
| 108#define ASM_OUTPUT_LABELREF(FILE, NAME) \ 109 fprintf ((FILE), "%s%s", (TARGET_UNDERSCORES) ? "_" : "", (NAME))
|
108 109 110/* This is how to output an element of a case-vector that is relative. 111 This is only used for PIC code. See comments by the `casesi' insn in 112 i386.md for an explanation of the expression this outputs. */ 113#undef ASM_OUTPUT_ADDR_DIFF_ELT 114#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
| 110 111 112/* This is how to output an element of a case-vector that is relative. 113 This is only used for PIC code. See comments by the `casesi' insn in 114 i386.md for an explanation of the expression this outputs. */ 115#undef ASM_OUTPUT_ADDR_DIFF_ELT 116#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
|
115 fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
| 117 fprintf ((FILE), "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, (VALUE))
|
116 117#undef ASM_OUTPUT_ALIGN
| 118 119#undef ASM_OUTPUT_ALIGN
|
118#define ASM_OUTPUT_ALIGN(FILE,LOG) \
| 120#define ASM_OUTPUT_ALIGN(FILE, LOG) \
|
119 if ((LOG)!=0) { \ 120 if (in_text_section()) \ 121 fprintf ((FILE), "\t.p2align %d,0x90\n", (LOG)); \ 122 else \ 123 fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 124 } 125 126/* conditionalize the use of ".section rodata" on elf mode - otherwise .text */ 127#undef USE_CONST_SECTION 128#define USE_CONST_SECTION TARGET_ELF 129 130/* The a.out tools do not support "linkonce" sections. */
| 121 if ((LOG)!=0) { \ 122 if (in_text_section()) \ 123 fprintf ((FILE), "\t.p2align %d,0x90\n", (LOG)); \ 124 else \ 125 fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 126 } 127 128/* conditionalize the use of ".section rodata" on elf mode - otherwise .text */ 129#undef USE_CONST_SECTION 130#define USE_CONST_SECTION TARGET_ELF 131 132/* The a.out tools do not support "linkonce" sections. */
|
| 133#undef SUPPORTS_ONE_ONLY
|
131#define SUPPORTS_ONE_ONLY TARGET_ELF 132 133/* The a.out tools do not support "Lscope" .stabs symbols. */
| 134#define SUPPORTS_ONE_ONLY TARGET_ELF 135 136/* The a.out tools do not support "Lscope" .stabs symbols. */
|
| 137#undef NO_DBX_FUNCTION_END
|
134#define NO_DBX_FUNCTION_END TARGET_AOUT 135 136/* A C statement (sans semicolon) to output an element in the table of 137 global constructors. */ 138#undef ASM_OUTPUT_CONSTRUCTOR
| 138#define NO_DBX_FUNCTION_END TARGET_AOUT 139 140/* A C statement (sans semicolon) to output an element in the table of 141 global constructors. */ 142#undef ASM_OUTPUT_CONSTRUCTOR
|
139#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
| 143#define ASM_OUTPUT_CONSTRUCTOR(FILE, NAME) \
|
140 do { \ 141 if (TARGET_ELF) { \ 142 ctors_section (); \
| 144 do { \ 145 if (TARGET_ELF) { \ 146 ctors_section (); \
|
143 fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ 144 assemble_name (FILE, NAME); \ 145 fprintf (FILE, "\n"); \
| 147 fprintf ((FILE), "\t%s\t ", INT_ASM_OP); \ 148 assemble_name ((FILE), (NAME)); \ 149 fprintf ((FILE), "\n"); \
|
146 } else { \ 147 fprintf (asm_out_file, "%s \"%s__CTOR_LIST__\",22,0,0,", ASM_STABS_OP, \ 148 (TARGET_UNDERSCORES) ? "_" : ""); \ 149 assemble_name (asm_out_file, name); \ 150 fputc ('\n', asm_out_file); \ 151 } \ 152 } while (0) 153 154/* A C statement (sans semicolon) to output an element in the table of 155 global destructors. */ 156#undef ASM_OUTPUT_DESTRUCTOR
| 150 } else { \ 151 fprintf (asm_out_file, "%s \"%s__CTOR_LIST__\",22,0,0,", ASM_STABS_OP, \ 152 (TARGET_UNDERSCORES) ? "_" : ""); \ 153 assemble_name (asm_out_file, name); \ 154 fputc ('\n', asm_out_file); \ 155 } \ 156 } while (0) 157 158/* A C statement (sans semicolon) to output an element in the table of 159 global destructors. */ 160#undef ASM_OUTPUT_DESTRUCTOR
|
157#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
| 161#define ASM_OUTPUT_DESTRUCTOR(FILE, NAME) \
|
158 do { \ 159 if (TARGET_ELF) { \ 160 dtors_section (); \
| 162 do { \ 163 if (TARGET_ELF) { \ 164 dtors_section (); \
|
161 fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ 162 assemble_name (FILE, NAME); \ 163 fprintf (FILE, "\n"); \
| 165 fprintf ((FILE), "\t%s\t ", INT_ASM_OP); \ 166 assemble_name ((FILE), (NAME)); \ 167 fprintf ((FILE), "\n"); \
|
164 } else { \ 165 fprintf (asm_out_file, "%s \"%s__DTOR_LIST__\",22,0,0,", ASM_STABS_OP, \ 166 (TARGET_UNDERSCORES) ? "_" : ""); \ 167 assemble_name (asm_out_file, name); \ 168 fputc ('\n', asm_out_file); \ 169 } \ 170 } while (0) 171 172/* This says how to output assembler code to declare an 173 uninitialized internal linkage data object. Under SVR4, 174 the linker seems to want the alignment of data objects 175 to depend on their types. We do exactly that here. */ 176 177#undef ASM_OUTPUT_ALIGNED_LOCAL 178#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ 179do { \ 180 if (TARGET_ELF) { \ 181 fprintf ((FILE), "\t%s\t", LOCAL_ASM_OP); \ 182 assemble_name ((FILE), (NAME)); \ 183 fprintf ((FILE), "\n"); \
| 168 } else { \ 169 fprintf (asm_out_file, "%s \"%s__DTOR_LIST__\",22,0,0,", ASM_STABS_OP, \ 170 (TARGET_UNDERSCORES) ? "_" : ""); \ 171 assemble_name (asm_out_file, name); \ 172 fputc ('\n', asm_out_file); \ 173 } \ 174 } while (0) 175 176/* This says how to output assembler code to declare an 177 uninitialized internal linkage data object. Under SVR4, 178 the linker seems to want the alignment of data objects 179 to depend on their types. We do exactly that here. */ 180 181#undef ASM_OUTPUT_ALIGNED_LOCAL 182#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ 183do { \ 184 if (TARGET_ELF) { \ 185 fprintf ((FILE), "\t%s\t", LOCAL_ASM_OP); \ 186 assemble_name ((FILE), (NAME)); \ 187 fprintf ((FILE), "\n"); \
|
184 ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \
| 188 ASM_OUTPUT_ALIGNED_COMMON ((FILE), (NAME), (SIZE), (ALIGN)); \
|
185 } else { \ 186 int rounded = (SIZE); \ 187 if (rounded == 0) rounded = 1; \ 188 rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1; \ 189 rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) \ 190 * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); \ 191 fputs (".lcomm ", (FILE)); \ 192 assemble_name ((FILE), (NAME)); \ 193 fprintf ((FILE), ",%u\n", (rounded)); \ 194 } \ 195} while (0) 196 197#undef ASM_OUTPUT_ALIGNED_COMMON 198#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ 199do { \ 200 if (TARGET_ELF) { \ 201 fprintf ((FILE), "\t%s\t", COMMON_ASM_OP); \ 202 assemble_name ((FILE), (NAME)); \ 203 fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ 204 } else { \ 205 int rounded = (SIZE); \ 206 if (rounded == 0) rounded = 1; \ 207 rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1; \ 208 rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) \ 209 * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); \ 210 fputs (".comm ", (FILE)); \ 211 assemble_name ((FILE), (NAME)); \ 212 fprintf ((FILE), ",%u\n", (rounded)); \ 213 } \ 214} while (0) 215 216/* Turn off svr4.h version, it chokes the old gas. The old layout 217 works fine under new gas anyway. */ 218#undef ASM_OUTPUT_ASCII 219 220/* How to output some space */ 221#undef ASM_OUTPUT_SKIP
| 189 } else { \ 190 int rounded = (SIZE); \ 191 if (rounded == 0) rounded = 1; \ 192 rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1; \ 193 rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) \ 194 * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); \ 195 fputs (".lcomm ", (FILE)); \ 196 assemble_name ((FILE), (NAME)); \ 197 fprintf ((FILE), ",%u\n", (rounded)); \ 198 } \ 199} while (0) 200 201#undef ASM_OUTPUT_ALIGNED_COMMON 202#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ 203do { \ 204 if (TARGET_ELF) { \ 205 fprintf ((FILE), "\t%s\t", COMMON_ASM_OP); \ 206 assemble_name ((FILE), (NAME)); \ 207 fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ 208 } else { \ 209 int rounded = (SIZE); \ 210 if (rounded == 0) rounded = 1; \ 211 rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1; \ 212 rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) \ 213 * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); \ 214 fputs (".comm ", (FILE)); \ 215 assemble_name ((FILE), (NAME)); \ 216 fprintf ((FILE), ",%u\n", (rounded)); \ 217 } \ 218} while (0) 219 220/* Turn off svr4.h version, it chokes the old gas. The old layout 221 works fine under new gas anyway. */ 222#undef ASM_OUTPUT_ASCII 223 224/* How to output some space */ 225#undef ASM_OUTPUT_SKIP
|
222#define ASM_OUTPUT_SKIP(FILE,SIZE) \
| 226#define ASM_OUTPUT_SKIP(FILE, SIZE) \
|
223do { \ 224 if (TARGET_ELF) { \
| 227do { \ 228 if (TARGET_ELF) { \
|
225 fprintf (FILE, "\t%s\t%u\n", SKIP_ASM_OP, (SIZE)); \
| 229 fprintf ((FILE), "\t%s\t%u\n", SKIP_ASM_OP, (SIZE)); \
|
226 } else { \
| 230 } else { \
|
227 fprintf (FILE, "\t.space %u\n", (SIZE)); \
| 231 fprintf ((FILE), "\t.space %u\n", (SIZE)); \
|
228 } \ 229} while (0) 230 231#undef ASM_OUTPUT_SOURCE_LINE
| 232 } \ 233} while (0) 234 235#undef ASM_OUTPUT_SOURCE_LINE
|
232#define ASM_OUTPUT_SOURCE_LINE(file, line) \
| 236#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
|
233do { \ 234 static int sym_lineno = 1; \ 235 if (TARGET_ELF) { \
| 237do { \ 238 static int sym_lineno = 1; \ 239 if (TARGET_ELF) { \
|
236 fprintf (file, ".stabn 68,0,%d,.LM%d-", line, sym_lineno); \ 237 assemble_name (file, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\ 238 fprintf (file, "\n.LM%d:\n", sym_lineno); \
| 240 fprintf ((FILE), ".stabn 68,0,%d,.LM%d-", (LINE), sym_lineno); \ 241 assemble_name ((FILE), XSTR (XEXP (DECL_RTL (current_function_decl),\ 242 0), 0)); \ 243 fprintf ((FILE), "\n.LM%d:\n", sym_lineno); \
|
239 sym_lineno += 1; \ 240 } else { \
| 244 sym_lineno += 1; \ 245 } else { \
|
241 fprintf (file, "\t%s %d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno); \
| 246 fprintf ((FILE), "\t%s %d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno); \
|
242 } \ 243} while (0) 244 245/* in elf, the function stabs come first, before the relative offsets */ 246#undef DBX_FUNCTION_FIRST 247#define DBX_CHECK_FUNCTION_FIRST TARGET_ELF 248 249/* tag end of file in elf mode */ 250#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END 251#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ 252do { \ 253 if (TARGET_ELF) { \
| 247 } \ 248} while (0) 249 250/* in elf, the function stabs come first, before the relative offsets */ 251#undef DBX_FUNCTION_FIRST 252#define DBX_CHECK_FUNCTION_FIRST TARGET_ELF 253 254/* tag end of file in elf mode */ 255#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END 256#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ 257do { \ 258 if (TARGET_ELF) { \
|
254 fprintf (FILE, "\t.text\n\t.stabs \"\",%d,0,0,.Letext\n.Letext:\n", N_SO); \
| 259 fprintf ((FILE), "\t.text\n\t.stabs \"\",%d,0,0,.Letext\n.Letext:\n", \ 260 N_SO); \
|
255 } \ 256} while (0) 257 258/* stabs-in-elf has offsets relative to function beginning */ 259#undef DBX_OUTPUT_LBRAC
| 261 } \ 262} while (0) 263 264/* stabs-in-elf has offsets relative to function beginning */ 265#undef DBX_OUTPUT_LBRAC
|
260#define DBX_OUTPUT_LBRAC(file,name) \
| 266#define DBX_OUTPUT_LBRAC(FILE, NAME) \
|
261do { \ 262 fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_LBRAC); \ 263 assemble_name (asmfile, buf); \ 264 if (TARGET_ELF) { \ 265 fputc ('-', asmfile); \
| 267do { \ 268 fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_LBRAC); \ 269 assemble_name (asmfile, buf); \ 270 if (TARGET_ELF) { \ 271 fputc ('-', asmfile); \
|
266 assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
| 272 assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl),\ 273 0), 0)); \
|
267 } \ 268 fprintf (asmfile, "\n"); \ 269} while (0) 270 271#undef DBX_OUTPUT_RBRAC
| 274 } \ 275 fprintf (asmfile, "\n"); \ 276} while (0) 277 278#undef DBX_OUTPUT_RBRAC
|
272#define DBX_OUTPUT_RBRAC(file,name) \
| 279#define DBX_OUTPUT_RBRAC(FILE, NAME) \
|
273do { \ 274 fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_RBRAC); \ 275 assemble_name (asmfile, buf); \ 276 if (TARGET_ELF) { \ 277 fputc ('-', asmfile); \
| 280do { \ 281 fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_RBRAC); \ 282 assemble_name (asmfile, buf); \ 283 if (TARGET_ELF) { \ 284 fputc ('-', asmfile); \
|
278 assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
| 285 assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl),\ 286 0), 0)); \
|
279 } \ 280 fprintf (asmfile, "\n"); \ 281} while (0) 282 283 284/* Define macro used to output shift-double opcodes when the shift 285 count is in %cl. Some assemblers require %cl as an argument; 286 some don't. 287 288 *OLD* GAS requires the %cl argument, so override i386/unix.h. */ 289 290#undef AS3_SHIFT_DOUBLE 291#define AS3_SHIFT_DOUBLE(a,b,c,d) AS3 (a,b,c,d) 292 293/* Indicate that jump tables go in the text section. This is 294 necessary when compiling PIC code. */
| 287 } \ 288 fprintf (asmfile, "\n"); \ 289} while (0) 290 291 292/* Define macro used to output shift-double opcodes when the shift 293 count is in %cl. Some assemblers require %cl as an argument; 294 some don't. 295 296 *OLD* GAS requires the %cl argument, so override i386/unix.h. */ 297 298#undef AS3_SHIFT_DOUBLE 299#define AS3_SHIFT_DOUBLE(a,b,c,d) AS3 (a,b,c,d) 300 301/* Indicate that jump tables go in the text section. This is 302 necessary when compiling PIC code. */
|
| 303#undef JUMP_TABLES_IN_TEXT_SECTION
|
295#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) 296 297/* override the exception table positioning */
| 304#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) 305 306/* override the exception table positioning */
|
| 307#undef EXCEPTION_SECTION
|
298#define EXCEPTION_SECTION() \ 299do { \ 300 if (TARGET_ELF) { \ 301 named_section (NULL_TREE, ".gcc_except_table", 0); \ 302 } else { \ 303 if (flag_pic) \ 304 data_section (); \ 305 else \ 306 readonly_data_section (); \ 307 } \ 308} while (0); 309 310/* supply our own hook for calling __main() from main() */
| 308#define EXCEPTION_SECTION() \ 309do { \ 310 if (TARGET_ELF) { \ 311 named_section (NULL_TREE, ".gcc_except_table", 0); \ 312 } else { \ 313 if (flag_pic) \ 314 data_section (); \ 315 else \ 316 readonly_data_section (); \ 317 } \ 318} while (0); 319 320/* supply our own hook for calling __main() from main() */
|
| 321#undef GEN_CALL__MAIN
|
311#define GEN_CALL__MAIN \ 312 do { \ 313 if (!(TARGET_ELF)) \ 314 emit_library_call (gen_rtx (SYMBOL_REF, Pmode, NAME__MAIN), 0, \ 315 VOIDmode, 0); \ 316 } while (0) 317 318/* Copy this from the svr4 specifications... */ 319/* Define the register numbers to be used in Dwarf debugging information. 320 The SVR4 reference port C compiler uses the following register numbers 321 in its Dwarf output code: 322 0 for %eax (gnu regno = 0) 323 1 for %ecx (gnu regno = 2) 324 2 for %edx (gnu regno = 1) 325 3 for %ebx (gnu regno = 3) 326 4 for %esp (gnu regno = 7) 327 5 for %ebp (gnu regno = 6) 328 6 for %esi (gnu regno = 4) 329 7 for %edi (gnu regno = 5) 330 The following three DWARF register numbers are never generated by 331 the SVR4 C compiler or by the GNU compilers, but SDB on x86/svr4 332 believes these numbers have these meanings. 333 8 for %eip (no gnu equivalent) 334 9 for %eflags (no gnu equivalent) 335 10 for %trapno (no gnu equivalent) 336 It is not at all clear how we should number the FP stack registers 337 for the x86 architecture. If the version of SDB on x86/svr4 were 338 a bit less brain dead with respect to floating-point then we would 339 have a precedent to follow with respect to DWARF register numbers 340 for x86 FP registers, but the SDB on x86/svr4 is so completely 341 broken with respect to FP registers that it is hardly worth thinking 342 of it as something to strive for compatibility with. 343 The version of x86/svr4 SDB I have at the moment does (partially) 344 seem to believe that DWARF register number 11 is associated with 345 the x86 register %st(0), but that's about all. Higher DWARF 346 register numbers don't seem to be associated with anything in 347 particular, and even for DWARF regno 11, SDB only seems to under- 348 stand that it should say that a variable lives in %st(0) (when 349 asked via an `=' command) if we said it was in DWARF regno 11, 350 but SDB still prints garbage when asked for the value of the 351 variable in question (via a `/' command). 352 (Also note that the labels SDB prints for various FP stack regs 353 when doing an `x' command are all wrong.) 354 Note that these problems generally don't affect the native SVR4 355 C compiler because it doesn't allow the use of -O with -g and 356 because when it is *not* optimizing, it allocates a memory 357 location for each floating-point variable, and the memory 358 location is what gets described in the DWARF AT_location 359 attribute for the variable in question. 360 Regardless of the severe mental illness of the x86/svr4 SDB, we 361 do something sensible here and we use the following DWARF 362 register numbers. Note that these are all stack-top-relative 363 numbers. 364 11 for %st(0) (gnu regno = 8) 365 12 for %st(1) (gnu regno = 9) 366 13 for %st(2) (gnu regno = 10) 367 14 for %st(3) (gnu regno = 11) 368 15 for %st(4) (gnu regno = 12) 369 16 for %st(5) (gnu regno = 13) 370 17 for %st(6) (gnu regno = 14) 371 18 for %st(7) (gnu regno = 15) 372*/ 373#undef DWARF_DBX_REGISTER_NUMBER 374#define DWARF_DBX_REGISTER_NUMBER(n) \ 375((n) == 0 ? 0 \ 376 : (n) == 1 ? 2 \ 377 : (n) == 2 ? 1 \ 378 : (n) == 3 ? 3 \ 379 : (n) == 4 ? 6 \ 380 : (n) == 5 ? 7 \ 381 : (n) == 6 ? 5 \ 382 : (n) == 7 ? 4 \ 383 : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \ 384 : (-1)) 385 386/* Now what stabs expects in the register. */
| 322#define GEN_CALL__MAIN \ 323 do { \ 324 if (!(TARGET_ELF)) \ 325 emit_library_call (gen_rtx (SYMBOL_REF, Pmode, NAME__MAIN), 0, \ 326 VOIDmode, 0); \ 327 } while (0) 328 329/* Copy this from the svr4 specifications... */ 330/* Define the register numbers to be used in Dwarf debugging information. 331 The SVR4 reference port C compiler uses the following register numbers 332 in its Dwarf output code: 333 0 for %eax (gnu regno = 0) 334 1 for %ecx (gnu regno = 2) 335 2 for %edx (gnu regno = 1) 336 3 for %ebx (gnu regno = 3) 337 4 for %esp (gnu regno = 7) 338 5 for %ebp (gnu regno = 6) 339 6 for %esi (gnu regno = 4) 340 7 for %edi (gnu regno = 5) 341 The following three DWARF register numbers are never generated by 342 the SVR4 C compiler or by the GNU compilers, but SDB on x86/svr4 343 believes these numbers have these meanings. 344 8 for %eip (no gnu equivalent) 345 9 for %eflags (no gnu equivalent) 346 10 for %trapno (no gnu equivalent) 347 It is not at all clear how we should number the FP stack registers 348 for the x86 architecture. If the version of SDB on x86/svr4 were 349 a bit less brain dead with respect to floating-point then we would 350 have a precedent to follow with respect to DWARF register numbers 351 for x86 FP registers, but the SDB on x86/svr4 is so completely 352 broken with respect to FP registers that it is hardly worth thinking 353 of it as something to strive for compatibility with. 354 The version of x86/svr4 SDB I have at the moment does (partially) 355 seem to believe that DWARF register number 11 is associated with 356 the x86 register %st(0), but that's about all. Higher DWARF 357 register numbers don't seem to be associated with anything in 358 particular, and even for DWARF regno 11, SDB only seems to under- 359 stand that it should say that a variable lives in %st(0) (when 360 asked via an `=' command) if we said it was in DWARF regno 11, 361 but SDB still prints garbage when asked for the value of the 362 variable in question (via a `/' command). 363 (Also note that the labels SDB prints for various FP stack regs 364 when doing an `x' command are all wrong.) 365 Note that these problems generally don't affect the native SVR4 366 C compiler because it doesn't allow the use of -O with -g and 367 because when it is *not* optimizing, it allocates a memory 368 location for each floating-point variable, and the memory 369 location is what gets described in the DWARF AT_location 370 attribute for the variable in question. 371 Regardless of the severe mental illness of the x86/svr4 SDB, we 372 do something sensible here and we use the following DWARF 373 register numbers. Note that these are all stack-top-relative 374 numbers. 375 11 for %st(0) (gnu regno = 8) 376 12 for %st(1) (gnu regno = 9) 377 13 for %st(2) (gnu regno = 10) 378 14 for %st(3) (gnu regno = 11) 379 15 for %st(4) (gnu regno = 12) 380 16 for %st(5) (gnu regno = 13) 381 17 for %st(6) (gnu regno = 14) 382 18 for %st(7) (gnu regno = 15) 383*/ 384#undef DWARF_DBX_REGISTER_NUMBER 385#define DWARF_DBX_REGISTER_NUMBER(n) \ 386((n) == 0 ? 0 \ 387 : (n) == 1 ? 2 \ 388 : (n) == 2 ? 1 \ 389 : (n) == 3 ? 3 \ 390 : (n) == 4 ? 6 \ 391 : (n) == 5 ? 7 \ 392 : (n) == 6 ? 5 \ 393 : (n) == 7 ? 4 \ 394 : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \ 395 : (-1)) 396 397/* Now what stabs expects in the register. */
|
| 398#undef STABS_DBX_REGISTER_NUMBER
|
387#define STABS_DBX_REGISTER_NUMBER(n) \ 388((n) == 0 ? 0 : \ 389 (n) == 1 ? 2 : \ 390 (n) == 2 ? 1 : \ 391 (n) == 3 ? 3 : \ 392 (n) == 4 ? 6 : \ 393 (n) == 5 ? 7 : \ 394 (n) == 6 ? 4 : \ 395 (n) == 7 ? 5 : \ 396 (n) + 4) 397 398#undef DBX_REGISTER_NUMBER 399#define DBX_REGISTER_NUMBER(n) ((write_symbols == DWARF_DEBUG) \ 400 ? DWARF_DBX_REGISTER_NUMBER(n) \ 401 : STABS_DBX_REGISTER_NUMBER(n)) 402 403/* Tell final.c that we don't need a label passed to mcount. */ 404#define NO_PROFILE_DATA 405 406/* Output assembler code to FILE to increment profiler label # LABELNO 407 for profiling a function entry. */ 408/* Redefine this to not pass an unused label in %edx. */ 409 410#undef FUNCTION_PROFILER 411#define FUNCTION_PROFILER(FILE, LABELNO) \ 412{ \ 413 if (flag_pic) \ 414 { \
| 399#define STABS_DBX_REGISTER_NUMBER(n) \ 400((n) == 0 ? 0 : \ 401 (n) == 1 ? 2 : \ 402 (n) == 2 ? 1 : \ 403 (n) == 3 ? 3 : \ 404 (n) == 4 ? 6 : \ 405 (n) == 5 ? 7 : \ 406 (n) == 6 ? 4 : \ 407 (n) == 7 ? 5 : \ 408 (n) + 4) 409 410#undef DBX_REGISTER_NUMBER 411#define DBX_REGISTER_NUMBER(n) ((write_symbols == DWARF_DEBUG) \ 412 ? DWARF_DBX_REGISTER_NUMBER(n) \ 413 : STABS_DBX_REGISTER_NUMBER(n)) 414 415/* Tell final.c that we don't need a label passed to mcount. */ 416#define NO_PROFILE_DATA 417 418/* Output assembler code to FILE to increment profiler label # LABELNO 419 for profiling a function entry. */ 420/* Redefine this to not pass an unused label in %edx. */ 421 422#undef FUNCTION_PROFILER 423#define FUNCTION_PROFILER(FILE, LABELNO) \ 424{ \ 425 if (flag_pic) \ 426 { \
|
415 fprintf (FILE, "\tcall *%s@GOT(%%ebx)\n", \
| 427 fprintf ((FILE), "\tcall *%s@GOT(%%ebx)\n", \
|
416 TARGET_AOUT ? "mcount" : ".mcount"); \ 417 } \ 418 else \ 419 { \
| 428 TARGET_AOUT ? "mcount" : ".mcount"); \ 429 } \ 430 else \ 431 { \
|
420 fprintf (FILE, "\tcall %s\n", TARGET_AOUT ? "mcount" : ".mcount"); \
| 432 fprintf ((FILE), "\tcall %s\n", TARGET_AOUT ? "mcount" : ".mcount"); \
|
421 } \ 422} 423
| 433 } \ 434} 435
|
| 436#undef FUNCTION_PROFILER_EPILOGUE
|
424#define FUNCTION_PROFILER_EPILOGUE(FILE) \ 425{ \ 426 if (TARGET_PROFILER_EPILOGUE) \ 427 { \ 428 if (flag_pic) \
| 437#define FUNCTION_PROFILER_EPILOGUE(FILE) \ 438{ \ 439 if (TARGET_PROFILER_EPILOGUE) \ 440 { \ 441 if (flag_pic) \
|
429 fprintf (FILE, "\tcall *%s@GOT(%%ebx)\n", \
| 442 fprintf ((FILE), "\tcall *%s@GOT(%%ebx)\n", \
|
430 TARGET_AOUT ? "mexitcount" : ".mexitcount"); \ 431 else \
| 443 TARGET_AOUT ? "mexitcount" : ".mexitcount"); \ 444 else \
|
432 fprintf (FILE, "\tcall %s\n", \
| 445 fprintf ((FILE), "\tcall %s\n", \
|
433 TARGET_AOUT ? "mexitcount" : ".mexitcount"); \ 434 } \ 435} 436 437#undef SIZE_TYPE 438#define SIZE_TYPE "unsigned int" 439 440#undef PTRDIFF_TYPE 441#define PTRDIFF_TYPE "int"
| 446 TARGET_AOUT ? "mexitcount" : ".mexitcount"); \ 447 } \ 448} 449 450#undef SIZE_TYPE 451#define SIZE_TYPE "unsigned int" 452 453#undef PTRDIFF_TYPE 454#define PTRDIFF_TYPE "int"
|
442
| 455
|
443#undef WCHAR_TYPE 444#define WCHAR_TYPE "int" 445
| 456#undef WCHAR_TYPE 457#define WCHAR_TYPE "int" 458
|
| 459#undef WCHAR_UNSIGNED
|
446#define WCHAR_UNSIGNED 0 447 448#undef WCHAR_TYPE_SIZE 449#define WCHAR_TYPE_SIZE BITS_PER_WORD
| 460#define WCHAR_UNSIGNED 0 461 462#undef WCHAR_TYPE_SIZE 463#define WCHAR_TYPE_SIZE BITS_PER_WORD
|
450
| 464
|
451#undef CPP_PREDEFINES 452#define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES 453 454#undef CPP_SPEC 455#if TARGET_CPU_DEFAULT == 2 456#define CPP_SPEC "\ 457%{!maout: -D__ELF__} \ 458%{munderscores: -D__UNDERSCORES__} \ 459%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ 460%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__}" 461#else 462#define CPP_SPEC "\ 463%{!maout: -D__ELF__} \ 464%{munderscores: -D__UNDERSCORES__} \ 465%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ 466%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{m486:-D__i486__}" 467#endif 468 469#undef CC1_SPEC 470#define CC1_SPEC "\ 471%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ 472%{maout: %{!mno-underscores: %{!munderscores: -munderscores }}}" 473 474#undef ASM_SPEC 475#define ASM_SPEC "%{v*: -v} %{maout: %{fpic:-k} %{fPIC:-k}}" 476 477/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support 478 for the special GCC options -static and -shared, which allow us to 479 link things in one of these three modes by applying the appropriate 480 combinations of options at link-time. We like to support here for 481 as many of the other GNU linker options as possible. But I don't 482 have the time to search for those flags. I am sure how to add 483 support for -soname shared_object_name. H.J. 484 485 I took out %{v:%{!V:-V}}. It is too much :-(. They can use 486 -Wl,-V. 487 488 When the -shared link option is used a final link is not being 489 done. */ 490 491#undef LINK_SPEC 492#define LINK_SPEC "\ 493 %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ 494 %{maout: %{shared:-Bshareable} \ 495 %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \ 496 %{pg:-Bstatic} %{Z}} \ 497 %{assert*} %{R*}} \ 498 %{!maout: \ 499 -m elf_i386 \ 500 %{Wl,*:%*} \ 501 %{assert*} %{R*} %{rpath*} %{defsym*} \ 502 %{shared:-Bshareable %{h*} %{soname*}} \ 503 %{symbolic:-Bsymbolic} \ 504 %{!shared: \ 505 %{!static: \ 506 %{rdynamic: -export-dynamic} \ 507 %{!dynamic-linker: -dynamic-linker /usr/libexec/ld-elf.so.1}} \ 508 %{static:-Bstatic}}}" 509 510/* A C statement to output to the stdio stream FILE an assembler 511 command to advance the location counter to a multiple of 1<<LOG 512 bytes if it is within MAX_SKIP bytes. 513 514 This is used to align code labels according to Intel recommendations. */ 515 516#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN 517#error "we don't have this for the aout gas"
| 465#undef CPP_PREDEFINES 466#define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES 467 468#undef CPP_SPEC 469#if TARGET_CPU_DEFAULT == 2 470#define CPP_SPEC "\ 471%{!maout: -D__ELF__} \ 472%{munderscores: -D__UNDERSCORES__} \ 473%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ 474%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__}" 475#else 476#define CPP_SPEC "\ 477%{!maout: -D__ELF__} \ 478%{munderscores: -D__UNDERSCORES__} \ 479%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ 480%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{m486:-D__i486__}" 481#endif 482 483#undef CC1_SPEC 484#define CC1_SPEC "\ 485%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ 486%{maout: %{!mno-underscores: %{!munderscores: -munderscores }}}" 487 488#undef ASM_SPEC 489#define ASM_SPEC "%{v*: -v} %{maout: %{fpic:-k} %{fPIC:-k}}" 490 491/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support 492 for the special GCC options -static and -shared, which allow us to 493 link things in one of these three modes by applying the appropriate 494 combinations of options at link-time. We like to support here for 495 as many of the other GNU linker options as possible. But I don't 496 have the time to search for those flags. I am sure how to add 497 support for -soname shared_object_name. H.J. 498 499 I took out %{v:%{!V:-V}}. It is too much :-(. They can use 500 -Wl,-V. 501 502 When the -shared link option is used a final link is not being 503 done. */ 504 505#undef LINK_SPEC 506#define LINK_SPEC "\ 507 %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ 508 %{maout: %{shared:-Bshareable} \ 509 %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \ 510 %{pg:-Bstatic} %{Z}} \ 511 %{assert*} %{R*}} \ 512 %{!maout: \ 513 -m elf_i386 \ 514 %{Wl,*:%*} \ 515 %{assert*} %{R*} %{rpath*} %{defsym*} \ 516 %{shared:-Bshareable %{h*} %{soname*}} \ 517 %{symbolic:-Bsymbolic} \ 518 %{!shared: \ 519 %{!static: \ 520 %{rdynamic: -export-dynamic} \ 521 %{!dynamic-linker: -dynamic-linker /usr/libexec/ld-elf.so.1}} \ 522 %{static:-Bstatic}}}" 523 524/* A C statement to output to the stdio stream FILE an assembler 525 command to advance the location counter to a multiple of 1<<LOG 526 bytes if it is within MAX_SKIP bytes. 527 528 This is used to align code labels according to Intel recommendations. */ 529 530#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN 531#error "we don't have this for the aout gas"
|
518#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ 519 if ((LOG)!=0) \ 520 if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
| 532#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP) \ 533 if ((LOG)!=0) \ 534 if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
|
521 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)) 522#endif 523 524#undef STARTFILE_SPEC 525#define STARTFILE_SPEC "\ 526 %{maout: %{shared:c++rt0.o%s} \ 527 %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}} \ 528 %{!maout: %{!shared: \ 529 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \ 530 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" 531 532#undef ENDFILE_SPEC 533#define ENDFILE_SPEC \ 534 "%{!maout: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}" 535 536/* This goes away when the math emulator is fixed. */ 537#undef TARGET_DEFAULT 538#define TARGET_DEFAULT (MASK_NO_FANCY_MATH_387 | 0301) 539 540/* FreeBSD ELF using our home-grown crtbegin.o/crtend.o does not support the 541 DWARF2 unwinding mechanisms. Once `make world' bootstraping problems with 542 the EGCS crtstuff.c is overcome, we will switch to the non-sjlj-exceptions 543 type exception machanism. */ 544#define DWARF2_UNWIND_INFO 0
| 535 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)) 536#endif 537 538#undef STARTFILE_SPEC 539#define STARTFILE_SPEC "\ 540 %{maout: %{shared:c++rt0.o%s} \ 541 %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}} \ 542 %{!maout: %{!shared: \ 543 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \ 544 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" 545 546#undef ENDFILE_SPEC 547#define ENDFILE_SPEC \ 548 "%{!maout: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}" 549 550/* This goes away when the math emulator is fixed. */ 551#undef TARGET_DEFAULT 552#define TARGET_DEFAULT (MASK_NO_FANCY_MATH_387 | 0301) 553 554/* FreeBSD ELF using our home-grown crtbegin.o/crtend.o does not support the 555 DWARF2 unwinding mechanisms. Once `make world' bootstraping problems with 556 the EGCS crtstuff.c is overcome, we will switch to the non-sjlj-exceptions 557 type exception machanism. */ 558#define DWARF2_UNWIND_INFO 0
|