]>
Commit | Line | Data |
---|---|---|
14f73b5a JH |
1 | /* OS independent definitions for AMD x86-64. |
2 | Copyright (C) 2001 Free Software Foundation, Inc. | |
3 | Contributed by Bo Thorsen <bo@suse.de>. | |
4 | ||
5 | This file is part of GNU CC. | |
6 | ||
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) | |
10 | any later version. | |
11 | ||
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. | |
16 | ||
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, 59 Temple Place - Suite 330, | |
20 | Boston, MA 02111-1307, USA. */ | |
21 | ||
22 | /* The svr4 ABI for the i386 says that records and unions are returned | |
23 | in memory. */ | |
24 | #undef DEFAULT_PCC_STRUCT_RETURN | |
25 | #define DEFAULT_PCC_STRUCT_RETURN 1 | |
26 | ||
27 | #undef ASM_COMMENT_START | |
28 | #define ASM_COMMENT_START "#" | |
29 | ||
30 | /* This is how to output an element of a case-vector that is relative. | |
31 | This is only used for PIC code. See comments by the `casesi' insn in | |
32 | i386.md for an explanation of the expression this outputs. */ | |
33 | #undef ASM_OUTPUT_ADDR_DIFF_ELT | |
34 | #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ | |
35 | if (TARGET_64BIT) \ | |
36 | fprintf (FILE, "\t.long %s%d-.+4+(.-%s%d)\n", LPREFIX, VALUE, LPREFIX, REL); \ | |
37 | else \ | |
38 | fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE) | |
39 | ||
40 | /* Indicate that jump tables go in the text section. This is | |
41 | necessary when compiling PIC code. */ | |
42 | #define JUMP_TABLES_IN_TEXT_SECTION (flag_pic && !TARGET_64BIT) | |
43 | ||
44 | #undef DBX_REGISTER_NUMBER | |
45 | #define DBX_REGISTER_NUMBER(n) \ | |
46 | (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) | |
47 | ||
48 | /* Output assembler code to FILE to call the profiler. */ | |
49 | #define NO_PROFILE_COUNTERS | |
50 | ||
51 | #undef FUNCTION_PROFILER | |
52 | #define FUNCTION_PROFILER(FILE, LABELNO) \ | |
53 | { \ | |
54 | if (TARGET_64BIT && flag_pic) \ | |
55 | fprintf (FILE, "\tcall\t*mcount@PLT\n"); \ | |
56 | else if (flag_pic) \ | |
57 | fprintf (FILE, "\tcall\t*mcount@GOT(%%ebx)\n"); \ | |
58 | else \ | |
59 | fprintf (FILE, "\tcall\tmcount\n"); \ | |
60 | } | |
61 | ||
62 | #undef SIZE_TYPE | |
63 | #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") | |
64 | ||
65 | #undef PTRDIFF_TYPE | |
66 | #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") | |
67 | ||
68 | #undef WCHAR_TYPE | |
69 | #define WCHAR_TYPE "int" | |
70 | ||
71 | #undef WCHAR_TYPE_SIZE | |
72 | #define WCHAR_TYPE_SIZE 32 | |
73 | ||
74 | #undef CC1_SPEC | |
75 | #define CC1_SPEC "%(cc1_cpu) %{profile:-p}" | |
76 | ||
77 | #undef ASM_SPEC | |
78 | #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \ | |
79 | %{Wa,*:%*} %{m32:--32}" | |
80 | ||
81 | /* A C statement (sans semicolon) to output to the stdio stream | |
82 | FILE the assembler definition of uninitialized global DECL named | |
83 | NAME whose size is SIZE bytes and alignment is ALIGN bytes. | |
84 | Try to use asm_output_aligned_bss to implement this macro. */ | |
85 | ||
86 | #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ | |
87 | asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) | |
88 | ||
89 | /* A C statement to output to the stdio stream FILE an assembler | |
90 | command to advance the location counter to a multiple of 1<<LOG | |
91 | bytes if it is within MAX_SKIP bytes. | |
92 | ||
93 | This is used to align code labels according to Intel recommendations. */ | |
94 | ||
95 | #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN | |
96 | #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ | |
97 | do { \ | |
98 | if ((LOG) != 0) { \ | |
99 | if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ | |
100 | else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ | |
101 | } \ | |
102 | } while (0) | |
103 | #endif | |
104 | ||
105 | ||
106 | /* i386 System V Release 4 uses DWARF debugging info. | |
107 | x86-64 ABI specifies DWARF2. */ | |
108 | ||
109 | #undef DWARF2_DEBUGGING_INFO | |
110 | #undef DWARF_DEBUGGING_INFO | |
111 | #define DWARF2_DEBUGGING_INFO | |
112 | #define DWARF2_UNWIND_INFO 1 | |
113 | /* Incorrectly autodetected in cross compilation. */ | |
114 | #undef HAVE_AS_DWARF2_DEBUG_LINE | |
115 | #define HAVE_AS_DWARF2_DEBUG_LINE | |
116 | ||
117 | #undef PREFERRED_DEBUGGING_TYPE | |
118 | #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG |