annotate gcc/config/aarch64/aarch64-elf.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Machine description for AArch64 architecture.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 2009-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 Contributed by ARM Ltd.
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
8 under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
9 the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
10 any later version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful, but
kono
parents:
diff changeset
13 WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
kono
parents:
diff changeset
15 General Public License for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 #ifndef GCC_AARCH64_ELF_H
kono
parents:
diff changeset
22 #define GCC_AARCH64_ELF_H
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 #define ASM_OUTPUT_LABELREF(FILE, NAME) \
kono
parents:
diff changeset
26 aarch64_asm_output_labelref (FILE, NAME)
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 #define TEXT_SECTION_ASM_OP "\t.text"
kono
parents:
diff changeset
29 #define DATA_SECTION_ASM_OP "\t.data"
kono
parents:
diff changeset
30 #define BSS_SECTION_ASM_OP "\t.bss"
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 #define CTORS_SECTION_ASM_OP "\t.section\t.init_array,\"aw\",%init_array"
kono
parents:
diff changeset
33 #define DTORS_SECTION_ASM_OP "\t.section\t.fini_array,\"aw\",%fini_array"
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 #undef INIT_SECTION_ASM_OP
kono
parents:
diff changeset
36 #undef FINI_SECTION_ASM_OP
kono
parents:
diff changeset
37 #define INIT_ARRAY_SECTION_ASM_OP CTORS_SECTION_ASM_OP
kono
parents:
diff changeset
38 #define FINI_ARRAY_SECTION_ASM_OP DTORS_SECTION_ASM_OP
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 /* Since we use .init_array/.fini_array we don't need the markers at
kono
parents:
diff changeset
41 the start and end of the ctors/dtors arrays. */
kono
parents:
diff changeset
42 #define CTOR_LIST_BEGIN asm (CTORS_SECTION_ASM_OP)
kono
parents:
diff changeset
43 #define CTOR_LIST_END /* empty */
kono
parents:
diff changeset
44 #define DTOR_LIST_BEGIN asm (DTORS_SECTION_ASM_OP)
kono
parents:
diff changeset
45 #define DTOR_LIST_END /* empty */
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 #undef TARGET_ASM_CONSTRUCTOR
kono
parents:
diff changeset
48 #define TARGET_ASM_CONSTRUCTOR aarch64_elf_asm_constructor
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 #undef TARGET_ASM_DESTRUCTOR
kono
parents:
diff changeset
51 #define TARGET_ASM_DESTRUCTOR aarch64_elf_asm_destructor
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
kono
parents:
diff changeset
54 /* Support for -falign-* switches. Use .p2align to ensure that code
kono
parents:
diff changeset
55 sections are padded with NOP instructions, rather than zeros. */
kono
parents:
diff changeset
56 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP) \
kono
parents:
diff changeset
57 do \
kono
parents:
diff changeset
58 { \
kono
parents:
diff changeset
59 if ((LOG) != 0) \
kono
parents:
diff changeset
60 { \
kono
parents:
diff changeset
61 if ((MAX_SKIP) == 0) \
kono
parents:
diff changeset
62 fprintf ((FILE), "\t.p2align %d\n", (int) (LOG)); \
kono
parents:
diff changeset
63 else \
kono
parents:
diff changeset
64 fprintf ((FILE), "\t.p2align %d,,%d\n", \
kono
parents:
diff changeset
65 (int) (LOG), (int) (MAX_SKIP)); \
kono
parents:
diff changeset
66 } \
kono
parents:
diff changeset
67 } while (0)
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 #endif /* HAVE_GAS_MAX_SKIP_P2ALIGN */
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 #define JUMP_TABLES_IN_TEXT_SECTION 0
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \
kono
parents:
diff changeset
74 do { \
kono
parents:
diff changeset
75 switch (GET_MODE (BODY)) \
kono
parents:
diff changeset
76 { \
kono
parents:
diff changeset
77 case E_QImode: \
kono
parents:
diff changeset
78 asm_fprintf (STREAM, "\t.byte\t(%LL%d - %LLrtx%d) / 4\n", \
kono
parents:
diff changeset
79 VALUE, REL); \
kono
parents:
diff changeset
80 break; \
kono
parents:
diff changeset
81 case E_HImode: \
kono
parents:
diff changeset
82 asm_fprintf (STREAM, "\t.2byte\t(%LL%d - %LLrtx%d) / 4\n", \
kono
parents:
diff changeset
83 VALUE, REL); \
kono
parents:
diff changeset
84 break; \
kono
parents:
diff changeset
85 case E_SImode: \
kono
parents:
diff changeset
86 case E_DImode: /* See comment in aarch64_output_casesi. */ \
kono
parents:
diff changeset
87 asm_fprintf (STREAM, "\t.word\t(%LL%d - %LLrtx%d) / 4\n", \
kono
parents:
diff changeset
88 VALUE, REL); \
kono
parents:
diff changeset
89 break; \
kono
parents:
diff changeset
90 default: \
kono
parents:
diff changeset
91 gcc_unreachable (); \
kono
parents:
diff changeset
92 } \
kono
parents:
diff changeset
93 } while (0)
kono
parents:
diff changeset
94
kono
parents:
diff changeset
95 #define ASM_OUTPUT_ALIGN(STREAM, POWER) \
kono
parents:
diff changeset
96 fprintf(STREAM, "\t.align\t%d\n", (int)POWER)
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 #define ASM_COMMENT_START "//"
kono
parents:
diff changeset
99
kono
parents:
diff changeset
100 #define LOCAL_LABEL_PREFIX "."
kono
parents:
diff changeset
101 #define USER_LABEL_PREFIX ""
kono
parents:
diff changeset
102
kono
parents:
diff changeset
103 #define GLOBAL_ASM_OP "\t.global\t"
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 #ifdef TARGET_BIG_ENDIAN_DEFAULT
kono
parents:
diff changeset
106 #define ENDIAN_SPEC "-mbig-endian"
kono
parents:
diff changeset
107 #else
kono
parents:
diff changeset
108 #define ENDIAN_SPEC "-mlittle-endian"
kono
parents:
diff changeset
109 #endif
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 #if TARGET_DATA_MODEL == 1
kono
parents:
diff changeset
112 #define ABI_SPEC "-mabi=lp64"
kono
parents:
diff changeset
113 #define MULTILIB_DEFAULTS { "mabi=lp64" }
kono
parents:
diff changeset
114 #elif TARGET_DATA_MODEL == 2
kono
parents:
diff changeset
115 #define ABI_SPEC "-mabi=ilp32"
kono
parents:
diff changeset
116 #define MULTILIB_DEFAULTS { "mabi=ilp32" }
kono
parents:
diff changeset
117 #else
kono
parents:
diff changeset
118 #error "Unknown or undefined TARGET_DATA_MODEL!"
kono
parents:
diff changeset
119 #endif
kono
parents:
diff changeset
120
kono
parents:
diff changeset
121 /* Force the default endianness and ABI flags onto the command line
kono
parents:
diff changeset
122 in order to make the other specs easier to write. */
kono
parents:
diff changeset
123 #undef DRIVER_SELF_SPECS
kono
parents:
diff changeset
124 #define DRIVER_SELF_SPECS \
kono
parents:
diff changeset
125 " %{!mbig-endian:%{!mlittle-endian:" ENDIAN_SPEC "}}" \
kono
parents:
diff changeset
126 " %{!mabi=*:" ABI_SPEC "}" \
kono
parents:
diff changeset
127 MCPU_MTUNE_NATIVE_SPECS
kono
parents:
diff changeset
128
kono
parents:
diff changeset
129 #ifdef HAVE_AS_MABI_OPTION
kono
parents:
diff changeset
130 #define ASM_MABI_SPEC "%{mabi=*:-mabi=%*}"
kono
parents:
diff changeset
131 #else
kono
parents:
diff changeset
132 #define ASM_MABI_SPEC "%{mabi=lp64:}"
kono
parents:
diff changeset
133 #endif
kono
parents:
diff changeset
134
kono
parents:
diff changeset
135 #ifndef ASM_SPEC
kono
parents:
diff changeset
136 #define ASM_SPEC "\
kono
parents:
diff changeset
137 %{mbig-endian:-EB} \
kono
parents:
diff changeset
138 %{mlittle-endian:-EL} \
kono
parents:
diff changeset
139 %{march=*:-march=%*} \
kono
parents:
diff changeset
140 %(asm_cpu_spec)" \
kono
parents:
diff changeset
141 ASM_MABI_SPEC
kono
parents:
diff changeset
142 #endif
kono
parents:
diff changeset
143
kono
parents:
diff changeset
144 #undef TYPE_OPERAND_FMT
kono
parents:
diff changeset
145 #define TYPE_OPERAND_FMT "%%%s"
kono
parents:
diff changeset
146
kono
parents:
diff changeset
147 /* Stabs debug not required. */
kono
parents:
diff changeset
148 #undef DBX_DEBUGGING_INFO
kono
parents:
diff changeset
149
kono
parents:
diff changeset
150 #endif /* GCC_AARCH64_ELF_H */