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