]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/i386/x86-64.h
1 /* OS independent definitions for AMD x86-64.
2 Copyright (C) 2001 Free Software Foundation, Inc.
3 Contributed by Bo Thorsen <bo@suse.de>.
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, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* The svr4 ABI for the i386 says that records and unions are returned
24 #undef DEFAULT_PCC_STRUCT_RETURN
25 #define DEFAULT_PCC_STRUCT_RETURN 1
27 #undef ASM_COMMENT_START
28 #define ASM_COMMENT_START "#"
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) \
36 fprintf (FILE, "\t.long %s%d-.+4+(.-%s%d)\n", LPREFIX, VALUE, LPREFIX, REL); \
38 fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
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)
44 #undef DBX_REGISTER_NUMBER
45 #define DBX_REGISTER_NUMBER(n) \
46 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
48 /* Output assembler code to FILE to call the profiler. */
49 #define NO_PROFILE_COUNTERS
51 #undef FUNCTION_PROFILER
52 #define FUNCTION_PROFILER(FILE, LABELNO) \
54 if (TARGET_64BIT && flag_pic) \
55 fprintf (FILE, "\tcall\t*mcount@PLT\n"); \
57 fprintf (FILE, "\tcall\t*mcount@GOT(%%ebx)\n"); \
59 fprintf (FILE, "\tcall\tmcount\n"); \
63 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
66 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
69 #define WCHAR_TYPE "int"
71 #undef WCHAR_TYPE_SIZE
72 #define WCHAR_TYPE_SIZE 32
75 #define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
78 #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
79 %{Wa,*:%*} %{m32:--32}"
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. */
86 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
87 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
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.
93 This is used to align code labels according to Intel recommendations. */
95 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
96 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
99 if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
100 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
106 /* i386 System V Release 4 uses DWARF debugging info.
107 x86-64 ABI specifies DWARF2. */
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
117 #undef PREFERRED_DEBUGGING_TYPE
118 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG