OSDN Git Service

Update FSF address.
[pf3gnuchains/gcc-fork.git] / gcc / config / arm / bpabi.h
1 /* Configuration file for ARM BPABI targets.
2    Copyright (C) 2004, 2005
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
10    by the Free Software Foundation; either version 2, or (at your
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
19    along with GCC; see the file COPYING.  If not, write to
20    the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21    Boston, MA 02110-1301, USA.  */
22
23 /* Use the AAPCS ABI by default.  */
24 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS
25
26 /* Assume that AAPCS ABIs should adhere to the full BPABI.  */ 
27 #define TARGET_BPABI (TARGET_AAPCS_BASED)
28
29 /* Section 4.1 of the AAPCS requires the use of VFP format.  */
30 #define FPUTYPE_DEFAULT FPUTYPE_VFP
31
32 /* The ARM BPABI functions return a boolean; they use no special
33    calling convention.  */
34 #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) TARGET_BPABI
35
36 /* The BPABI integer comparison routines return { -1, 0, 1 }.  */
37 #define TARGET_LIB_INT_CMP_BIASED !TARGET_BPABI
38
39 /* Tell the assembler to build BPABI binaries.  */
40 #undef SUBTARGET_EXTRA_ASM_SPEC
41 #define SUBTARGET_EXTRA_ASM_SPEC "-meabi=4"
42
43 /* The generic link spec in elf.h does not support shared libraries.  */
44 #undef LINK_SPEC
45 #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} "           \
46   "%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} "        \
47   "-X"
48
49 #if defined (__thumb__)
50 #define RENAME_LIBRARY_SET ".thumb_set"
51 #else
52 #define RENAME_LIBRARY_SET ".set"
53 #endif
54
55 /* Make __aeabi_AEABI_NAME an alias for __GCC_NAME.  */
56 #define RENAME_LIBRARY(GCC_NAME, AEABI_NAME)            \
57   __asm__ (".globl\t__aeabi_" #AEABI_NAME "\n"          \
58            RENAME_LIBRARY_SET "\t__aeabi_" #AEABI_NAME  \
59              ", __" #GCC_NAME "\n");
60
61 /* Give some libgcc functions an additional __aeabi name.  */
62 #ifdef L_muldi3
63 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
64 #endif
65 #ifdef L_muldi3
66 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
67 #endif
68 #ifdef L_fixdfdi
69 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, d2lz)
70 #endif
71 #ifdef L_fixunsdfdi
72 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, d2ulz)
73 #endif
74 #ifdef L_fixsfdi
75 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, f2lz)
76 #endif
77 #ifdef L_fixunssfdi
78 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, f2ulz)
79 #endif
80 #ifdef L_floatdidf
81 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdidf, l2d)
82 #endif
83 #ifdef L_floatdisf
84 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, l2f)
85 #endif
86
87 /* The BPABI requires that we always use an out-of-line implementation
88    of RTTI comparison, even if the target supports weak symbols,
89    because the same object file might be used on a target that does
90    not support merging symbols across DLL boundaries.  This macro is
91    broken out separately so that it can be used within
92    TARGET_OS_CPP_BUILTINS in configuration files for systems based on
93    the BPABI.  */
94 #define TARGET_BPABI_CPP_BUILTINS()                     \
95   do                                                    \
96     {                                                   \
97       builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
98     }                                                   \
99   while (false)
100
101 #define TARGET_OS_CPP_BUILTINS() \
102   TARGET_BPABI_CPP_BUILTINS()
103
104 /* The BPABI specifies the use of .{init,fini}_array.  Therefore, we
105    do not want GCC to put anything into the .{init,fini} sections.  */
106 #undef INIT_SECTION_ASM_OP
107 #undef FINI_SECTION_ASM_OP
108 #define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP
109 #define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP