Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/i386/cygming.h @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
31 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG | 31 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG |
32 #else | 32 #else |
33 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG | 33 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG |
34 #endif | 34 #endif |
35 | 35 |
36 #undef TARGET_64BIT_MS_ABI | 36 #undef TARGET_SEH |
37 #define TARGET_64BIT_MS_ABI (!cfun ? ix86_abi == MS_ABI : TARGET_64BIT && cfun->machine->call_abi == MS_ABI) | 37 #define TARGET_SEH (TARGET_64BIT_MS_ABI && flag_unwind_tables) |
38 | |
39 /* Win64 with SEH cannot represent DRAP stack frames. Disable its use. | |
40 Force the use of different mechanisms to allocate aligned local data. */ | |
41 #undef MAX_STACK_ALIGNMENT | |
42 #define MAX_STACK_ALIGNMENT (TARGET_SEH ? 128 : MAX_OFILE_ALIGNMENT) | |
43 | |
44 /* Support hooks for SEH. */ | |
45 #undef TARGET_ASM_UNWIND_EMIT | |
46 #define TARGET_ASM_UNWIND_EMIT i386_pe_seh_unwind_emit | |
47 #undef TARGET_ASM_UNWIND_EMIT_BEFORE_INSN | |
48 #define TARGET_ASM_UNWIND_EMIT_BEFORE_INSN false | |
49 #undef TARGET_ASM_FUNCTION_END_PROLOGUE | |
50 #define TARGET_ASM_FUNCTION_END_PROLOGUE i386_pe_seh_end_prologue | |
51 #define SUBTARGET_ASM_UNWIND_INIT i386_pe_seh_init | |
38 | 52 |
39 #undef DEFAULT_ABI | 53 #undef DEFAULT_ABI |
40 #define DEFAULT_ABI (TARGET_64BIT ? MS_ABI : SYSV_ABI) | 54 #define DEFAULT_ABI (TARGET_64BIT ? MS_ABI : SYSV_ABI) |
41 | 55 |
42 #if ! defined (USE_MINGW64_LEADING_UNDERSCORES) | 56 #if ! defined (USE_MINGW64_LEADING_UNDERSCORES) |
43 #undef USER_LABEL_PREFIX | 57 #undef USER_LABEL_PREFIX |
44 #define USER_LABEL_PREFIX (TARGET_64BIT ? "" : "_") | 58 #define USER_LABEL_PREFIX (TARGET_64BIT ? "" : "_") |
59 | |
60 #undef LOCAL_LABEL_PREFIX | |
61 #define LOCAL_LABEL_PREFIX (TARGET_64BIT ? "." : "") | |
62 | |
63 #undef ASM_GENERATE_INTERNAL_LABEL | |
64 #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ | |
65 sprintf ((BUF), "*%s%s%ld", LOCAL_LABEL_PREFIX, \ | |
66 (PREFIX), (long)(NUMBER)) | |
67 | |
68 #undef LPREFIX | |
69 #define LPREFIX (TARGET_64BIT ? ".L" : "L") | |
70 | |
45 #endif | 71 #endif |
46 | 72 |
47 #undef DBX_REGISTER_NUMBER | 73 #undef DBX_REGISTER_NUMBER |
48 #define DBX_REGISTER_NUMBER(n) \ | 74 #define DBX_REGISTER_NUMBER(n) \ |
49 (TARGET_64BIT ? dbx64_register_map[n] \ | 75 (TARGET_64BIT ? dbx64_register_map[n] \ |
56 #undef DWARF_FRAME_REGNUM | 82 #undef DWARF_FRAME_REGNUM |
57 #define DWARF_FRAME_REGNUM(n) \ | 83 #define DWARF_FRAME_REGNUM(n) \ |
58 (TARGET_64BIT ? dbx64_register_map[(n)] \ | 84 (TARGET_64BIT ? dbx64_register_map[(n)] \ |
59 : svr4_dbx_register_map[(n)]) | 85 : svr4_dbx_register_map[(n)]) |
60 | 86 |
87 /* The MS_ABI changes the set of call-used registers. */ | |
88 #undef DWARF_FRAME_REGISTERS | |
89 #define DWARF_FRAME_REGISTERS (TARGET_64BIT ? 33 : 17) | |
90 | |
61 #ifdef HAVE_GAS_PE_SECREL32_RELOC | 91 #ifdef HAVE_GAS_PE_SECREL32_RELOC |
62 /* Use section relative relocations for debugging offsets. Unlike | 92 /* Use section relative relocations for debugging offsets. Unlike |
63 other targets that fake this by putting the section VMA at 0, PE | 93 other targets that fake this by putting the section VMA at 0, PE |
64 won't allow it. */ | 94 won't allow it. */ |
65 #define ASM_OUTPUT_DWARF_OFFSET(FILE, SIZE, LABEL, SECTION) \ | 95 #define ASM_OUTPUT_DWARF_OFFSET(FILE, SIZE, LABEL, SECTION) \ |
66 do { \ | 96 do { \ |
67 if (SIZE != 4 && (!TARGET_64BIT || SIZE != 8)) \ | 97 switch (SIZE) \ |
68 abort (); \ | 98 { \ |
69 \ | 99 case 4: \ |
70 fputs ("\t.secrel32\t", FILE); \ | 100 fputs ("\t.secrel32\t", FILE); \ |
71 assemble_name (FILE, LABEL); \ | 101 assemble_name (FILE, LABEL); \ |
102 break; \ | |
103 case 8: \ | |
104 /* This is a hack. There is no 64-bit section relative \ | |
105 relocation. However, the COFF format also does not \ | |
106 support 64-bit file offsets; 64-bit applications are \ | |
107 limited to 32-bits of code+data in any one module. \ | |
108 Fake the 64-bit offset by zero-extending it. */ \ | |
109 fputs ("\t.secrel32\t", FILE); \ | |
110 assemble_name (FILE, LABEL); \ | |
111 fputs ("\n\t.long\t0", FILE); \ | |
112 break; \ | |
113 default: \ | |
114 gcc_unreachable (); \ | |
115 } \ | |
72 } while (0) | 116 } while (0) |
73 #endif | 117 #endif |
74 | 118 |
75 #define TARGET_EXECUTABLE_SUFFIX ".exe" | 119 #define TARGET_EXECUTABLE_SUFFIX ".exe" |
76 | |
77 #include <stdio.h> | |
78 | 120 |
79 #define TARGET_OS_CPP_BUILTINS() \ | 121 #define TARGET_OS_CPP_BUILTINS() \ |
80 do \ | 122 do \ |
81 { \ | 123 { \ |
82 if (!TARGET_64BIT) \ | 124 if (!TARGET_64BIT) \ |
83 builtin_define ("_X86_=1"); \ | 125 builtin_define ("_X86_=1"); \ |
126 if (TARGET_SEH) \ | |
127 builtin_define ("__SEH__"); \ | |
84 builtin_assert ("system=winnt"); \ | 128 builtin_assert ("system=winnt"); \ |
85 builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ | 129 builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ |
86 builtin_define ("__fastcall=__attribute__((__fastcall__))"); \ | 130 builtin_define ("__fastcall=__attribute__((__fastcall__))"); \ |
87 builtin_define ("__thiscall=__attribute__((__thiscall__))"); \ | 131 builtin_define ("__thiscall=__attribute__((__thiscall__))"); \ |
88 builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ | 132 builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ |
130 | 174 |
131 /* Windows64 continues to use a 32-bit long type. */ | 175 /* Windows64 continues to use a 32-bit long type. */ |
132 #undef LONG_TYPE_SIZE | 176 #undef LONG_TYPE_SIZE |
133 #define LONG_TYPE_SIZE 32 | 177 #define LONG_TYPE_SIZE 32 |
134 | 178 |
135 /* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop). */ | |
136 #define HANDLE_PRAGMA_PACK_PUSH_POP 1 | |
137 | |
138 union tree_node; | 179 union tree_node; |
139 #define TREE union tree_node * | 180 #define TREE union tree_node * |
140 | 181 |
141 #define drectve_section() \ | 182 #define drectve_section() \ |
142 (fprintf (asm_out_file, "\t.section .drectve\n"), \ | 183 (fprintf (asm_out_file, "\t.section .drectve\n"), \ |
150 otherwise. */ | 191 otherwise. */ |
151 | 192 |
152 #undef SUBTARGET_OVERRIDE_OPTIONS | 193 #undef SUBTARGET_OVERRIDE_OPTIONS |
153 #define SUBTARGET_OVERRIDE_OPTIONS \ | 194 #define SUBTARGET_OVERRIDE_OPTIONS \ |
154 do { \ | 195 do { \ |
155 if (flag_pic) \ | 196 if (TARGET_64BIT && flag_pic != 1) \ |
197 { \ | |
198 if (flag_pic > 1) \ | |
199 warning (0, \ | |
200 "-fPIC ignored for target (all code is position independent)"\ | |
201 ); \ | |
202 flag_pic = 1; \ | |
203 } \ | |
204 else if (!TARGET_64BIT && flag_pic) \ | |
156 { \ | 205 { \ |
157 warning (0, "-f%s ignored for target (all code is position independent)",\ | 206 warning (0, "-f%s ignored for target (all code is position independent)",\ |
158 (flag_pic > 1) ? "PIC" : "pic"); \ | 207 (flag_pic > 1) ? "PIC" : "pic"); \ |
159 flag_pic = 0; \ | 208 flag_pic = 0; \ |
160 } \ | 209 } \ |
201 if ((NAME)[0] != FASTCALL_PREFIX) \ | 250 if ((NAME)[0] != FASTCALL_PREFIX) \ |
202 fputs (user_label_prefix, (STREAM)); \ | 251 fputs (user_label_prefix, (STREAM)); \ |
203 fputs ((NAME), (STREAM)); \ | 252 fputs ((NAME), (STREAM)); \ |
204 } while (0) | 253 } while (0) |
205 | 254 |
255 /* This does much the same in memory rather than to a stream. */ | |
256 #undef TARGET_MANGLE_ASSEMBLER_NAME | |
257 #define TARGET_MANGLE_ASSEMBLER_NAME i386_pe_mangle_assembler_name | |
258 | |
206 | 259 |
207 /* Emit code to check the stack when allocating more than 4000 | 260 /* Emit code to check the stack when allocating more than 4000 |
208 bytes in one go. */ | 261 bytes in one go. */ |
209 #define CHECK_STACK_LIMIT 4000 | 262 #define CHECK_STACK_LIMIT 4000 |
210 | 263 |
248 | 301 |
249 /* Write the extra assembler code needed to declare a function | 302 /* Write the extra assembler code needed to declare a function |
250 properly. If we are generating SDB debugging information, this | 303 properly. If we are generating SDB debugging information, this |
251 will happen automatically, so we only need to handle other cases. */ | 304 will happen automatically, so we only need to handle other cases. */ |
252 #undef ASM_DECLARE_FUNCTION_NAME | 305 #undef ASM_DECLARE_FUNCTION_NAME |
253 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ | 306 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ |
254 do \ | 307 i386_pe_start_function (FILE, NAME, DECL) |
255 { \ | 308 |
256 i386_pe_maybe_record_exported_symbol (DECL, NAME, 0); \ | 309 #undef ASM_DECLARE_FUNCTION_SIZE |
257 if (write_symbols != SDB_DEBUG) \ | 310 #define ASM_DECLARE_FUNCTION_SIZE(FILE,NAME,DECL) \ |
258 i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL)); \ | 311 i386_pe_end_function (FILE, NAME, DECL) |
259 ASM_OUTPUT_LABEL (FILE, NAME); \ | |
260 } \ | |
261 while (0) | |
262 | 312 |
263 /* Add an external function to the list of functions to be declared at | 313 /* Add an external function to the list of functions to be declared at |
264 the end of the file. */ | 314 the end of the file. */ |
265 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ | 315 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ |
266 do \ | 316 do \ |
276 | 326 |
277 /* This says out to put a global symbol in the BSS section. */ | 327 /* This says out to put a global symbol in the BSS section. */ |
278 #undef ASM_OUTPUT_ALIGNED_BSS | 328 #undef ASM_OUTPUT_ALIGNED_BSS |
279 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ | 329 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ |
280 asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN)) | 330 asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN)) |
331 | |
332 /* Put all *tf routines in libgcc. */ | |
333 #undef LIBGCC2_HAS_TF_MODE | |
334 #define LIBGCC2_HAS_TF_MODE 1 | |
335 #define LIBGCC2_TF_CEXT q | |
336 #define TF_SIZE 113 | |
281 | 337 |
282 /* Output function declarations at the end of the file. */ | 338 /* Output function declarations at the end of the file. */ |
283 #undef TARGET_ASM_FILE_END | 339 #undef TARGET_ASM_FILE_END |
284 #define TARGET_ASM_FILE_END i386_pe_file_end | 340 #define TARGET_ASM_FILE_END i386_pe_file_end |
285 | 341 |
407 | 463 |
408 #define TARGET_VALID_DLLIMPORT_ATTRIBUTE_P i386_pe_valid_dllimport_attribute_p | 464 #define TARGET_VALID_DLLIMPORT_ATTRIBUTE_P i386_pe_valid_dllimport_attribute_p |
409 #define TARGET_CXX_ADJUST_CLASS_AT_DEFINITION i386_pe_adjust_class_at_definition | 465 #define TARGET_CXX_ADJUST_CLASS_AT_DEFINITION i386_pe_adjust_class_at_definition |
410 #define TARGET_MANGLE_DECL_ASSEMBLER_NAME i386_pe_mangle_decl_assembler_name | 466 #define TARGET_MANGLE_DECL_ASSEMBLER_NAME i386_pe_mangle_decl_assembler_name |
411 | 467 |
468 #undef TARGET_ASM_ASSEMBLE_VISIBILITY | |
469 #define TARGET_ASM_ASSEMBLE_VISIBILITY i386_pe_assemble_visibility | |
470 | |
471 /* Static stack checking is supported by means of probes. */ | |
472 #define STACK_CHECK_STATIC_BUILTIN 1 | |
473 | |
412 #undef TREE | 474 #undef TREE |
413 | 475 |
414 #ifndef BUFSIZ | 476 #ifndef BUFSIZ |
415 # undef FILE | 477 # undef FILE |
416 #endif | 478 #endif |