Mercurial > hg > CbC > CbC_gcc
annotate gcc/config/arm/vxworks.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
rev | line source |
---|---|
0 | 1 /* Definitions of target machine for GCC, |
111 | 2 for ARM with targeting the VXWorks run time environment. |
131 | 3 Copyright (C) 1999-2018 Free Software Foundation, Inc. |
0 | 4 |
5 Contributed by: Mike Stump <mrs@wrs.com> | |
6 Brought up to date by CodeSourcery, LLC. | |
7 | |
8 This file is part of GCC. | |
9 | |
10 GCC is free software; you can redistribute it and/or modify | |
11 it under the terms of the GNU General Public License as published by | |
12 the Free Software Foundation; either version 3, or (at your option) | |
13 any later version. | |
14 | |
15 GCC is distributed in the hope that it will be useful, | |
16 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 GNU General Public License for more details. | |
19 | |
111 | 20 Under Section 7 of GPL version 3, you are granted additional |
21 permissions described in the GCC Runtime Library Exception, version | |
22 3.1, as published by the Free Software Foundation. | |
23 | |
24 You should have received a copy of the GNU General Public License and | |
25 a copy of the GCC Runtime Library Exception along with this program; | |
26 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
0 | 27 <http://www.gnu.org/licenses/>. */ |
28 | |
111 | 29 /* TARGET_OS_CPP_BUILTINS, down to BPABI if defined. */ |
0 | 30 |
111 | 31 #if defined (TARGET_BPABI_CPP_BUILTINS) |
32 #define MAYBE_TARGET_BPABI_CPP_BUILTINS TARGET_BPABI_CPP_BUILTINS | |
33 #else | |
34 #define MAYBE_TARGET_BPABI_CPP_BUILTINS() | |
35 #endif | |
36 | |
37 #undef TARGET_OS_CPP_BUILTINS | |
0 | 38 #define TARGET_OS_CPP_BUILTINS() \ |
39 do { \ | |
40 if (TARGET_BIG_END) \ | |
41 builtin_define ("ARMEB"); \ | |
42 else \ | |
43 builtin_define ("ARMEL"); \ | |
44 \ | |
45 if (arm_arch_xscale) \ | |
46 builtin_define ("CPU=XSCALE"); \ | |
111 | 47 else if (arm_arch7) \ |
48 { \ | |
49 if (!arm_arch_notm) \ | |
50 builtin_define ("CPU=ARMARCH7M"); \ | |
51 else if (TARGET_THUMB) \ | |
52 builtin_define ("CPU=ARMARCH7_T2"); \ | |
53 else \ | |
54 builtin_define ("CPU=ARMARCH7"); \ | |
55 } \ | |
56 else if (arm_arch6) \ | |
57 { \ | |
58 if (TARGET_THUMB) \ | |
59 builtin_define ("CPU=ARMARCH6_T"); \ | |
60 else \ | |
61 builtin_define ("CPU=ARMARCH6"); \ | |
62 } \ | |
131 | 63 else if (arm_arch5t) \ |
64 builtin_define ("CPU=ARMARCH5_T"); \ | |
0 | 65 else if (arm_arch4) \ |
66 { \ | |
111 | 67 if (TARGET_THUMB) \ |
0 | 68 builtin_define ("CPU=ARMARCH4_T"); \ |
69 else \ | |
70 builtin_define ("CPU=ARMARCH4"); \ | |
71 } \ | |
72 VXWORKS_OS_CPP_BUILTINS (); \ | |
111 | 73 MAYBE_TARGET_BPABI_CPP_BUILTINS (); \ |
0 | 74 } while (0) |
75 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
76 #undef SUBTARGET_OVERRIDE_OPTIONS |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
77 #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS |
0 | 78 |
79 /* Subsume the arm/elf.h definition, and add RTP hooks. */ | |
80 #undef SUBTARGET_CPP_SPEC | |
81 #define SUBTARGET_CPP_SPEC "-D__ELF__" VXWORKS_ADDITIONAL_CPP_SPEC | |
82 | |
111 | 83 /* .text.hot and .text.unlikely sections are badly handled by the |
84 VxWorks kernel mode loader for ARM style exceptions. */ | |
85 | |
86 #if ARM_UNWIND_INFO | |
87 #define EXTRA_CC1_SPEC "%{!mrtp:-fno-reorder-functions}" | |
88 #else | |
89 #define EXTRA_CC1_SPEC | |
90 #endif | |
91 | |
0 | 92 #undef CC1_SPEC |
111 | 93 #define CC1_SPEC "" EXTRA_CC1_SPEC |
94 | |
95 /* Translate an explicit -mbig-endian as an explicit -EB to assembler | |
96 and linker, and pass abi options matching the target expectations | |
97 or command-line requests. */ | |
98 #define VXWORKS_ENDIAN_SPEC "%{mbig-endian:-EB}" | |
0 | 99 |
111 | 100 #if defined (TARGET_BPABI_CPP_BUILTINS) |
101 #define MAYBE_ASM_ABI_SPEC \ | |
102 "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=5}" TARGET_FIX_V4BX_SPEC | |
103 #else | |
104 #define MAYBE_ASM_ABI_SPEC | |
105 #endif | |
0 | 106 |
107 #undef SUBTARGET_EXTRA_ASM_SPEC | |
111 | 108 #define SUBTARGET_EXTRA_ASM_SPEC MAYBE_ASM_ABI_SPEC " " VXWORKS_ENDIAN_SPEC |
0 | 109 |
110 #undef LINK_SPEC | |
111 #define LINK_SPEC VXWORKS_LINK_SPEC " " VXWORKS_ENDIAN_SPEC | |
112 | |
113 #undef LIB_SPEC | |
114 #define LIB_SPEC VXWORKS_LIB_SPEC | |
115 | |
116 #undef STARTFILE_SPEC | |
117 #define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC | |
118 | |
119 #undef ENDFILE_SPEC | |
120 #define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC | |
121 | |
111 | 122 /* For exceptions, pre VX7 uses DWARF2 info, VX7 uses ARM unwinding. */ |
123 #undef DWARF2_UNWIND_INFO | |
124 #define DWARF2_UNWIND_INFO (!TARGET_VXWORKS7) | |
125 | |
126 #undef ARM_TARGET2_DWARF_FORMAT | |
127 #define ARM_TARGET2_DWARF_FORMAT \ | |
131 | 128 (TARGET_VXWORKS_RTP ? (DW_EH_PE_pcrel | DW_EH_PE_indirect) : DW_EH_PE_absptr) |
0 | 129 |
130 /* There is no default multilib. */ | |
131 #undef MULTILIB_DEFAULTS | |
132 | |
133 #undef FUNCTION_PROFILER | |
134 #define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER | |
135 | |
136 /* We want to be compatible with a version of "2.96" at one point in | |
137 the past before this macro was changed. */ | |
138 #undef DEFAULT_STRUCTURE_SIZE_BOUNDARY | |
139 #define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8 | |
140 | |
141 /* The kernel loader does not allow relocations to overflow, so we | |
142 cannot allow arbitrary relocation addends in kernel modules or RTP | |
143 executables. Also, the dynamic loader uses the resolved relocation | |
144 value to distinguish references to the text and data segments, so we | |
145 cannot allow arbitrary offsets for shared libraries either. */ | |
146 #undef ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P | |
147 #define ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P 1 | |
148 | |
149 #undef TARGET_DEFAULT_WORD_RELOCATIONS | |
150 #define TARGET_DEFAULT_WORD_RELOCATIONS 1 | |
111 | 151 |
152 /* Define this to be nonzero if static stack checking is supported. */ | |
153 #define STACK_CHECK_STATIC_BUILTIN 1 | |
154 | |
155 /* This platform supports the probing method of stack checking (RTP mode). | |
156 8K is reserved in the stack to propagate exceptions in case of overflow. */ | |
157 #define STACK_CHECK_PROTECT 8192 | |
158 | |
159 /* Unless overridded by the target options, the default is little-endian. */ | |
160 #define TARGET_ENDIAN_DEFAULT 0 |