00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef GCC_LIBGCC2_H
00031 #define GCC_LIBGCC2_H
00032
00033 extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t);
00034 extern void __clear_cache (char *, char *);
00035 extern void __eprintf (const char *, const char *, unsigned int, const char *)
00036 __attribute__ ((__noreturn__));
00037
00038 struct bb;
00039 extern void __bb_exit_func (void);
00040 extern void __bb_init_func (struct bb *);
00041 extern void __bb_fork_func (void);
00042
00043 #if LONG_TYPE_SIZE == GCOV_TYPE_SIZE
00044 typedef long gcov_type;
00045 #else
00046 typedef long long gcov_type;
00047 #endif
00048
00049 extern gcov_type *__bb_find_arc_counters (void);
00050
00051 struct exception_descriptor;
00052 extern short int __get_eh_table_language (struct exception_descriptor *);
00053 extern short int __get_eh_table_version (struct exception_descriptor *);
00054
00055
00056
00057
00058
00059 #ifndef LIBGCC2_WORDS_BIG_ENDIAN
00060 #define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
00061 #endif
00062
00063 #ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
00064 #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
00065 #endif
00066
00067 #ifndef MIN_UNITS_PER_WORD
00068 #define MIN_UNITS_PER_WORD UNITS_PER_WORD
00069 #endif
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 typedef int QItype __attribute__ ((mode (QI)));
00081 typedef unsigned int UQItype __attribute__ ((mode (QI)));
00082 typedef int HItype __attribute__ ((mode (HI)));
00083 typedef unsigned int UHItype __attribute__ ((mode (HI)));
00084 #if MIN_UNITS_PER_WORD > 1
00085
00086 typedef int SItype __attribute__ ((mode (SI)));
00087 typedef unsigned int USItype __attribute__ ((mode (SI)));
00088 #if LONG_LONG_TYPE_SIZE > 32
00089
00090 typedef int DItype __attribute__ ((mode (DI)));
00091 typedef unsigned int UDItype __attribute__ ((mode (DI)));
00092 #if MIN_UNITS_PER_WORD > 4
00093
00094 typedef int TItype __attribute__ ((mode (TI)));
00095 typedef unsigned int UTItype __attribute__ ((mode (TI)));
00096 #endif
00097 #endif
00098 #endif
00099
00100 #if BITS_PER_UNIT == 8
00101
00102 typedef float SFtype __attribute__ ((mode (SF)));
00103 typedef float DFtype __attribute__ ((mode (DF)));
00104
00105 #if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
00106 typedef float XFtype __attribute__ ((mode (XF)));
00107 #endif
00108 #if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
00109 typedef float TFtype __attribute__ ((mode (TF)));
00110 #endif
00111
00112 #else
00113
00114
00115
00116
00117 #undef L_fixdfdi
00118 #undef L_fixsfdi
00119 #undef L_fixtfdi
00120 #undef L_fixunsdfdi
00121 #undef L_fixunsdfsi
00122 #undef L_fixunssfdi
00123 #undef L_fixunssfsi
00124 #undef L_fixunstfdi
00125 #undef L_fixunsxfdi
00126 #undef L_fixunsxfsi
00127 #undef L_fixxfdi
00128 #undef L_floatdidf
00129 #undef L_floatdisf
00130 #undef L_floatditf
00131 #undef L_floatdixf
00132
00133 #endif
00134
00135 typedef int word_type __attribute__ ((mode (__word__)));
00136
00137
00138
00139
00140
00141
00142
00143 #define char bogus_type
00144 #define short bogus_type
00145 #define int bogus_type
00146 #define long bogus_type
00147 #define unsigned bogus_type
00148 #define float bogus_type
00149 #define double bogus_type
00150
00151 #if MIN_UNITS_PER_WORD > 4
00152 #define W_TYPE_SIZE (8 * BITS_PER_UNIT)
00153 #define Wtype DItype
00154 #define UWtype UDItype
00155 #define HWtype DItype
00156 #define UHWtype UDItype
00157 #define DWtype TItype
00158 #define UDWtype UTItype
00159 #define __NW(a,b) __ ## a ## di ## b
00160 #define __NDW(a,b) __ ## a ## ti ## b
00161 #elif MIN_UNITS_PER_WORD > 2 \
00162 || (MIN_UNITS_PER_WORD > 1 && LONG_LONG_TYPE_SIZE > 32)
00163 #define W_TYPE_SIZE (4 * BITS_PER_UNIT)
00164 #define Wtype SItype
00165 #define UWtype USItype
00166 #define HWtype SItype
00167 #define UHWtype USItype
00168 #define DWtype DItype
00169 #define UDWtype UDItype
00170 #define __NW(a,b) __ ## a ## si ## b
00171 #define __NDW(a,b) __ ## a ## di ## b
00172 #elif MIN_UNITS_PER_WORD > 1
00173 #define W_TYPE_SIZE (2 * BITS_PER_UNIT)
00174 #define Wtype HItype
00175 #define UWtype UHItype
00176 #define HWtype HItype
00177 #define UHWtype UHItype
00178 #define DWtype SItype
00179 #define UDWtype USItype
00180 #define __NW(a,b) __ ## a ## hi ## b
00181 #define __NDW(a,b) __ ## a ## si ## b
00182 #else
00183 #define W_TYPE_SIZE BITS_PER_UNIT
00184 #define Wtype QItype
00185 #define UWtype UQItype
00186 #define HWtype QItype
00187 #define UHWtype UQItype
00188 #define DWtype HItype
00189 #define UDWtype UHItype
00190 #define __NW(a,b) __ ## a ## qi ## b
00191 #define __NDW(a,b) __ ## a ## hi ## b
00192 #endif
00193
00194 #define Wtype_MAX ((Wtype)(((UWtype)1 << (W_TYPE_SIZE - 1)) - 1))
00195 #define Wtype_MIN (- Wtype_MAX - 1)
00196
00197 #define __muldi3 __NDW(mul,3)
00198 #define __divdi3 __NDW(div,3)
00199 #define __udivdi3 __NDW(udiv,3)
00200 #define __moddi3 __NDW(mod,3)
00201 #define __umoddi3 __NDW(umod,3)
00202 #define __negdi2 __NDW(neg,2)
00203 #define __lshrdi3 __NDW(lshr,3)
00204 #define __ashldi3 __NDW(ashl,3)
00205 #define __ashrdi3 __NDW(ashr,3)
00206 #define __ffsdi2 __NDW(ffs,2)
00207 #define __cmpdi2 __NDW(cmp,2)
00208 #define __ucmpdi2 __NDW(ucmp,2)
00209 #define __udivmoddi4 __NDW(udivmod,4)
00210 #define __fixunstfDI __NDW(fixunstf,)
00211 #define __fixtfdi __NDW(fixtf,)
00212 #define __fixunsxfDI __NDW(fixunsxf,)
00213 #define __fixxfdi __NDW(fixxf,)
00214 #define __fixunsdfDI __NDW(fixunsdf,)
00215 #define __fixdfdi __NDW(fixdf,)
00216 #define __fixunssfDI __NDW(fixunssf,)
00217 #define __fixsfdi __NDW(fixsf,)
00218 #define __floatdixf __NDW(float,xf)
00219 #define __floatditf __NDW(float,tf)
00220 #define __floatdidf __NDW(float,df)
00221 #define __floatdisf __NDW(float,sf)
00222 #define __fixunsxfSI __NW(fixunsxf,)
00223 #define __fixunstfSI __NW(fixunstf,)
00224 #define __fixunsdfSI __NW(fixunsdf,)
00225 #define __fixunssfSI __NW(fixunssf,)
00226
00227 extern DWtype __muldi3 (DWtype, DWtype);
00228 extern DWtype __divdi3 (DWtype, DWtype);
00229 extern UDWtype __udivdi3 (UDWtype, UDWtype);
00230 extern UDWtype __umoddi3 (UDWtype, UDWtype);
00231 extern DWtype __moddi3 (DWtype, DWtype);
00232
00233
00234 #if (!defined (L_udivdi3) && !defined (L_divdi3) && \
00235 !defined (L_umoddi3) && !defined (L_moddi3))
00236 extern UDWtype __udivmoddi4 (UDWtype, UDWtype, UDWtype *);
00237 #endif
00238
00239
00240 #if !defined(L_divdi3) && !defined(L_moddi3)
00241 extern DWtype __negdi2 (DWtype);
00242 #endif
00243
00244 extern DWtype __lshrdi3 (DWtype, word_type);
00245 extern DWtype __ashldi3 (DWtype, word_type);
00246 extern DWtype __ashrdi3 (DWtype, word_type);
00247 extern DWtype __ffsdi2 (DWtype);
00248
00249
00250 #if (!defined(L_udivdi3) && !defined(L_divdi3) && \
00251 !defined(L_umoddi3) && !defined(L_moddi3))
00252 extern UWtype __udiv_w_sdiv (UWtype *, UWtype, UWtype, UWtype);
00253 #endif
00254
00255 extern word_type __cmpdi2 (DWtype, DWtype);
00256 extern word_type __ucmpdi2 (DWtype, DWtype);
00257
00258 extern Wtype __absvsi2 (Wtype);
00259 extern DWtype __absvdi2 (DWtype);
00260 extern Wtype __addvsi3 (Wtype, Wtype);
00261 extern DWtype __addvdi3 (DWtype, DWtype);
00262 extern Wtype __subvsi3 (Wtype, Wtype);
00263 extern DWtype __subvdi3 (DWtype, DWtype);
00264 extern Wtype __mulvsi3 (Wtype, Wtype);
00265 extern DWtype __mulvdi3 (DWtype, DWtype);
00266 extern Wtype __negvsi2 (Wtype);
00267 extern DWtype __negvdi2 (DWtype);
00268
00269 #if BITS_PER_UNIT == 8
00270 extern DWtype __fixdfdi (DFtype);
00271 extern DWtype __fixsfdi (SFtype);
00272 extern DFtype __floatdidf (DWtype);
00273 extern SFtype __floatdisf (DWtype);
00274 extern UWtype __fixunsdfSI (DFtype);
00275 extern UWtype __fixunssfSI (SFtype);
00276 extern DWtype __fixunsdfDI (DFtype);
00277 extern DWtype __fixunssfDI (SFtype);
00278
00279 #if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
00280 extern DWtype __fixxfdi (XFtype);
00281 extern DWtype __fixunsxfDI (XFtype);
00282 extern XFtype __floatdixf (DWtype);
00283 extern UWtype __fixunsxfSI (XFtype);
00284 #endif
00285
00286 #if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
00287 extern DWtype __fixunstfDI (TFtype);
00288 extern DWtype __fixtfdi (TFtype);
00289 extern TFtype __floatditf (DWtype);
00290 #endif
00291 #endif
00292
00293
00294
00295
00296 #if LIBGCC2_WORDS_BIG_ENDIAN
00297 struct DWstruct {Wtype high, low;};
00298 #else
00299 struct DWstruct {Wtype low, high;};
00300 #endif
00301
00302
00303
00304
00305
00306 typedef union
00307 {
00308 struct DWstruct s;
00309 DWtype ll;
00310 } DWunion;
00311
00312 #include "longlong.h"
00313
00314 #endif