comparison gcc/config/arm/vxworks.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* Definitions of target machine for GCC, 1 /* Definitions of target machine for GCC,
2 for ARM with targetting the VXWorks run time environment. 2 for ARM with targeting the VXWorks run time environment.
3 Copyright (C) 1999, 2000, 2003, 2004, 2007, 2008, 2009, 2010 3 Copyright (C) 1999-2017 Free Software Foundation, Inc.
4 Free Software Foundation, Inc.
5 4
6 Contributed by: Mike Stump <mrs@wrs.com> 5 Contributed by: Mike Stump <mrs@wrs.com>
7 Brought up to date by CodeSourcery, LLC. 6 Brought up to date by CodeSourcery, LLC.
8 7
9 This file is part of GCC. 8 This file is part of GCC.
16 GCC is distributed in the hope that it will be useful, 15 GCC is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details. 18 GNU General Public License for more details.
20 19
21 You should have received a copy of the GNU General Public License 20 Under Section 7 of GPL version 3, you are granted additional
22 along with GCC; see the file COPYING3. If not see 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
23 <http://www.gnu.org/licenses/>. */ 27 <http://www.gnu.org/licenses/>. */
24 28
29 /* TARGET_OS_CPP_BUILTINS, down to BPABI if defined. */
25 30
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
26 #define TARGET_OS_CPP_BUILTINS() \ 38 #define TARGET_OS_CPP_BUILTINS() \
27 do { \ 39 do { \
28 if (TARGET_BIG_END) \ 40 if (TARGET_BIG_END) \
29 builtin_define ("ARMEB"); \ 41 builtin_define ("ARMEB"); \
30 else \ 42 else \
31 builtin_define ("ARMEL"); \ 43 builtin_define ("ARMEL"); \
32 \ 44 \
33 if (arm_arch_xscale) \ 45 if (arm_arch_xscale) \
34 builtin_define ("CPU=XSCALE"); \ 46 builtin_define ("CPU=XSCALE"); \
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 } \
35 else if (arm_arch5) \ 63 else if (arm_arch5) \
36 builtin_define ("CPU=ARMARCH5"); \ 64 { \
65 if (TARGET_THUMB) \
66 builtin_define ("CPU=ARMARCH5_T"); \
67 else \
68 builtin_define ("CPU=ARMARCH5"); \
69 } \
37 else if (arm_arch4) \ 70 else if (arm_arch4) \
38 { \ 71 { \
39 if (thumb_code) \ 72 if (TARGET_THUMB) \
40 builtin_define ("CPU=ARMARCH4_T"); \ 73 builtin_define ("CPU=ARMARCH4_T"); \
41 else \ 74 else \
42 builtin_define ("CPU=ARMARCH4"); \ 75 builtin_define ("CPU=ARMARCH4"); \
43 } \ 76 } \
44 VXWORKS_OS_CPP_BUILTINS (); \ 77 VXWORKS_OS_CPP_BUILTINS (); \
78 MAYBE_TARGET_BPABI_CPP_BUILTINS (); \
45 } while (0) 79 } while (0)
46 80
47 #undef SUBTARGET_OVERRIDE_OPTIONS 81 #undef SUBTARGET_OVERRIDE_OPTIONS
48 #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS 82 #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
49 83
50 /* Subsume the arm/elf.h definition, and add RTP hooks. */ 84 /* Subsume the arm/elf.h definition, and add RTP hooks. */
51 #undef SUBTARGET_CPP_SPEC 85 #undef SUBTARGET_CPP_SPEC
52 #define SUBTARGET_CPP_SPEC "-D__ELF__" VXWORKS_ADDITIONAL_CPP_SPEC 86 #define SUBTARGET_CPP_SPEC "-D__ELF__" VXWORKS_ADDITIONAL_CPP_SPEC
53 87
88 /* .text.hot and .text.unlikely sections are badly handled by the
89 VxWorks kernel mode loader for ARM style exceptions. */
90
91 #if ARM_UNWIND_INFO
92 #define EXTRA_CC1_SPEC "%{!mrtp:-fno-reorder-functions}"
93 #else
94 #define EXTRA_CC1_SPEC
95 #endif
96
54 #undef CC1_SPEC 97 #undef CC1_SPEC
55 #define CC1_SPEC \ 98 #define CC1_SPEC "" EXTRA_CC1_SPEC
56 "%{tstrongarm:-mlittle-endian -mcpu=strongarm ; \
57 t4: -mlittle-endian -march=armv4 ; \
58 t4be: -mbig-endian -march=armv4 ; \
59 t4t: -mthumb -mthumb-interwork -mlittle-endian -march=armv4t ; \
60 t4tbe: -mthumb -mthumb-interwork -mbig-endian -march=armv4t ; \
61 t5: -mlittle-endian -march=armv5 ; \
62 t5be: -mbig-endian -march=armv5 ; \
63 t5t: -mthumb -mthumb-interwork -mlittle-endian -march=armv5 ; \
64 t5tbe: -mthumb -mthumb-interwork -mbig-endian -march=armv5 ; \
65 txscale: -mlittle-endian -mcpu=xscale ; \
66 txscalebe: -mbig-endian -mcpu=xscale ; \
67 : -march=armv4}"
68 99
69 /* Pass -EB for big-endian targets. */ 100 /* Translate an explicit -mbig-endian as an explicit -EB to assembler
70 #define VXWORKS_ENDIAN_SPEC \ 101 and linker, and pass abi options matching the target expectations
71 "%{mbig-endian|t4be|t4tbe|t5be|t5tbe|txscalebe:-EB}" 102 or command-line requests. */
103 #define VXWORKS_ENDIAN_SPEC "%{mbig-endian:-EB}"
104
105 #if defined (TARGET_BPABI_CPP_BUILTINS)
106 #define MAYBE_ASM_ABI_SPEC \
107 "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=5}" TARGET_FIX_V4BX_SPEC
108 #else
109 #define MAYBE_ASM_ABI_SPEC
110 #endif
72 111
73 #undef SUBTARGET_EXTRA_ASM_SPEC 112 #undef SUBTARGET_EXTRA_ASM_SPEC
74 #define SUBTARGET_EXTRA_ASM_SPEC VXWORKS_ENDIAN_SPEC 113 #define SUBTARGET_EXTRA_ASM_SPEC MAYBE_ASM_ABI_SPEC " " VXWORKS_ENDIAN_SPEC
75 114
76 #undef LINK_SPEC 115 #undef LINK_SPEC
77 #define LINK_SPEC VXWORKS_LINK_SPEC " " VXWORKS_ENDIAN_SPEC 116 #define LINK_SPEC VXWORKS_LINK_SPEC " " VXWORKS_ENDIAN_SPEC
78 117
79 #undef LIB_SPEC 118 #undef LIB_SPEC
83 #define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC 122 #define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC
84 123
85 #undef ENDFILE_SPEC 124 #undef ENDFILE_SPEC
86 #define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC 125 #define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC
87 126
88 #undef TARGET_VERSION 127 /* For exceptions, pre VX7 uses DWARF2 info, VX7 uses ARM unwinding. */
89 #define TARGET_VERSION fputs (" (ARM/VxWorks)", stderr); 128 #undef DWARF2_UNWIND_INFO
129 #define DWARF2_UNWIND_INFO (!TARGET_VXWORKS7)
130
131 #undef ARM_TARGET2_DWARF_FORMAT
132 #define ARM_TARGET2_DWARF_FORMAT \
133 (TARGET_VXWORKS_RTP ? DW_EH_PE_pcrel : DW_EH_PE_absptr)
90 134
91 /* There is no default multilib. */ 135 /* There is no default multilib. */
92 #undef MULTILIB_DEFAULTS 136 #undef MULTILIB_DEFAULTS
93
94 #define FPUTYPE_DEFAULT "vfp"
95 137
96 #undef FUNCTION_PROFILER 138 #undef FUNCTION_PROFILER
97 #define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER 139 #define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER
98 140
99 /* We want to be compatible with a version of "2.96" at one point in 141 /* We want to be compatible with a version of "2.96" at one point in
109 #undef ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P 151 #undef ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P
110 #define ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P 1 152 #define ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P 1
111 153
112 #undef TARGET_DEFAULT_WORD_RELOCATIONS 154 #undef TARGET_DEFAULT_WORD_RELOCATIONS
113 #define TARGET_DEFAULT_WORD_RELOCATIONS 1 155 #define TARGET_DEFAULT_WORD_RELOCATIONS 1
156
157 /* Define this to be nonzero if static stack checking is supported. */
158 #define STACK_CHECK_STATIC_BUILTIN 1
159
160 /* This platform supports the probing method of stack checking (RTP mode).
161 8K is reserved in the stack to propagate exceptions in case of overflow. */
162 #define STACK_CHECK_PROTECT 8192
163
164 /* Unless overridded by the target options, the default is little-endian. */
165 #define TARGET_ENDIAN_DEFAULT 0