2018-03-09 François Dumont <fdumont@gcc.gnu.org>
[official-gcc.git] / libgcc / config / rx / rx-abi.h
blobf79300f299ad4b02639041ed3274b922dd6ee6aa
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... */
33 #ifdef L_muldi3
34 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, MUL64)
35 #endif
37 #ifdef L_divdi3
38 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (divdi3, DIV64s)
39 #endif
41 #ifdef L_udivdi3
42 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (udivdi3, DIV64u)
43 #endif
45 #ifdef L_ashldi3
46 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (ashldi3, SHLL64)
47 #endif
49 #ifdef L_lshrdi3
50 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (lshrdi3, SHLR64)
51 #endif
53 #ifdef L_ashrdi3
54 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (ashrdi3, SHAR64)
55 #endif
57 #ifdef L_fixsfdi
58 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, CONVf64s)
59 #endif
61 #ifdef L_fixunssfdi
62 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, CONVf64u)
63 #endif
65 #ifdef L_floatdisf
66 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, CONV64sf)
67 #endif
69 #ifdef L_floatundisf
70 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundisf, CONV64uf)
71 #endif
73 #ifdef L_moddi3
74 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (moddi3, MOD64s)
75 #endif
77 #ifdef L_umoddi3
78 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (umoddi3, MOD64u)
79 #endif
83 #ifdef __RX_64BIT_DOUBLES__
85 /* Float (32-bit) aliases... */
87 #ifdef L_sf_to_si
88 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfsi, CONVf32s)
89 #endif
91 #ifdef L_fixunssfsi
92 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfsi, CONVf32u)
93 #endif
95 #ifdef L_addsub_sf
96 #define DECLARE_LIBRARY_RENAMES \
97 RENAME_LIBRARY (addsf3, ADDf) \
98 RENAME_LIBRARY (subsf3, SUBf)
99 #endif
101 #ifdef L_mul_sf
102 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (mulsf3, MULf)
103 #endif
105 #ifdef L_div_sf
106 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (divsf3, DIVf)
107 #endif
109 /* Double (64-bit) aliases... */
111 #ifdef L_addsub_df
112 #define DECLARE_LIBRARY_RENAMES \
113 RENAME_LIBRARY (adddf3, ADDd) \
114 RENAME_LIBRARY (subdf3, SUBd)
115 #endif
117 #ifdef L_mul_df
118 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldf3, MULd)
119 #endif
121 #ifdef L_div_df
122 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (divdf3, DIVd)
123 #endif
125 #ifdef L_fixdfdi
126 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, CONVd64s)
127 #endif
129 #ifdef L_fixunsdfdi
130 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, CONVd64u)
131 #endif
133 #ifdef L_floatdidf
134 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, CONV64sd)
135 #endif
137 #ifdef L_floatundidf
138 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, CONV64ud)
139 #endif
141 #ifdef L_df_to_si
142 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfsi, CONVd32s)
143 #endif
145 #ifdef L_fixunsdfsi
146 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfsi, CONVd32u)
147 #endif
149 #ifdef L_si_to_df
150 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatsidf, CONV32sd)
151 #endif
153 #ifdef L_usi_to_df
154 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatunsidf, CONV32ud)
155 #endif
157 #ifdef L_sf_to_df
158 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (extendsfdf2, CONVfd)
159 #endif
161 #ifdef L_df_to_sf
162 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (truncdfsf2, CONVdf)
163 #endif
165 #ifdef L_negate_df
166 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (negdf2, NEGd)
167 #endif
169 #ifdef L_si_to_sf
170 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatsisf, CONV32sf)
171 #endif
173 #ifdef L_usi_to_sf
174 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatunsisf, CONV32uf)
175 #endif
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. */
185 #ifdef L_addsub_sf
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)
191 #endif
193 #ifdef L_mul_sf
194 #define DECLARE_LIBRARY_RENAMES \
195 RENAME_LIBRARY (mulsf3, MULd) \
196 RENAME_LIBRARY (mulsf3, MULf)
197 #endif
199 #ifdef L_div_sf
200 #define DECLARE_LIBRARY_RENAMES \
201 RENAME_LIBRARY (divsf3, DIVd) \
202 RENAME_LIBRARY (divsf3, DIVf)
203 #endif
205 #ifdef L_sf_to_si
206 #define DECLARE_LIBRARY_RENAMES \
207 RENAME_LIBRARY (fixsfsi, CONVd32s) \
208 RENAME_LIBRARY (fixsfsi, CONVf32s)
209 #endif
211 #ifdef L_fixunssfsi
212 #define DECLARE_LIBRARY_RENAMES \
213 RENAME_LIBRARY (fixunssfsi, CONVd32u) \
214 RENAME_LIBRARY (fixunssfsi, CONVf32u)
215 #endif
217 #ifdef L_si_to_sf
218 #define DECLARE_LIBRARY_RENAMES \
219 RENAME_LIBRARY (floatsisf, CONV32sd) \
220 RENAME_LIBRARY (floatsisf, CONV32sf)
221 #endif
223 #ifdef L_usi_to_sf
224 #define DECLARE_LIBRARY_RENAMES \
225 RENAME_LIBRARY (floatunsisf, CONV32ud) \
226 RENAME_LIBRARY (floatunsisf, CONV32uf)
227 #endif
229 #ifdef L_negate_sf
230 #define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (negsf2, NEGd)
231 #endif
233 #endif /* 64-bit vs 32-bit doubles. */