Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/i386/i386.h @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
56:3c8a44c06a95 | 63:b7f97abdc517 |
---|---|
1 /* Definitions of target machine for GCC for IA-32. | 1 /* Definitions of target machine for GCC for IA-32. |
2 Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | 2 Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | 3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
4 Free Software Foundation, Inc. | 4 Free Software Foundation, Inc. |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
8 GCC is free software; you can redistribute it and/or modify | 8 GCC is free software; you can redistribute it and/or modify |
238 #define TARGET_CORE2 (ix86_tune == PROCESSOR_CORE2) | 238 #define TARGET_CORE2 (ix86_tune == PROCESSOR_CORE2) |
239 #define TARGET_GENERIC32 (ix86_tune == PROCESSOR_GENERIC32) | 239 #define TARGET_GENERIC32 (ix86_tune == PROCESSOR_GENERIC32) |
240 #define TARGET_GENERIC64 (ix86_tune == PROCESSOR_GENERIC64) | 240 #define TARGET_GENERIC64 (ix86_tune == PROCESSOR_GENERIC64) |
241 #define TARGET_GENERIC (TARGET_GENERIC32 || TARGET_GENERIC64) | 241 #define TARGET_GENERIC (TARGET_GENERIC32 || TARGET_GENERIC64) |
242 #define TARGET_AMDFAM10 (ix86_tune == PROCESSOR_AMDFAM10) | 242 #define TARGET_AMDFAM10 (ix86_tune == PROCESSOR_AMDFAM10) |
243 #define TARGET_BDVER1 (ix86_tune == PROCESSOR_BDVER1) | |
243 #define TARGET_ATOM (ix86_tune == PROCESSOR_ATOM) | 244 #define TARGET_ATOM (ix86_tune == PROCESSOR_ATOM) |
244 | 245 |
245 /* Feature tests against the various tunings. */ | 246 /* Feature tests against the various tunings. */ |
246 enum ix86_tune_indices { | 247 enum ix86_tune_indices { |
247 X86_TUNE_USE_LEAVE, | 248 X86_TUNE_USE_LEAVE, |
275 X86_TUNE_SUB_ESP_4, | 276 X86_TUNE_SUB_ESP_4, |
276 X86_TUNE_SUB_ESP_8, | 277 X86_TUNE_SUB_ESP_8, |
277 X86_TUNE_INTEGER_DFMODE_MOVES, | 278 X86_TUNE_INTEGER_DFMODE_MOVES, |
278 X86_TUNE_PARTIAL_REG_DEPENDENCY, | 279 X86_TUNE_PARTIAL_REG_DEPENDENCY, |
279 X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY, | 280 X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY, |
280 X86_TUNE_SSE_UNALIGNED_MOVE_OPTIMAL, | 281 X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL, |
282 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL, | |
283 X86_TUNE_SSE_PACKED_SINGLE_INSN_OPTIMAL, | |
281 X86_TUNE_SSE_SPLIT_REGS, | 284 X86_TUNE_SSE_SPLIT_REGS, |
282 X86_TUNE_SSE_TYPELESS_STORES, | 285 X86_TUNE_SSE_TYPELESS_STORES, |
283 X86_TUNE_SSE_LOAD0_BY_PXOR, | 286 X86_TUNE_SSE_LOAD0_BY_PXOR, |
284 X86_TUNE_MEMORY_MISMATCH_STALL, | 287 X86_TUNE_MEMORY_MISMATCH_STALL, |
285 X86_TUNE_PROLOGUE_USING_MOVE, | 288 X86_TUNE_PROLOGUE_USING_MOVE, |
350 ix86_tune_features[X86_TUNE_INTEGER_DFMODE_MOVES] | 353 ix86_tune_features[X86_TUNE_INTEGER_DFMODE_MOVES] |
351 #define TARGET_PARTIAL_REG_DEPENDENCY \ | 354 #define TARGET_PARTIAL_REG_DEPENDENCY \ |
352 ix86_tune_features[X86_TUNE_PARTIAL_REG_DEPENDENCY] | 355 ix86_tune_features[X86_TUNE_PARTIAL_REG_DEPENDENCY] |
353 #define TARGET_SSE_PARTIAL_REG_DEPENDENCY \ | 356 #define TARGET_SSE_PARTIAL_REG_DEPENDENCY \ |
354 ix86_tune_features[X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY] | 357 ix86_tune_features[X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY] |
355 #define TARGET_SSE_UNALIGNED_MOVE_OPTIMAL \ | 358 #define TARGET_SSE_UNALIGNED_LOAD_OPTIMAL \ |
356 ix86_tune_features[X86_TUNE_SSE_UNALIGNED_MOVE_OPTIMAL] | 359 ix86_tune_features[X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL] |
360 #define TARGET_SSE_UNALIGNED_STORE_OPTIMAL \ | |
361 ix86_tune_features[X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL] | |
362 #define TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL \ | |
363 ix86_tune_features[X86_TUNE_SSE_PACKED_SINGLE_INSN_OPTIMAL] | |
357 #define TARGET_SSE_SPLIT_REGS ix86_tune_features[X86_TUNE_SSE_SPLIT_REGS] | 364 #define TARGET_SSE_SPLIT_REGS ix86_tune_features[X86_TUNE_SSE_SPLIT_REGS] |
358 #define TARGET_SSE_TYPELESS_STORES \ | 365 #define TARGET_SSE_TYPELESS_STORES \ |
359 ix86_tune_features[X86_TUNE_SSE_TYPELESS_STORES] | 366 ix86_tune_features[X86_TUNE_SSE_TYPELESS_STORES] |
360 #define TARGET_SSE_LOAD0_BY_PXOR ix86_tune_features[X86_TUNE_SSE_LOAD0_BY_PXOR] | 367 #define TARGET_SSE_LOAD0_BY_PXOR ix86_tune_features[X86_TUNE_SSE_LOAD0_BY_PXOR] |
361 #define TARGET_MEMORY_MISMATCH_STALL \ | 368 #define TARGET_MEMORY_MISMATCH_STALL \ |
427 ((ix86_fpmath & (FPMATH_SSE | FPMATH_387)) == (FPMATH_SSE | FPMATH_387)) | 434 ((ix86_fpmath & (FPMATH_SSE | FPMATH_387)) == (FPMATH_SSE | FPMATH_387)) |
428 | 435 |
429 #define TARGET_GNU_TLS (ix86_tls_dialect == TLS_DIALECT_GNU) | 436 #define TARGET_GNU_TLS (ix86_tls_dialect == TLS_DIALECT_GNU) |
430 #define TARGET_GNU2_TLS (ix86_tls_dialect == TLS_DIALECT_GNU2) | 437 #define TARGET_GNU2_TLS (ix86_tls_dialect == TLS_DIALECT_GNU2) |
431 #define TARGET_ANY_GNU_TLS (TARGET_GNU_TLS || TARGET_GNU2_TLS) | 438 #define TARGET_ANY_GNU_TLS (TARGET_GNU_TLS || TARGET_GNU2_TLS) |
432 #define TARGET_SUN_TLS (ix86_tls_dialect == TLS_DIALECT_SUN) | 439 #define TARGET_SUN_TLS 0 |
433 | 440 |
434 extern int ix86_isa_flags; | 441 extern int ix86_isa_flags; |
435 | 442 |
436 #ifndef TARGET_64BIT_DEFAULT | 443 #ifndef TARGET_64BIT_DEFAULT |
437 #define TARGET_64BIT_DEFAULT 0 | 444 #define TARGET_64BIT_DEFAULT 0 |
589 TARGET_CPU_DEFAULT_k6_3, | 596 TARGET_CPU_DEFAULT_k6_3, |
590 TARGET_CPU_DEFAULT_athlon, | 597 TARGET_CPU_DEFAULT_athlon, |
591 TARGET_CPU_DEFAULT_athlon_sse, | 598 TARGET_CPU_DEFAULT_athlon_sse, |
592 TARGET_CPU_DEFAULT_k8, | 599 TARGET_CPU_DEFAULT_k8, |
593 TARGET_CPU_DEFAULT_amdfam10, | 600 TARGET_CPU_DEFAULT_amdfam10, |
601 TARGET_CPU_DEFAULT_bdver1, | |
594 | 602 |
595 TARGET_CPU_DEFAULT_max | 603 TARGET_CPU_DEFAULT_max |
596 }; | 604 }; |
597 | 605 |
598 #ifndef CC1_SPEC | 606 #ifndef CC1_SPEC |
953 listed once, even those in FIXED_REGISTERS. List frame pointer | 961 listed once, even those in FIXED_REGISTERS. List frame pointer |
954 late and fixed registers last. Note that, in general, we prefer | 962 late and fixed registers last. Note that, in general, we prefer |
955 registers listed in CALL_USED_REGISTERS, keeping the others | 963 registers listed in CALL_USED_REGISTERS, keeping the others |
956 available for storage of persistent values. | 964 available for storage of persistent values. |
957 | 965 |
958 The ORDER_REGS_FOR_LOCAL_ALLOC actually overwrite the order, | 966 The ADJUST_REG_ALLOC_ORDER actually overwrite the order, |
959 so this is just empty initializer for array. */ | 967 so this is just empty initializer for array. */ |
960 | 968 |
961 #define REG_ALLOC_ORDER \ | 969 #define REG_ALLOC_ORDER \ |
962 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\ | 970 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\ |
963 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, \ | 971 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, \ |
964 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \ | 972 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \ |
965 48, 49, 50, 51, 52 } | 973 48, 49, 50, 51, 52 } |
966 | 974 |
967 /* ORDER_REGS_FOR_LOCAL_ALLOC is a macro which permits reg_alloc_order | 975 /* ADJUST_REG_ALLOC_ORDER is a macro which permits reg_alloc_order |
968 to be rearranged based on a particular function. When using sse math, | 976 to be rearranged based on a particular function. When using sse math, |
969 we want to allocate SSE before x87 registers and vice versa. */ | 977 we want to allocate SSE before x87 registers and vice versa. */ |
970 | 978 |
971 #define ORDER_REGS_FOR_LOCAL_ALLOC x86_order_regs_for_local_alloc () | 979 #define ADJUST_REG_ALLOC_ORDER x86_order_regs_for_local_alloc () |
972 | 980 |
973 | 981 |
974 #define OVERRIDE_ABI_FORMAT(FNDECL) ix86_call_abi_override (FNDECL) | 982 #define OVERRIDE_ABI_FORMAT(FNDECL) ix86_call_abi_override (FNDECL) |
975 | 983 |
976 /* Macro to conditionally modify fixed_regs/call_used_regs. */ | 984 /* Macro to conditionally modify fixed_regs/call_used_regs. */ |
1294 reg number REGNO. This could be a conditional expression | 1302 reg number REGNO. This could be a conditional expression |
1295 or could index an array. */ | 1303 or could index an array. */ |
1296 | 1304 |
1297 #define REGNO_REG_CLASS(REGNO) (regclass_map[REGNO]) | 1305 #define REGNO_REG_CLASS(REGNO) (regclass_map[REGNO]) |
1298 | 1306 |
1299 /* When defined, the compiler allows registers explicitly used in the | 1307 /* When this hook returns true for MODE, the compiler allows |
1300 rtl to be used as spill registers but prevents the compiler from | 1308 registers explicitly used in the rtl to be used as spill registers |
1301 extending the lifetime of these registers. */ | 1309 but prevents the compiler from extending the lifetime of these |
1302 | 1310 registers. */ |
1303 #define SMALL_REGISTER_CLASSES 1 | 1311 #define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true |
1304 | 1312 |
1305 #define QI_REG_P(X) (REG_P (X) && REGNO (X) <= BX_REG) | 1313 #define QI_REG_P(X) (REG_P (X) && REGNO (X) <= BX_REG) |
1306 | 1314 |
1307 #define GENERAL_REGNO_P(N) \ | 1315 #define GENERAL_REGNO_P(N) \ |
1308 ((N) <= STACK_POINTER_REGNUM || REX_INT_REGNO_P (N)) | 1316 ((N) <= STACK_POINTER_REGNUM || REX_INT_REGNO_P (N)) |
1552 The attribute stdcall is equivalent to RTD on a per module basis. */ | 1560 The attribute stdcall is equivalent to RTD on a per module basis. */ |
1553 | 1561 |
1554 #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, SIZE) \ | 1562 #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, SIZE) \ |
1555 ix86_return_pops_args ((FUNDECL), (FUNTYPE), (SIZE)) | 1563 ix86_return_pops_args ((FUNDECL), (FUNTYPE), (SIZE)) |
1556 | 1564 |
1557 #define FUNCTION_VALUE_REGNO_P(N) ix86_function_value_regno_p (N) | |
1558 | |
1559 /* Define how to find the value returned by a library function | 1565 /* Define how to find the value returned by a library function |
1560 assuming the value has mode MODE. */ | 1566 assuming the value has mode MODE. */ |
1561 | 1567 |
1562 #define LIBCALL_VALUE(MODE) ix86_libcall_value (MODE) | 1568 #define LIBCALL_VALUE(MODE) ix86_libcall_value (MODE) |
1563 | 1569 |
1578 | 1584 |
1579 typedef struct ix86_args { | 1585 typedef struct ix86_args { |
1580 int words; /* # words passed so far */ | 1586 int words; /* # words passed so far */ |
1581 int nregs; /* # registers available for passing */ | 1587 int nregs; /* # registers available for passing */ |
1582 int regno; /* next available register number */ | 1588 int regno; /* next available register number */ |
1583 int fastcall; /* fastcall calling convention is used */ | 1589 int fastcall; /* fastcall or thiscall calling convention |
1590 is used */ | |
1584 int sse_words; /* # sse words passed so far */ | 1591 int sse_words; /* # sse words passed so far */ |
1585 int sse_nregs; /* # sse registers available for passing */ | 1592 int sse_nregs; /* # sse registers available for passing */ |
1586 int warn_avx; /* True when we want to warn about AVX ABI. */ | 1593 int warn_avx; /* True when we want to warn about AVX ABI. */ |
1587 int warn_sse; /* True when we want to warn about SSE ABI. */ | 1594 int warn_sse; /* True when we want to warn about SSE ABI. */ |
1588 int warn_mmx; /* True when we want to warn about MMX ABI. */ | 1595 int warn_mmx; /* True when we want to warn about MMX ABI. */ |
1625 (otherwise it is an extra parameter matching an ellipsis). */ | 1632 (otherwise it is an extra parameter matching an ellipsis). */ |
1626 | 1633 |
1627 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ | 1634 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ |
1628 function_arg (&(CUM), (MODE), (TYPE), (NAMED)) | 1635 function_arg (&(CUM), (MODE), (TYPE), (NAMED)) |
1629 | 1636 |
1630 #define TARGET_ASM_FILE_END ix86_file_end | |
1631 #define NEED_INDICATE_EXEC_STACK 0 | |
1632 | |
1633 /* Output assembler code to FILE to increment profiler label # LABELNO | 1637 /* Output assembler code to FILE to increment profiler label # LABELNO |
1634 for profiling a function entry. */ | 1638 for profiling a function entry. */ |
1635 | 1639 |
1636 #define FUNCTION_PROFILER(FILE, LABELNO) x86_function_profiler (FILE, LABELNO) | 1640 #define FUNCTION_PROFILER(FILE, LABELNO) x86_function_profiler (FILE, LABELNO) |
1637 | 1641 |
1808 : X86_32_REGPARM_MAX) | 1812 : X86_32_REGPARM_MAX) |
1809 | 1813 |
1810 #define X86_64_SSE_REGPARM_MAX 8 | 1814 #define X86_64_SSE_REGPARM_MAX 8 |
1811 #define X86_64_MS_SSE_REGPARM_MAX 4 | 1815 #define X86_64_MS_SSE_REGPARM_MAX 4 |
1812 | 1816 |
1813 #define X86_32_SSE_REGPARM_MAX (TARGET_SSE ? 3 : 0) | 1817 #define X86_32_SSE_REGPARM_MAX (TARGET_SSE ? (TARGET_MACHO ? 4 : 3) : 0) |
1814 | 1818 |
1815 #define SSE_REGPARM_MAX \ | 1819 #define SSE_REGPARM_MAX \ |
1816 (TARGET_64BIT ? (TARGET_64BIT_MS_ABI ? X86_64_MS_SSE_REGPARM_MAX \ | 1820 (TARGET_64BIT ? (TARGET_64BIT_MS_ABI ? X86_64_MS_SSE_REGPARM_MAX \ |
1817 : X86_64_SSE_REGPARM_MAX) \ | 1821 : X86_64_SSE_REGPARM_MAX) \ |
1818 : X86_32_SSE_REGPARM_MAX) | 1822 : X86_32_SSE_REGPARM_MAX) |
2148 || (!TARGET_64BIT && !HAVE_AS_GOTOFF_IN_DATA))) | 2152 || (!TARGET_64BIT && !HAVE_AS_GOTOFF_IN_DATA))) |
2149 | 2153 |
2150 /* Switch to init or fini section via SECTION_OP, emit a call to FUNC, | 2154 /* Switch to init or fini section via SECTION_OP, emit a call to FUNC, |
2151 and switch back. For x86 we do this only to save a few bytes that | 2155 and switch back. For x86 we do this only to save a few bytes that |
2152 would otherwise be unused in the text section. */ | 2156 would otherwise be unused in the text section. */ |
2153 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ | 2157 #define CRT_MKSTR2(VAL) #VAL |
2154 asm (SECTION_OP "\n\t" \ | 2158 #define CRT_MKSTR(x) CRT_MKSTR2(x) |
2155 "call " USER_LABEL_PREFIX #FUNC "\n" \ | 2159 |
2160 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ | |
2161 asm (SECTION_OP "\n\t" \ | |
2162 "call " CRT_MKSTR(__USER_LABEL_PREFIX__) #FUNC "\n" \ | |
2156 TEXT_SECTION_ASM_OP); | 2163 TEXT_SECTION_ASM_OP); |
2157 | 2164 |
2158 /* Print operand X (an rtx) in assembler syntax to file FILE. | 2165 /* Print operand X (an rtx) in assembler syntax to file FILE. |
2159 CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. | 2166 CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. |
2160 Effect of various CODE letters is described in i386.c near | 2167 Effect of various CODE letters is described in i386.c near |
2192 PROCESSOR_NOCONA, | 2199 PROCESSOR_NOCONA, |
2193 PROCESSOR_CORE2, | 2200 PROCESSOR_CORE2, |
2194 PROCESSOR_GENERIC32, | 2201 PROCESSOR_GENERIC32, |
2195 PROCESSOR_GENERIC64, | 2202 PROCESSOR_GENERIC64, |
2196 PROCESSOR_AMDFAM10, | 2203 PROCESSOR_AMDFAM10, |
2204 PROCESSOR_BDVER1, | |
2197 PROCESSOR_ATOM, | 2205 PROCESSOR_ATOM, |
2198 PROCESSOR_max | 2206 PROCESSOR_max |
2199 }; | 2207 }; |
2200 | 2208 |
2201 extern enum processor_type ix86_tune; | 2209 extern enum processor_type ix86_tune; |