1 /* Configuration file for ARM BPABI targets, library renames.
2 Copyright (C) 2010-2018 Free Software Foundation, Inc.
3 Contributed by CodeSourcery, LLC
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published
9 by the Free Software Foundation; either version 3, or (at your
10 option) any later version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
26 /* Make __aeabi_AEABI_NAME an alias for __GCC_NAME. */
27 #define RENAME_LIBRARY(GCC_NAME, AEABI_NAME) \
28 typeof (__##GCC_NAME) __aeabi_##AEABI_NAME \
29 __attribute__((alias ("__" #GCC_NAME)));
31 /* Give some libgcc functions an additional __aeabi name. */
33 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
36 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
39 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, d2lz) \
40 extern DWtype __fixdfdi (DFtype) __attribute__((pcs("aapcs"))); \
41 extern UDWtype __fixunsdfdi (DFtype) __asm__("__aeabi_d2ulz") __attribute__((pcs("aapcs")));
44 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, d2ulz) \
45 extern UDWtype __fixunsdfdi (DFtype) __attribute__((pcs("aapcs")));
48 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, f2lz) \
49 extern DWtype __fixsfdi (SFtype) __attribute__((pcs("aapcs"))); \
50 extern UDWtype __fixunssfdi (SFtype) __asm__("__aeabi_f2ulz") __attribute__((pcs("aapcs")));
53 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, f2ulz) \
54 extern UDWtype __fixunssfdi (SFtype) __attribute__((pcs("aapcs")));
57 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdidf, l2d)
60 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, l2f)
63 /* These renames are needed on ARMv6M. Other targets get them from
66 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfsi, d2uiz)
69 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfsi, f2uiz)
72 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundidf, ul2d)
75 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundisf, ul2f)
78 /* For ARM bpabi, we only want to use a "__gnu_" prefix for the fixed-point
79 helper functions - not everything in libgcc - in the interests of
80 maintaining backward compatibility. */
81 #define LIBGCC2_FIXEDBIT_GNU_PREFIX
83 #if (!defined(__ARM_ARCH_EXT_IDIV__))
84 # define TARGET_HAS_NO_HW_DIVIDE