1 /* Configuration file for ARM BPABI targets, library renames. 2 Copyright (C) 2010-2018 Free Software Foundation, Inc. 3 Contributed by CodeSourcery, LLC 4 5 This file is part of GCC. 6 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. 11 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. 16 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. 20 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/>. */ 25 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))); 30 31 /* Give some libgcc functions an additional __aeabi name. */ 32 #ifdef L_muldi3 33 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul) 34 #endif 35 #ifdef L_muldi3 36 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul) 37 #endif 38 #ifdef L_fixdfdi 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"))); 42 #endif 43 #ifdef L_fixunsdfdi 44 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, d2ulz) \ 45 extern UDWtype __fixunsdfdi (DFtype) __attribute__((pcs("aapcs"))); 46 #endif 47 #ifdef L_fixsfdi 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"))); 51 #endif 52 #ifdef L_fixunssfdi 53 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, f2ulz) \ 54 extern UDWtype __fixunssfdi (SFtype) __attribute__((pcs("aapcs"))); 55 #endif 56 #ifdef L_floatdidf 57 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdidf, l2d) 58 #endif 59 #ifdef L_floatdisf 60 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, l2f) 61 #endif 62 63 /* These renames are needed on ARMv6M. Other targets get them from 64 assembly routines. */ 65 #ifdef L_fixunsdfsi 66 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfsi, d2uiz) 67 #endif 68 #ifdef L_fixunssfsi 69 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfsi, f2uiz) 70 #endif 71 #ifdef L_floatundidf 72 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundidf, ul2d) 73 #endif 74 #ifdef L_floatundisf 75 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundisf, ul2f) 76 #endif 77 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 82 83 #if (!defined(__ARM_ARCH_EXT_IDIV__)) 84 # define TARGET_HAS_NO_HW_DIVIDE 85 #endif 86