annotate libgcc/libgcc2.h @ 158:494b0b89df80 default tip

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