]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/arm/bpabi.h
Update Copyright years for files modified in 2011 and/or 2012.
[thirdparty/gcc.git] / gcc / config / arm / bpabi.h
CommitLineData
30e9913f 1/* Configuration file for ARM BPABI targets.
71e45bc2 2 Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012
30e9913f 3 Free Software Foundation, Inc.
4 Contributed by CodeSourcery, LLC
5
6 This file is part of GCC.
7
8 GCC is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published
038d1e19 10 by the Free Software Foundation; either version 3, or (at your
30e9913f 11 option) any later version.
12
13 GCC is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
17
18 You should have received a copy of the GNU General Public License
038d1e19 19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
30e9913f 21
22/* Use the AAPCS ABI by default. */
23#define ARM_DEFAULT_ABI ARM_ABI_AAPCS
24
25/* Assume that AAPCS ABIs should adhere to the full BPABI. */
26#define TARGET_BPABI (TARGET_AAPCS_BASED)
27
1774763d 28/* BPABI targets use EABI frame unwinding tables. */
cc7d6aed 29#undef ARM_UNWIND_INFO
30#define ARM_UNWIND_INFO 1
1774763d 31
5c7b80c0 32/* Section 4.1 of the AAPCS requires the use of VFP format. */
fcc91c04 33#undef FPUTYPE_DEFAULT
4fea7d65 34#define FPUTYPE_DEFAULT "vfp"
5c7b80c0 35
fcc91c04 36/* TARGET_BIG_ENDIAN_DEFAULT is set in
37 config.gcc for big endian configurations. */
38#if TARGET_BIG_ENDIAN_DEFAULT
39#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
40#else
41#define TARGET_ENDIAN_DEFAULT 0
42#endif
43
6783d878 44/* EABI targets should enable interworking by default. */
fcc91c04 45#undef TARGET_DEFAULT
46#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
6783d878 47
30e9913f 48/* The ARM BPABI functions return a boolean; they use no special
49 calling convention. */
50#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) TARGET_BPABI
51
84cbcde5 52/* The BPABI integer comparison routines return { -1, 0, 1 }. */
30e9913f 53#define TARGET_LIB_INT_CMP_BIASED !TARGET_BPABI
54
0e266d06 55#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\
56 "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
96b72f67 57
c6e19dd6 58#if TARGET_BIG_ENDIAN_DEFAULT
6b729a2b 59#define BE8_LINK_SPEC \
c6e19dd6 60 " %{!mlittle-endian:%{march=armv7-a|mcpu=cortex-a5 \
61 |mcpu=cortex-a7 \
62 |mcpu=cortex-a8|mcpu=cortex-a9|mcpu=cortex-a15 \
63 |mcpu=generic-armv7-a \
64 |march=armv7-m|mcpu=cortex-m3 \
65 |march=armv7e-m|mcpu=cortex-m4 \
66 |march=armv6-m|mcpu=cortex-m0 \
530c2b2e 67 |march=armv8-a \
6b729a2b 68 :%{!r:--be8}}}"
c6e19dd6 69#else
70#define BE8_LINK_SPEC \
71 " %{mbig-endian:%{march=armv7-a|mcpu=cortex-a5 \
72 |mcpu=cortex-a7 \
73 |mcpu=cortex-a8|mcpu=cortex-a9|mcpu=cortex-a15 \
74 |mcpu=generic-armv7-a \
75 |march=armv7-m|mcpu=cortex-m3 \
76 |march=armv7e-m|mcpu=cortex-m4 \
77 |march=armv6-m|mcpu=cortex-m0 \
530c2b2e 78 |march=armv8-a \
c6e19dd6 79 :%{!r:--be8}}}"
80#endif
ab5aa453 81
714ff98b 82/* Tell the assembler to build BPABI binaries. */
fcc91c04 83#undef SUBTARGET_EXTRA_ASM_SPEC
0e266d06 84#define SUBTARGET_EXTRA_ASM_SPEC \
85 "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=5}" TARGET_FIX_V4BX_SPEC
714ff98b 86
9d6f81ac 87#ifndef SUBTARGET_EXTRA_LINK_SPEC
88#define SUBTARGET_EXTRA_LINK_SPEC ""
89#endif
90
30e9913f 91/* The generic link spec in elf.h does not support shared libraries. */
657e4193 92#define BPABI_LINK_SPEC \
93 "%{mbig-endian:-EB} %{mlittle-endian:-EL} " \
30e9913f 94 "%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \
ab5aa453 95 "-X" SUBTARGET_EXTRA_LINK_SPEC TARGET_FIX_V4BX_SPEC BE8_LINK_SPEC
30e9913f 96
657e4193 97#undef LINK_SPEC
98#define LINK_SPEC BPABI_LINK_SPEC
99
7dab6ba6 100/* The BPABI requires that we always use an out-of-line implementation
101 of RTTI comparison, even if the target supports weak symbols,
102 because the same object file might be used on a target that does
103 not support merging symbols across DLL boundaries. This macro is
104 broken out separately so that it can be used within
105 TARGET_OS_CPP_BUILTINS in configuration files for systems based on
106 the BPABI. */
107#define TARGET_BPABI_CPP_BUILTINS() \
108 do \
109 { \
c5c7f3cc 110 builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0"); \
7dab6ba6 111 } \
112 while (false)
113
6783d878 114#undef TARGET_OS_CPP_BUILTINS
7dab6ba6 115#define TARGET_OS_CPP_BUILTINS() \
116 TARGET_BPABI_CPP_BUILTINS()
d24bc145 117
118/* The BPABI specifies the use of .{init,fini}_array. Therefore, we
119 do not want GCC to put anything into the .{init,fini} sections. */
120#undef INIT_SECTION_ASM_OP
121#undef FINI_SECTION_ASM_OP
122#define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP
123#define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP
576a1ce6 124
125/* The legacy _mcount implementation assumes r11 points to a
126 4-word APCS frame. This is generally not true for EABI targets,
127 particularly not in Thumb mode. We assume the mcount
128 implementation does not require a counter variable (No Counter).
129 Note that __gnu_mcount_nc will be entered with a misaligned stack.
130 This is OK because it uses a special calling convention anyway. */
131
f08429bf 132#undef NO_PROFILE_COUNTERS
133#define NO_PROFILE_COUNTERS 1
576a1ce6 134#undef ARM_FUNCTION_PROFILER
135#define ARM_FUNCTION_PROFILER(STREAM, LABELNO) \
136{ \
137 fprintf (STREAM, "\tpush\t{lr}\n"); \
138 fprintf (STREAM, "\tbl\t__gnu_mcount_nc\n"); \
139}
140
141#undef SUBTARGET_FRAME_POINTER_REQUIRED
142#define SUBTARGET_FRAME_POINTER_REQUIRED 0
f08429bf 143
144/* __gnu_mcount_nc restores the original LR value before returning. Ensure
145 that there is no unnecessary hook set up. */
146#undef PROFILE_HOOK