1/* OS independent definitions for AMD x86-64. 2 Copyright (C) 2001, 2005, 2007, 2009 Free Software Foundation, Inc. 3 Contributed by Bo Thorsen <bo@suse.de>. 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify 8it under the terms of the GNU General Public License as published by 9the Free Software Foundation; either version 3, or (at your option) 10any later version. 11 12GCC is distributed in the hope that it will be useful, 13but WITHOUT ANY WARRANTY; without even the implied warranty of 14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15GNU General Public License for more details. 16 17Under Section 7 of GPL version 3, you are granted additional 18permissions described in the GCC Runtime Library Exception, version 193.1, as published by the Free Software Foundation. 20 21You should have received a copy of the GNU General Public License and 22a copy of the GCC Runtime Library Exception along with this program; 23see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24<http://www.gnu.org/licenses/>. */ 25 26#undef ASM_COMMENT_START 27#define ASM_COMMENT_START "#" 28 29#undef DBX_REGISTER_NUMBER 30#define DBX_REGISTER_NUMBER(n) \ 31 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) 32 33/* Output assembler code to FILE to call the profiler. */ 34#define NO_PROFILE_COUNTERS 1 35 36#undef MCOUNT_NAME 37#define MCOUNT_NAME "mcount" 38 39#undef SIZE_TYPE 40#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") 41 42#undef PTRDIFF_TYPE 43#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") 44 45#undef WCHAR_TYPE 46#define WCHAR_TYPE "int" 47 48#undef WCHAR_TYPE_SIZE 49#define WCHAR_TYPE_SIZE 32 50 51#undef CC1_SPEC 52#define CC1_SPEC "%(cc1_cpu) %{profile:-p}" 53 54#undef ASM_SPEC 55#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \ 56 %{Wa,*:%*} %{m32:--32} %{m64:--64}" 57 58#undef ASM_OUTPUT_ALIGNED_BSS 59#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ 60 x86_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) 61 62#undef ASM_OUTPUT_ALIGNED_COMMON 63#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ 64 x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN); 65 66/* This is used to align code labels according to Intel recommendations. */ 67 68#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN 69#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ 70 do { \ 71 if ((LOG) != 0) { \ 72 if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 73 else { \ 74 fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ 75 /* Make sure that we have at least 8 byte alignment if > 8 byte \ 76 alignment is preferred. */ \ 77 if ((LOG) > 3 \ 78 && (1 << (LOG)) > ((MAX_SKIP) + 1) \ 79 && (MAX_SKIP) >= 7) \ 80 fputs ("\t.p2align 3\n", (FILE)); \ 81 } \ 82 } \ 83 } while (0) 84#undef ASM_OUTPUT_MAX_SKIP_PAD 85#define ASM_OUTPUT_MAX_SKIP_PAD(FILE, LOG, MAX_SKIP) \ 86 if ((LOG) != 0) \ 87 { \ 88 if ((MAX_SKIP) == 0) \ 89 fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 90 else \ 91 fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ 92 } 93#endif 94 95 96/* i386 System V Release 4 uses DWARF debugging info. 97 x86-64 ABI specifies DWARF2. */ 98 99#define DWARF2_DEBUGGING_INFO 1 100#define DWARF2_UNWIND_INFO 1 101 102#undef PREFERRED_DEBUGGING_TYPE 103#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG 104 105#undef TARGET_ASM_SELECT_SECTION 106#define TARGET_ASM_SELECT_SECTION x86_64_elf_select_section 107 108#undef TARGET_ASM_UNIQUE_SECTION 109#define TARGET_ASM_UNIQUE_SECTION x86_64_elf_unique_section 110