]>
Commit | Line | Data |
---|---|---|
299b83b7 | 1 | /* Header file for libgcc2.c. */ |
d652f226 | 2 | /* Copyright (C) 2000, 2001, 2004, 2005, 2009, 2010 |
299b83b7 KG |
3 | Free Software Foundation, Inc. |
4 | ||
1322177d | 5 | This file is part of GCC. |
299b83b7 | 6 | |
1322177d LB |
7 | GCC is free software; you can redistribute it and/or modify it under |
8 | the terms of the GNU General Public License as published by the Free | |
748086b7 | 9 | Software Foundation; either version 3, or (at your option) any later |
1322177d | 10 | version. |
299b83b7 | 11 | |
1322177d LB |
12 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
13 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 | for more details. | |
299b83b7 | 16 | |
748086b7 JJ |
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. | |
77c915d8 | 20 | |
748086b7 JJ |
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/>. */ | |
77c915d8 | 25 | |
88657302 RH |
26 | #ifndef GCC_LIBGCC2_H |
27 | #define GCC_LIBGCC2_H | |
299b83b7 | 28 | |
7370bebd | 29 | #ifndef HIDE_EXPORTS |
3fc1f660 | 30 | #pragma GCC visibility push(default) |
7370bebd | 31 | #endif |
3fc1f660 | 32 | |
299b83b7 | 33 | extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t); |
299b83b7 | 34 | extern void __clear_cache (char *, char *); |
3fe68d0a ZW |
35 | extern void __eprintf (const char *, const char *, unsigned int, const char *) |
36 | __attribute__ ((__noreturn__)); | |
299b83b7 | 37 | |
299b83b7 KG |
38 | #ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE |
39 | #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE | |
40 | #endif | |
41 | ||
cfa7bd9c RS |
42 | #ifndef LIBGCC2_HAS_SF_MODE |
43 | #define LIBGCC2_HAS_SF_MODE (BITS_PER_UNIT == 8) | |
44 | #endif | |
45 | ||
4e9db8b2 SE |
46 | #ifndef LIBGCC2_HAS_DF_MODE |
47 | #define LIBGCC2_HAS_DF_MODE \ | |
cfa7bd9c | 48 | (BITS_PER_UNIT == 8 \ |
a18bdccd | 49 | && (__SIZEOF_DOUBLE__ * __CHAR_BIT__ == 64 \ |
cfa7bd9c | 50 | || LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64)) |
4e9db8b2 SE |
51 | #endif |
52 | ||
53 | #ifndef LIBGCC2_HAS_XF_MODE | |
cfa7bd9c RS |
54 | #define LIBGCC2_HAS_XF_MODE \ |
55 | (BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 80) | |
4e9db8b2 SE |
56 | #endif |
57 | ||
58 | #ifndef LIBGCC2_HAS_TF_MODE | |
cfa7bd9c RS |
59 | #define LIBGCC2_HAS_TF_MODE \ |
60 | (BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128) | |
4e9db8b2 SE |
61 | #endif |
62 | ||
4a73d865 JM |
63 | #ifndef SF_SIZE |
64 | #if LIBGCC2_HAS_SF_MODE | |
65 | #define SF_SIZE FLT_MANT_DIG | |
66 | #else | |
67 | #define SF_SIZE 0 | |
68 | #endif | |
69 | #endif | |
70 | ||
71 | #ifndef DF_SIZE | |
72 | #if LIBGCC2_HAS_DF_MODE | |
a18bdccd | 73 | #if __SIZEOF_DOUBLE__ * __CHAR_BIT__ == 64 |
4a73d865 JM |
74 | #define DF_SIZE DBL_MANT_DIG |
75 | #elif LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64 | |
76 | #define DF_SIZE LDBL_MANT_DIG | |
77 | #else | |
78 | #define DF_SIZE 0 | |
79 | #endif | |
80 | #else | |
81 | #define DF_SIZE 0 | |
82 | #endif | |
83 | #endif | |
84 | ||
85 | #ifndef XF_SIZE | |
86 | #if LIBGCC2_HAS_XF_MODE | |
87 | #define XF_SIZE LDBL_MANT_DIG | |
88 | #else | |
89 | #define XF_SIZE 0 | |
90 | #endif | |
91 | #endif | |
92 | ||
93 | #ifndef TF_SIZE | |
94 | #if LIBGCC2_HAS_TF_MODE | |
95 | #define TF_SIZE LDBL_MANT_DIG | |
96 | #else | |
97 | #define TF_SIZE 0 | |
98 | #endif | |
99 | #endif | |
100 | ||
b04c9063 AM |
101 | /* FIXME: This #ifdef probably should be removed, ie. enable the test |
102 | for mips too. */ | |
5fb54b91 RH |
103 | /* Don't use IBM Extended Double TFmode for TI->SF calculations. |
104 | The conversion from long double to float suffers from double | |
105 | rounding, because we convert via double. In other cases, going | |
106 | through the software fp routines is much slower than the fallback. */ | |
b04c9063 | 107 | #ifdef __powerpc__ |
5fb54b91 RH |
108 | #define AVOID_FP_TYPE_CONVERSION(SIZE) (SIZE == 106) |
109 | #elif defined(WIDEST_HARDWARE_FP_SIZE) | |
110 | #define AVOID_FP_TYPE_CONVERSION(SIZE) (SIZE > WIDEST_HARDWARE_FP_SIZE) | |
b04c9063 | 111 | #else |
5fb54b91 | 112 | #define AVOID_FP_TYPE_CONVERSION(SIZE) 0 |
b04c9063 AM |
113 | #endif |
114 | ||
299b83b7 KG |
115 | /* In the first part of this file, we are interfacing to calls generated |
116 | by the compiler itself. These calls pass values into these routines | |
117 | which have very specific modes (rather than very specific types), and | |
118 | these compiler-generated calls also expect any return values to have | |
119 | very specific modes (rather than very specific types). Thus, we need | |
120 | to avoid using regular C language type names in this part of the file | |
121 | because the sizes for those types can be configured to be anything. | |
122 | Instead we use the following special type names. */ | |
123 | ||
124 | typedef int QItype __attribute__ ((mode (QI))); | |
125 | typedef unsigned int UQItype __attribute__ ((mode (QI))); | |
126 | typedef int HItype __attribute__ ((mode (HI))); | |
127 | typedef unsigned int UHItype __attribute__ ((mode (HI))); | |
aa63d244 | 128 | #if MIN_UNITS_PER_WORD > 1 |
6614fd40 | 129 | /* These typedefs are usually forbidden on dsp's with UNITS_PER_WORD 1. */ |
299b83b7 KG |
130 | typedef int SItype __attribute__ ((mode (SI))); |
131 | typedef unsigned int USItype __attribute__ ((mode (SI))); | |
4471aff6 | 132 | #if __SIZEOF_LONG_LONG__ > 4 |
6614fd40 | 133 | /* These typedefs are usually forbidden on archs with UNITS_PER_WORD 2. */ |
299b83b7 KG |
134 | typedef int DItype __attribute__ ((mode (DI))); |
135 | typedef unsigned int UDItype __attribute__ ((mode (DI))); | |
6da9c622 | 136 | #if MIN_UNITS_PER_WORD > 4 |
6614fd40 | 137 | /* These typedefs are usually forbidden on archs with UNITS_PER_WORD 4. */ |
6da9c622 RK |
138 | typedef int TItype __attribute__ ((mode (TI))); |
139 | typedef unsigned int UTItype __attribute__ ((mode (TI))); | |
140 | #endif | |
299b83b7 KG |
141 | #endif |
142 | #endif | |
143 | ||
cfa7bd9c | 144 | #if LIBGCC2_HAS_SF_MODE |
299b83b7 | 145 | typedef float SFtype __attribute__ ((mode (SF))); |
7e7e470f | 146 | typedef _Complex float SCtype __attribute__ ((mode (SC))); |
cfa7bd9c | 147 | #endif |
4e9db8b2 | 148 | #if LIBGCC2_HAS_DF_MODE |
4f2e0d5e RH |
149 | typedef float DFtype __attribute__ ((mode (DF))); |
150 | typedef _Complex float DCtype __attribute__ ((mode (DC))); | |
151 | #endif | |
4e9db8b2 | 152 | #if LIBGCC2_HAS_XF_MODE |
299b83b7 | 153 | typedef float XFtype __attribute__ ((mode (XF))); |
7e7e470f | 154 | typedef _Complex float XCtype __attribute__ ((mode (XC))); |
299b83b7 | 155 | #endif |
4e9db8b2 | 156 | #if LIBGCC2_HAS_TF_MODE |
299b83b7 | 157 | typedef float TFtype __attribute__ ((mode (TF))); |
7e7e470f | 158 | typedef _Complex float TCtype __attribute__ ((mode (TC))); |
299b83b7 KG |
159 | #endif |
160 | ||
c7ff6e7a AK |
161 | typedef int cmp_return_type __attribute__((mode (__libgcc_cmp_return__))); |
162 | typedef int shift_count_type __attribute__((mode (__libgcc_shift_count__))); | |
299b83b7 KG |
163 | |
164 | /* Make sure that we don't accidentally use any normal C language built-in | |
165 | type names in the first part of this file. Instead we want to use *only* | |
166 | the type names defined above. The following macro definitions insure | |
167 | that if we *do* accidentally use some normal C language built-in type name, | |
168 | we will get a syntax error. */ | |
169 | ||
170 | #define char bogus_type | |
171 | #define short bogus_type | |
172 | #define int bogus_type | |
173 | #define long bogus_type | |
174 | #define unsigned bogus_type | |
175 | #define float bogus_type | |
176 | #define double bogus_type | |
177 | ||
0aec6014 EB |
178 | /* Versions prior to 3.4.4 were not taking into account the word size for |
179 | the 5 trapping arithmetic functions absv, addv, subv, mulv and negv. As | |
180 | a consequence, the si and di variants were always and the only ones emitted. | |
181 | To maintain backward compatibility, COMPAT_SIMODE_TRAPPING_ARITHMETIC is | |
182 | defined on platforms where it makes sense to still have the si variants | |
183 | emitted. As a bonus, their implementation is now correct. Note that the | |
184 | same mechanism should have been implemented for the di variants, but it | |
185 | turns out that no platform would define COMPAT_DIMODE_TRAPPING_ARITHMETIC | |
186 | if it existed. */ | |
187 | ||
baffad1f | 188 | #if LIBGCC2_UNITS_PER_WORD == 8 |
6da9c622 RK |
189 | #define W_TYPE_SIZE (8 * BITS_PER_UNIT) |
190 | #define Wtype DItype | |
191 | #define UWtype UDItype | |
192 | #define HWtype DItype | |
193 | #define UHWtype UDItype | |
194 | #define DWtype TItype | |
195 | #define UDWtype UTItype | |
cdbf4541 BS |
196 | #ifdef LIBGCC2_GNU_PREFIX |
197 | #define __NW(a,b) __gnu_ ## a ## di ## b | |
198 | #define __NDW(a,b) __gnu_ ## a ## ti ## b | |
199 | #else | |
6da9c622 RK |
200 | #define __NW(a,b) __ ## a ## di ## b |
201 | #define __NDW(a,b) __ ## a ## ti ## b | |
cdbf4541 | 202 | #endif |
0aec6014 | 203 | #define COMPAT_SIMODE_TRAPPING_ARITHMETIC |
baffad1f | 204 | #elif LIBGCC2_UNITS_PER_WORD == 4 |
299b83b7 KG |
205 | #define W_TYPE_SIZE (4 * BITS_PER_UNIT) |
206 | #define Wtype SItype | |
207 | #define UWtype USItype | |
208 | #define HWtype SItype | |
209 | #define UHWtype USItype | |
210 | #define DWtype DItype | |
211 | #define UDWtype UDItype | |
cdbf4541 BS |
212 | #ifdef LIBGCC2_GNU_PREFIX |
213 | #define __NW(a,b) __gnu_ ## a ## si ## b | |
214 | #define __NDW(a,b) __gnu_ ## a ## di ## b | |
215 | #else | |
299b83b7 KG |
216 | #define __NW(a,b) __ ## a ## si ## b |
217 | #define __NDW(a,b) __ ## a ## di ## b | |
cdbf4541 | 218 | #endif |
baffad1f | 219 | #elif LIBGCC2_UNITS_PER_WORD == 2 |
299b83b7 KG |
220 | #define W_TYPE_SIZE (2 * BITS_PER_UNIT) |
221 | #define Wtype HItype | |
222 | #define UWtype UHItype | |
223 | #define HWtype HItype | |
224 | #define UHWtype UHItype | |
225 | #define DWtype SItype | |
226 | #define UDWtype USItype | |
cdbf4541 BS |
227 | #ifdef LIBGCC2_GNU_PREFIX |
228 | #define __NW(a,b) __gnu_ ## a ## hi ## b | |
229 | #define __NDW(a,b) __gnu_ ## a ## si ## b | |
230 | #else | |
299b83b7 KG |
231 | #define __NW(a,b) __ ## a ## hi ## b |
232 | #define __NDW(a,b) __ ## a ## si ## b | |
cdbf4541 | 233 | #endif |
299b83b7 KG |
234 | #else |
235 | #define W_TYPE_SIZE BITS_PER_UNIT | |
236 | #define Wtype QItype | |
237 | #define UWtype UQItype | |
238 | #define HWtype QItype | |
239 | #define UHWtype UQItype | |
240 | #define DWtype HItype | |
241 | #define UDWtype UHItype | |
cdbf4541 BS |
242 | #ifdef LIBGCC2_GNU_PREFIX |
243 | #define __NW(a,b) __gnu_ ## a ## qi ## b | |
244 | #define __NDW(a,b) __gnu_ ## a ## hi ## b | |
245 | #else | |
299b83b7 KG |
246 | #define __NW(a,b) __ ## a ## qi ## b |
247 | #define __NDW(a,b) __ ## a ## hi ## b | |
248 | #endif | |
cdbf4541 | 249 | #endif |
299b83b7 | 250 | |
cdbf4541 BS |
251 | #ifdef LIBGCC2_GNU_PREFIX |
252 | #define __N(a) __gnu_ ## a | |
253 | #else | |
254 | #define __N(a) __ ## a | |
255 | #endif | |
5d0e6486 AO |
256 | #define Wtype_MAX ((Wtype)(((UWtype)1 << (W_TYPE_SIZE - 1)) - 1)) |
257 | #define Wtype_MIN (- Wtype_MAX - 1) | |
258 | ||
4f2e0d5e RH |
259 | #if W_TYPE_SIZE == 8 |
260 | # define Wtype_MAXp1_F 0x1p8f | |
261 | #elif W_TYPE_SIZE == 16 | |
262 | # define Wtype_MAXp1_F 0x1p16f | |
263 | #elif W_TYPE_SIZE == 32 | |
264 | # define Wtype_MAXp1_F 0x1p32f | |
265 | #elif W_TYPE_SIZE == 64 | |
266 | # define Wtype_MAXp1_F 0x1p64f | |
267 | #else | |
268 | # error "expand the table" | |
269 | #endif | |
270 | ||
6da9c622 RK |
271 | #define __muldi3 __NDW(mul,3) |
272 | #define __divdi3 __NDW(div,3) | |
273 | #define __udivdi3 __NDW(udiv,3) | |
274 | #define __moddi3 __NDW(mod,3) | |
275 | #define __umoddi3 __NDW(umod,3) | |
276 | #define __negdi2 __NDW(neg,2) | |
277 | #define __lshrdi3 __NDW(lshr,3) | |
278 | #define __ashldi3 __NDW(ashl,3) | |
279 | #define __ashrdi3 __NDW(ashr,3) | |
6da9c622 RK |
280 | #define __cmpdi2 __NDW(cmp,2) |
281 | #define __ucmpdi2 __NDW(ucmp,2) | |
282 | #define __udivmoddi4 __NDW(udivmod,4) | |
283 | #define __fixunstfDI __NDW(fixunstf,) | |
284 | #define __fixtfdi __NDW(fixtf,) | |
285 | #define __fixunsxfDI __NDW(fixunsxf,) | |
286 | #define __fixxfdi __NDW(fixxf,) | |
287 | #define __fixunsdfDI __NDW(fixunsdf,) | |
288 | #define __fixdfdi __NDW(fixdf,) | |
289 | #define __fixunssfDI __NDW(fixunssf,) | |
290 | #define __fixsfdi __NDW(fixsf,) | |
291 | #define __floatdixf __NDW(float,xf) | |
292 | #define __floatditf __NDW(float,tf) | |
293 | #define __floatdidf __NDW(float,df) | |
294 | #define __floatdisf __NDW(float,sf) | |
d7735880 JM |
295 | #define __floatundixf __NDW(floatun,xf) |
296 | #define __floatunditf __NDW(floatun,tf) | |
297 | #define __floatundidf __NDW(floatun,df) | |
298 | #define __floatundisf __NDW(floatun,sf) | |
6da9c622 RK |
299 | #define __fixunsxfSI __NW(fixunsxf,) |
300 | #define __fixunstfSI __NW(fixunstf,) | |
301 | #define __fixunsdfSI __NW(fixunsdf,) | |
302 | #define __fixunssfSI __NW(fixunssf,) | |
303 | ||
0aec6014 EB |
304 | #define __absvSI2 __NW(absv,2) |
305 | #define __addvSI3 __NW(addv,3) | |
306 | #define __subvSI3 __NW(subv,3) | |
307 | #define __mulvSI3 __NW(mulv,3) | |
308 | #define __negvSI2 __NW(negv,2) | |
309 | #define __absvDI2 __NDW(absv,2) | |
310 | #define __addvDI3 __NDW(addv,3) | |
311 | #define __subvDI3 __NDW(subv,3) | |
312 | #define __mulvDI3 __NDW(mulv,3) | |
313 | #define __negvDI2 __NDW(negv,2) | |
314 | ||
dfff898c | 315 | #define __ffsSI2 __NW(ffs,2) |
8275b011 RH |
316 | #define __clzSI2 __NW(clz,2) |
317 | #define __ctzSI2 __NW(ctz,2) | |
318 | #define __popcountSI2 __NW(popcount,2) | |
319 | #define __paritySI2 __NW(parity,2) | |
dfff898c | 320 | #define __ffsDI2 __NDW(ffs,2) |
8275b011 RH |
321 | #define __clzDI2 __NDW(clz,2) |
322 | #define __ctzDI2 __NDW(ctz,2) | |
323 | #define __popcountDI2 __NDW(popcount,2) | |
324 | #define __parityDI2 __NDW(parity,2) | |
dfff898c | 325 | |
cdbf4541 BS |
326 | #define __clz_tab __N(clz_tab) |
327 | #define __powisf2 __N(powisf2) | |
328 | #define __powidf2 __N(powidf2) | |
329 | #define __powitf2 __N(powitf2) | |
330 | #define __powixf2 __N(powixf2) | |
331 | #define __bswapsi2 __N(bswapsi2) | |
332 | #define __bswapdi2 __N(bswapdi2) | |
333 | #define __mulsc3 __N(mulsc3) | |
334 | #define __muldc3 __N(muldc3) | |
335 | #define __mulxc3 __N(mulxc3) | |
336 | #define __multc3 __N(multc3) | |
337 | #define __divsc3 __N(divsc3) | |
338 | #define __divdc3 __N(divdc3) | |
339 | #define __divxc3 __N(divxc3) | |
340 | #define __divtc3 __N(divtc3) | |
341 | #define __udiv_w_sdiv __N(udiv_w_sdiv) | |
342 | #define __clear_cache __N(clear_cache) | |
343 | #define __enable_execute_stack __N(enable_execute_stack) | |
344 | ||
d30d6e76 KG |
345 | extern DWtype __muldi3 (DWtype, DWtype); |
346 | extern DWtype __divdi3 (DWtype, DWtype); | |
347 | extern UDWtype __udivdi3 (UDWtype, UDWtype); | |
348 | extern UDWtype __umoddi3 (UDWtype, UDWtype); | |
349 | extern DWtype __moddi3 (DWtype, DWtype); | |
6da9c622 | 350 | |
d30d6e76 KG |
351 | /* __udivmoddi4 is static inline when building other libgcc2 portions. */ |
352 | #if (!defined (L_udivdi3) && !defined (L_divdi3) && \ | |
353 | !defined (L_umoddi3) && !defined (L_moddi3)) | |
354 | extern UDWtype __udivmoddi4 (UDWtype, UDWtype, UDWtype *); | |
355 | #endif | |
356 | ||
357 | /* __negdi2 is static inline when building other libgcc2 portions. */ | |
358 | #if !defined(L_divdi3) && !defined(L_moddi3) | |
359 | extern DWtype __negdi2 (DWtype); | |
360 | #endif | |
361 | ||
c7ff6e7a AK |
362 | extern DWtype __lshrdi3 (DWtype, shift_count_type); |
363 | extern DWtype __ashldi3 (DWtype, shift_count_type); | |
364 | extern DWtype __ashrdi3 (DWtype, shift_count_type); | |
2928cd7a | 365 | |
d30d6e76 KG |
366 | /* __udiv_w_sdiv is static inline when building other libgcc2 portions. */ |
367 | #if (!defined(L_udivdi3) && !defined(L_divdi3) && \ | |
368 | !defined(L_umoddi3) && !defined(L_moddi3)) | |
369 | extern UWtype __udiv_w_sdiv (UWtype *, UWtype, UWtype, UWtype); | |
370 | #endif | |
371 | ||
c7ff6e7a AK |
372 | extern cmp_return_type __cmpdi2 (DWtype, DWtype); |
373 | extern cmp_return_type __ucmpdi2 (DWtype, DWtype); | |
d30d6e76 | 374 | |
66965e90 EC |
375 | #if MIN_UNITS_PER_WORD > 1 |
376 | extern SItype __bswapsi2 (SItype); | |
377 | #endif | |
4471aff6 | 378 | #if __SIZEOF_LONG_LONG__ > 4 |
66965e90 EC |
379 | extern DItype __bswapdi2 (DItype); |
380 | #endif | |
381 | ||
0aec6014 EB |
382 | extern Wtype __absvSI2 (Wtype); |
383 | extern Wtype __addvSI3 (Wtype, Wtype); | |
384 | extern Wtype __subvSI3 (Wtype, Wtype); | |
385 | extern Wtype __mulvSI3 (Wtype, Wtype); | |
386 | extern Wtype __negvSI2 (Wtype); | |
387 | extern DWtype __absvDI2 (DWtype); | |
388 | extern DWtype __addvDI3 (DWtype, DWtype); | |
389 | extern DWtype __subvDI3 (DWtype, DWtype); | |
390 | extern DWtype __mulvDI3 (DWtype, DWtype); | |
391 | extern DWtype __negvDI2 (DWtype); | |
392 | ||
393 | #ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC | |
cdbf4541 BS |
394 | #define __absvsi2 __N(absvsi2) |
395 | #define __negvsi2 __N(negvsi2) | |
396 | #define __addvsi3 __N(addvsi3) | |
397 | #define __subvsi3 __N(subvsi3) | |
398 | #define __mulvsi3 __N(mulvsi3) | |
399 | ||
0aec6014 EB |
400 | extern SItype __absvsi2 (SItype); |
401 | extern SItype __addvsi3 (SItype, SItype); | |
402 | extern SItype __subvsi3 (SItype, SItype); | |
403 | extern SItype __mulvsi3 (SItype, SItype); | |
404 | extern SItype __negvsi2 (SItype); | |
405 | #endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */ | |
8f54374e | 406 | |
0b8495ae | 407 | #undef int |
cfa7bd9c | 408 | #if LIBGCC2_HAS_SF_MODE |
d30d6e76 | 409 | extern DWtype __fixsfdi (SFtype); |
d30d6e76 | 410 | extern SFtype __floatdisf (DWtype); |
d7735880 | 411 | extern SFtype __floatundisf (UDWtype); |
6da9c622 | 412 | extern UWtype __fixunssfSI (SFtype); |
f139f5fa | 413 | extern UDWtype __fixunssfDI (SFtype); |
0b8495ae | 414 | extern SFtype __powisf2 (SFtype, int); |
7e7e470f RH |
415 | extern SCtype __divsc3 (SFtype, SFtype, SFtype, SFtype); |
416 | extern SCtype __mulsc3 (SFtype, SFtype, SFtype, SFtype); | |
cfa7bd9c | 417 | #endif |
4e9db8b2 | 418 | #if LIBGCC2_HAS_DF_MODE |
4f2e0d5e RH |
419 | extern DWtype __fixdfdi (DFtype); |
420 | extern DFtype __floatdidf (DWtype); | |
d7735880 | 421 | extern DFtype __floatundidf (UDWtype); |
4f2e0d5e | 422 | extern UWtype __fixunsdfSI (DFtype); |
f139f5fa | 423 | extern UDWtype __fixunsdfDI (DFtype); |
0b8495ae | 424 | extern DFtype __powidf2 (DFtype, int); |
7e7e470f RH |
425 | extern DCtype __divdc3 (DFtype, DFtype, DFtype, DFtype); |
426 | extern DCtype __muldc3 (DFtype, DFtype, DFtype, DFtype); | |
4f2e0d5e | 427 | #endif |
7e7e470f | 428 | |
4e9db8b2 | 429 | #if LIBGCC2_HAS_XF_MODE |
d30d6e76 | 430 | extern DWtype __fixxfdi (XFtype); |
f139f5fa | 431 | extern UDWtype __fixunsxfDI (XFtype); |
d30d6e76 | 432 | extern XFtype __floatdixf (DWtype); |
d7735880 | 433 | extern XFtype __floatundixf (UDWtype); |
6da9c622 | 434 | extern UWtype __fixunsxfSI (XFtype); |
0b8495ae | 435 | extern XFtype __powixf2 (XFtype, int); |
7e7e470f RH |
436 | extern XCtype __divxc3 (XFtype, XFtype, XFtype, XFtype); |
437 | extern XCtype __mulxc3 (XFtype, XFtype, XFtype, XFtype); | |
d30d6e76 KG |
438 | #endif |
439 | ||
4e9db8b2 | 440 | #if LIBGCC2_HAS_TF_MODE |
f139f5fa | 441 | extern UDWtype __fixunstfDI (TFtype); |
d30d6e76 KG |
442 | extern DWtype __fixtfdi (TFtype); |
443 | extern TFtype __floatditf (DWtype); | |
d7735880 | 444 | extern TFtype __floatunditf (UDWtype); |
0b8495ae | 445 | extern TFtype __powitf2 (TFtype, int); |
7e7e470f RH |
446 | extern TCtype __divtc3 (TFtype, TFtype, TFtype, TFtype); |
447 | extern TCtype __multc3 (TFtype, TFtype, TFtype, TFtype); | |
d30d6e76 | 448 | #endif |
0b8495ae | 449 | #define int bogus_type |
d30d6e76 | 450 | |
299b83b7 | 451 | /* DWstructs are pairs of Wtype values in the order determined by |
18ed6ee4 | 452 | __BYTE_ORDER__. */ |
299b83b7 | 453 | |
18ed6ee4 | 454 | #if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ |
299b83b7 KG |
455 | struct DWstruct {Wtype high, low;}; |
456 | #else | |
457 | struct DWstruct {Wtype low, high;}; | |
458 | #endif | |
459 | ||
460 | /* We need this union to unpack/pack DImode values, since we don't have | |
461 | any arithmetic yet. Incoming DImode parameters are stored into the | |
462 | `ll' field, and the unpacked result is read from the struct `s'. */ | |
463 | ||
464 | typedef union | |
465 | { | |
466 | struct DWstruct s; | |
467 | DWtype ll; | |
468 | } DWunion; | |
469 | ||
dcfae47c NC |
470 | /* Defined for L_popcount_tab. Exported here because some targets may |
471 | want to use it for their own versions of the __popcount builtins. */ | |
472 | extern const UQItype __popcount_tab[256]; | |
473 | ||
474 | /* Defined for L_clz. Exported here because some targets may want to use | |
475 | it for their own versions of the __clz builtins. It contains the bit | |
476 | position of the first set bit for the numbers 0 - 255. This avoids the | |
6fc0bb99 | 477 | need for a separate table for the __ctz builtins. */ |
dcfae47c NC |
478 | extern const UQItype __clz_tab[256]; |
479 | ||
299b83b7 KG |
480 | #include "longlong.h" |
481 | ||
3fc1f660 MM |
482 | #undef int |
483 | extern int __clzDI2 (UDWtype); | |
484 | extern int __clzSI2 (UWtype); | |
485 | extern int __ctzSI2 (UWtype); | |
486 | extern int __ffsSI2 (UWtype); | |
487 | extern int __ffsDI2 (DWtype); | |
488 | extern int __ctzDI2 (UDWtype); | |
489 | extern int __popcountSI2 (UWtype); | |
490 | extern int __popcountDI2 (UDWtype); | |
491 | extern int __paritySI2 (UWtype); | |
492 | extern int __parityDI2 (UDWtype); | |
493 | #define int bogus_type | |
494 | ||
495 | extern void __enable_execute_stack (void *); | |
496 | ||
7370bebd | 497 | #ifndef HIDE_EXPORTS |
3fc1f660 | 498 | #pragma GCC visibility pop |
7370bebd | 499 | #endif |
3fc1f660 | 500 | |
88657302 | 501 | #endif /* ! GCC_LIBGCC2_H */ |