Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/arm/elf.h @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | 77e2b8dfacca |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Definitions of target machine for GNU compiler. | 1 /* Definitions of target machine for GNU compiler. |
2 For ARM with ELF obj format. | 2 For ARM with ELF obj format. |
3 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2004, 2005, 2007, | 3 Copyright (C) 1995-2017 Free Software Foundation, Inc. |
4 2008 Free Software Foundation, Inc. | |
5 Contributed by Philip Blundell <philb@gnu.org> and | 4 Contributed by Philip Blundell <philb@gnu.org> and |
6 Catherine Moore <clm@cygnus.com> | 5 Catherine Moore <clm@cygnus.com> |
7 | 6 |
8 This file is part of GCC. | 7 This file is part of GCC. |
9 | 8 |
15 GCC is distributed in the hope that it will be useful, but WITHOUT | 14 GCC is distributed in the hope that it will be useful, but WITHOUT |
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | 15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
17 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | 16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
18 License for more details. | 17 License for more details. |
19 | 18 |
20 You should have received a copy of the GNU General Public License | 19 Under Section 7 of GPL version 3, you are granted additional |
21 along with GCC; see the file COPYING3. If not see | 20 permissions described in the GCC Runtime Library Exception, version |
21 3.1, as published by the Free Software Foundation. | |
22 | |
23 You should have received a copy of the GNU General Public License and | |
24 a copy of the GCC Runtime Library Exception along with this program; | |
25 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
22 <http://www.gnu.org/licenses/>. */ | 26 <http://www.gnu.org/licenses/>. */ |
23 | 27 |
24 #ifndef OBJECT_FORMAT_ELF | 28 #ifndef OBJECT_FORMAT_ELF |
25 #error elf.h included before elfos.h | 29 #error elf.h included before elfos.h |
26 #endif | 30 #endif |
54 | 58 |
55 #ifndef ASM_SPEC | 59 #ifndef ASM_SPEC |
56 #define ASM_SPEC "\ | 60 #define ASM_SPEC "\ |
57 %{mbig-endian:-EB} \ | 61 %{mbig-endian:-EB} \ |
58 %{mlittle-endian:-EL} \ | 62 %{mlittle-endian:-EL} \ |
59 %{mcpu=*:-mcpu=%*} \ | 63 %(asm_cpu_spec) \ |
60 %{march=*:-march=%*} \ | |
61 %{mapcs-*:-mapcs-%*} \ | 64 %{mapcs-*:-mapcs-%*} \ |
62 %(subtarget_asm_float_spec) \ | 65 %(subtarget_asm_float_spec) \ |
63 %{mthumb-interwork:-mthumb-interwork} \ | 66 %{mthumb-interwork:-mthumb-interwork} \ |
64 %{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \ | 67 %{mfloat-abi=*} %{!mfpu=auto: %{mfpu=*}} \ |
65 %{mfloat-abi=*} %{mfpu=*} \ | |
66 %(subtarget_extra_asm_spec)" | 68 %(subtarget_extra_asm_spec)" |
67 #endif | 69 #endif |
68 | 70 |
69 /* The ARM uses @ are a comment character so we need to redefine | 71 /* The ARM uses @ are a comment character so we need to redefine |
70 TYPE_OPERAND_FMT. */ | 72 TYPE_OPERAND_FMT. */ |
71 #undef TYPE_OPERAND_FMT | 73 #undef TYPE_OPERAND_FMT |
72 #define TYPE_OPERAND_FMT "%%%s" | 74 #define TYPE_OPERAND_FMT "%%%s" |
73 | 75 |
74 /* We might need a ARM specific header to function declarations. */ | 76 /* We might need a ARM specific header to function declarations. */ |
75 #undef ASM_DECLARE_FUNCTION_NAME | 77 #undef ASM_DECLARE_FUNCTION_NAME |
76 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ | 78 #define ASM_DECLARE_FUNCTION_NAME arm_asm_declare_function_name |
77 do \ | |
78 { \ | |
79 ARM_DECLARE_FUNCTION_NAME (FILE, NAME, DECL); \ | |
80 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ | |
81 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ | |
82 ASM_OUTPUT_LABEL(FILE, NAME); \ | |
83 ARM_OUTPUT_FN_UNWIND (FILE, TRUE); \ | |
84 } \ | |
85 while (0) | |
86 | 79 |
87 /* We might need an ARM specific trailer for function declarations. */ | 80 /* We might need an ARM specific trailer for function declarations. */ |
88 #undef ASM_DECLARE_FUNCTION_SIZE | 81 #undef ASM_DECLARE_FUNCTION_SIZE |
89 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ | 82 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ |
90 do \ | 83 do \ |
100 Otherwise, the readonly data section is used. */ | 93 Otherwise, the readonly data section is used. */ |
101 /* We put ARM and Thumb-2 jump tables in the text section, because it makes | 94 /* We put ARM and Thumb-2 jump tables in the text section, because it makes |
102 the code more efficient, but for Thumb-1 it's better to put them out of | 95 the code more efficient, but for Thumb-1 it's better to put them out of |
103 band unless we are generating compressed tables. */ | 96 band unless we are generating compressed tables. */ |
104 #define JUMP_TABLES_IN_TEXT_SECTION \ | 97 #define JUMP_TABLES_IN_TEXT_SECTION \ |
105 (TARGET_32BIT || (TARGET_THUMB && (optimize_size || flag_pic))) | 98 ((TARGET_32BIT || (TARGET_THUMB && (optimize_size || flag_pic))) \ |
99 && !target_pure_code) | |
106 | 100 |
107 #ifndef LINK_SPEC | 101 #ifndef LINK_SPEC |
108 #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" | 102 #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" |
109 #endif | 103 #endif |
110 | 104 |
111 /* Run-time Target Specification. */ | 105 /* Run-time Target Specification. */ |
112 #ifndef TARGET_VERSION | |
113 #define TARGET_VERSION fputs (" (ARM/elf)", stderr) | |
114 #endif | |
115 | |
116 #ifndef TARGET_DEFAULT | 106 #ifndef TARGET_DEFAULT |
117 #define TARGET_DEFAULT (MASK_APCS_FRAME) | 107 #define TARGET_DEFAULT (MASK_APCS_FRAME) |
118 #endif | 108 #endif |
119 | 109 |
120 #ifndef MULTILIB_DEFAULTS | |
121 #define MULTILIB_DEFAULTS \ | |
122 { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork", "fno-leading-underscore" } | |
123 #endif | |
124 | 110 |
125 #define TARGET_ASM_FILE_START_APP_OFF true | |
126 #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true | 111 #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true |
127 | 112 |
128 | 113 |
129 /* Output an element in the static constructor array. */ | 114 /* Output an element in the static constructor array. */ |
130 #undef TARGET_ASM_CONSTRUCTOR | 115 #undef TARGET_ASM_CONSTRUCTOR |
149 fprintf (STREAM, "\t.align\t%d\n", POWER); \ | 134 fprintf (STREAM, "\t.align\t%d\n", POWER); \ |
150 } \ | 135 } \ |
151 while (0) | 136 while (0) |
152 | 137 |
153 /* Horrible hack: We want to prevent some libgcc routines being included | 138 /* Horrible hack: We want to prevent some libgcc routines being included |
154 for some multilibs. */ | 139 for some multilibs. The condition should match the one in |
155 #ifndef __ARM_ARCH_6M__ | 140 libgcc/config/arm/lib1funcs.S. */ |
141 #if __ARM_ARCH_ISA_ARM || __ARM_ARCH_ISA_THUMB != 1 | |
156 #undef L_fixdfsi | 142 #undef L_fixdfsi |
157 #undef L_fixunsdfsi | 143 #undef L_fixunsdfsi |
158 #undef L_truncdfsf2 | 144 #undef L_truncdfsf2 |
159 #undef L_fixsfsi | 145 #undef L_fixsfsi |
160 #undef L_fixunssfsi | 146 #undef L_fixunssfsi |