1 /* Header file for RX ABI versions of libgcc functions.
2 Copyright (C) 2009-2018 Free Software Foundation, Inc.
3 Contributed by Red Hat.
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
22 along with GCC; see the file COPYING3. If not see
23 <http://www.gnu.org/licenses/>. */
25 /* Make __COM_<RX_NAME> an alias for __<GCC_NAME>. */
26 #define RENAME_LIBRARY(GCC_NAME, RX_NAME) \
27 __asm__ (".globl\t__COM_" #RX_NAME "\n" \
28 ".set\t__COM_" #RX_NAME ", ___" #GCC_NAME "\n");
31 /* The long-long aliases... */
34 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, MUL64)
38 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (divdi3, DIV64s)
42 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (udivdi3, DIV64u)
46 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (ashldi3, SHLL64)
50 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (lshrdi3, SHLR64)
54 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (ashrdi3, SHAR64)
58 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, CONVf64s)
62 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, CONVf64u)
66 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, CONV64sf)
70 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundisf, CONV64uf)
74 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (moddi3, MOD64s)
78 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (umoddi3, MOD64u)
83 #ifdef __RX_64BIT_DOUBLES__
85 /* Float (32-bit) aliases... */
88 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfsi, CONVf32s)
92 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfsi, CONVf32u)
96 #define DECLARE_LIBRARY_RENAMES \
97 RENAME_LIBRARY (addsf3, ADDf) \
98 RENAME_LIBRARY (subsf3, SUBf)
102 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (mulsf3, MULf)
106 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (divsf3, DIVf)
109 /* Double (64-bit) aliases... */
112 #define DECLARE_LIBRARY_RENAMES \
113 RENAME_LIBRARY (adddf3, ADDd) \
114 RENAME_LIBRARY (subdf3, SUBd)
118 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldf3, MULd)
122 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (divdf3, DIVd)
126 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, CONVd64s)
130 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, CONVd64u)
134 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, CONV64sd)
138 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, CONV64ud)
142 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfsi, CONVd32s)
146 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfsi, CONVd32u)
150 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatsidf, CONV32sd)
154 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatunsidf, CONV32ud)
158 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (extendsfdf2, CONVfd)
162 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (truncdfsf2, CONVdf)
166 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (negdf2, NEGd)
170 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatsisf, CONV32sf)
174 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatunsisf, CONV32uf)
177 /* The 64-bit comparison functions do not have aliases because libgcc2
178 does not provide them. Instead they have to be supplied in
179 rx-abi-functions.c. */
182 #else /* 32-bit doubles. */
186 #define DECLARE_LIBRARY_RENAMES \
187 RENAME_LIBRARY (addsf3, ADDd) \
188 RENAME_LIBRARY (subsf3, SUBd) \
189 RENAME_LIBRARY (addsf3, ADDf) \
190 RENAME_LIBRARY (subsf3, SUBf)
194 #define DECLARE_LIBRARY_RENAMES \
195 RENAME_LIBRARY (mulsf3, MULd) \
196 RENAME_LIBRARY (mulsf3, MULf)
200 #define DECLARE_LIBRARY_RENAMES \
201 RENAME_LIBRARY (divsf3, DIVd) \
202 RENAME_LIBRARY (divsf3, DIVf)
206 #define DECLARE_LIBRARY_RENAMES \
207 RENAME_LIBRARY (fixsfsi, CONVd32s) \
208 RENAME_LIBRARY (fixsfsi, CONVf32s)
212 #define DECLARE_LIBRARY_RENAMES \
213 RENAME_LIBRARY (fixunssfsi, CONVd32u) \
214 RENAME_LIBRARY (fixunssfsi, CONVf32u)
218 #define DECLARE_LIBRARY_RENAMES \
219 RENAME_LIBRARY (floatsisf, CONV32sd) \
220 RENAME_LIBRARY (floatsisf, CONV32sf)
224 #define DECLARE_LIBRARY_RENAMES \
225 RENAME_LIBRARY (floatunsisf, CONV32ud) \
226 RENAME_LIBRARY (floatunsisf, CONV32uf)
230 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (negsf2, NEGd)
233 #endif /* 64-bit vs 32-bit doubles. */