Alexander Smirnov a3d2d09cb1 Merge branch 'rightlib' into merge-libs-250127-0020 1 week ago
..
.yandex_meta 1745f60703 Intermediate changes 1 week ago
Darwin-excludes 40811e93f3 Merge branch 'rightlib' into mergelibs-241016-1210 3 months ago
aarch64 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
arm a6b36208ec Update compiler_rt to 18.1.8 2 months ago
avr 8b3352ece4 Untitled commit 3 months ago
cpu_model 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
hexagon 8b3352ece4 Untitled commit 3 months ago
i386 a6b36208ec Update compiler_rt to 18.1.8 2 months ago
loongarch 8b3352ece4 Untitled commit 3 months ago
macho_embedded 40811e93f3 Merge branch 'rightlib' into mergelibs-241016-1210 3 months ago
ppc 8b3352ece4 Untitled commit 3 months ago
riscv 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
ve 8b3352ece4 Untitled commit 3 months ago
x86_64 a6b36208ec Update compiler_rt to 18.1.8 2 months ago
CODE_OWNERS.TXT 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
CREDITS.TXT 8b3352ece4 Untitled commit 3 months ago
LICENSE.TXT 8b3352ece4 Untitled commit 3 months ago
README.txt 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
absvdi2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
absvsi2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
absvti2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
adddf3.c 8b3352ece4 Untitled commit 3 months ago
addsf3.c 8b3352ece4 Untitled commit 3 months ago
addtf3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
addvdi3.c 8b3352ece4 Untitled commit 3 months ago
addvsi3.c 8b3352ece4 Untitled commit 3 months ago
addvti3.c 8b3352ece4 Untitled commit 3 months ago
apple_versioning.c 8b3352ece4 Untitled commit 3 months ago
ashldi3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
ashlti3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
ashrdi3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
ashrti3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
assembly.h a6b36208ec Update compiler_rt to 18.1.8 2 months ago
atomic.c 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
atomic_flag_clear.c 8b3352ece4 Untitled commit 3 months ago
atomic_flag_clear_explicit.c 8b3352ece4 Untitled commit 3 months ago
atomic_flag_test_and_set.c 8b3352ece4 Untitled commit 3 months ago
atomic_flag_test_and_set_explicit.c 8b3352ece4 Untitled commit 3 months ago
atomic_signal_fence.c 8b3352ece4 Untitled commit 3 months ago
atomic_thread_fence.c 8b3352ece4 Untitled commit 3 months ago
bswapdi2.c 8b3352ece4 Untitled commit 3 months ago
bswapsi2.c 8b3352ece4 Untitled commit 3 months ago
clear_cache.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
clzdi2.c 8b3352ece4 Untitled commit 3 months ago
clzsi2.c 8b3352ece4 Untitled commit 3 months ago
clzti2.c 8b3352ece4 Untitled commit 3 months ago
cmpdi2.c 8b3352ece4 Untitled commit 3 months ago
cmpti2.c 8b3352ece4 Untitled commit 3 months ago
comparedf2.c 8b3352ece4 Untitled commit 3 months ago
comparesf2.c 8b3352ece4 Untitled commit 3 months ago
comparetf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
crtbegin.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
crtend.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
ctzdi2.c 8b3352ece4 Untitled commit 3 months ago
ctzsi2.c 8b3352ece4 Untitled commit 3 months ago
ctzti2.c 8b3352ece4 Untitled commit 3 months ago
divdc3.c 8b3352ece4 Untitled commit 3 months ago
divdf3.c 8b3352ece4 Untitled commit 3 months ago
divdi3.c 8b3352ece4 Untitled commit 3 months ago
divmoddi4.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
divmodsi4.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
divmodti4.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
divsc3.c 8b3352ece4 Untitled commit 3 months ago
divsf3.c 8b3352ece4 Untitled commit 3 months ago
divsi3.c 8b3352ece4 Untitled commit 3 months ago
divtc3.c 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
divtf3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
divti3.c 8b3352ece4 Untitled commit 3 months ago
divxc3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
emutls.c 8b3352ece4 Untitled commit 3 months ago
enable_execute_stack.c 8b3352ece4 Untitled commit 3 months ago
eprintf.c 8b3352ece4 Untitled commit 3 months ago
extendbfsf2.c 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
extenddftf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
extendhfsf2.c 8b3352ece4 Untitled commit 3 months ago
extendhftf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
extendsfdf2.c 8b3352ece4 Untitled commit 3 months ago
extendsftf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
extendxftf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
ffsdi2.c 8b3352ece4 Untitled commit 3 months ago
ffssi2.c 8b3352ece4 Untitled commit 3 months ago
ffsti2.c 8b3352ece4 Untitled commit 3 months ago
fixdfdi.c 8b3352ece4 Untitled commit 3 months ago
fixdfsi.c 8b3352ece4 Untitled commit 3 months ago
fixdfti.c 8b3352ece4 Untitled commit 3 months ago
fixsfdi.c 8b3352ece4 Untitled commit 3 months ago
fixsfsi.c 8b3352ece4 Untitled commit 3 months ago
fixsfti.c 8b3352ece4 Untitled commit 3 months ago
fixtfdi.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fixtfsi.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fixtfti.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fixunsdfdi.c 8b3352ece4 Untitled commit 3 months ago
fixunsdfsi.c 8b3352ece4 Untitled commit 3 months ago
fixunsdfti.c 8b3352ece4 Untitled commit 3 months ago
fixunssfdi.c 8b3352ece4 Untitled commit 3 months ago
fixunssfsi.c 8b3352ece4 Untitled commit 3 months ago
fixunssfti.c 8b3352ece4 Untitled commit 3 months ago
fixunstfdi.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fixunstfsi.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fixunstfti.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fixunsxfdi.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fixunsxfsi.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fixunsxfti.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fixxfdi.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fixxfti.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatdidf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatdisf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatditf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatdixf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatsidf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatsisf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatsitf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floattidf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floattisf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floattitf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floattixf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatundidf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatundisf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatunditf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatundixf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatunsidf.c 8b3352ece4 Untitled commit 3 months ago
floatunsisf.c 8b3352ece4 Untitled commit 3 months ago
floatunsitf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatuntidf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatuntisf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatuntitf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
floatuntixf.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fp_add_impl.inc 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
fp_compare_impl.inc 8b3352ece4 Untitled commit 3 months ago
fp_div_impl.inc 8b3352ece4 Untitled commit 3 months ago
fp_extend.h 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
fp_extend_impl.inc a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fp_fixint_impl.inc 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
fp_fixuint_impl.inc 8b3352ece4 Untitled commit 3 months ago
fp_lib.h 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
fp_mode.c 8b3352ece4 Untitled commit 3 months ago
fp_mode.h 8b3352ece4 Untitled commit 3 months ago
fp_mul_impl.inc 8b3352ece4 Untitled commit 3 months ago
fp_trunc.h a6b36208ec Update compiler_rt to 18.1.8 2 months ago
fp_trunc_impl.inc a6b36208ec Update compiler_rt to 18.1.8 2 months ago
gcc_personality_v0.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
int_div_impl.inc 8b3352ece4 Untitled commit 3 months ago
int_endianness.h 8b3352ece4 Untitled commit 3 months ago
int_lib.h a6b36208ec Update compiler_rt to 18.1.8 2 months ago
int_math.h 0a1deed2d2 Update contrib/libs/cxxsupp/builtins to 19.1.4 2 months ago
int_mulo_impl.inc a6b36208ec Update compiler_rt to 18.1.8 2 months ago
int_mulv_impl.inc a6b36208ec Update compiler_rt to 18.1.8 2 months ago
int_to_fp.h a6b36208ec Update compiler_rt to 18.1.8 2 months ago
int_to_fp_impl.inc a6b36208ec Update compiler_rt to 18.1.8 2 months ago
int_types.h 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
int_util.c 8b3352ece4 Untitled commit 3 months ago
int_util.h 8b3352ece4 Untitled commit 3 months ago
lshrdi3.c 8b3352ece4 Untitled commit 3 months ago
lshrti3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
moddi3.c 8b3352ece4 Untitled commit 3 months ago
modsi3.c 8b3352ece4 Untitled commit 3 months ago
modti3.c 8b3352ece4 Untitled commit 3 months ago
muldc3.c 8b3352ece4 Untitled commit 3 months ago
muldf3.c 8b3352ece4 Untitled commit 3 months ago
muldi3.c 8b3352ece4 Untitled commit 3 months ago
mulodi4.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
mulosi4.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
muloti4.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
mulsc3.c 8b3352ece4 Untitled commit 3 months ago
mulsf3.c 8b3352ece4 Untitled commit 3 months ago
multc3.c 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
multf3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
multi3.c 8b3352ece4 Untitled commit 3 months ago
mulvdi3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
mulvsi3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
mulvti3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
mulxc3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
negdf2.c 8b3352ece4 Untitled commit 3 months ago
negdi2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
negsf2.c 8b3352ece4 Untitled commit 3 months ago
negti2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
negvdi2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
negvsi2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
negvti2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
os_version_check.c 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
paritydi2.c 8b3352ece4 Untitled commit 3 months ago
paritysi2.c 8b3352ece4 Untitled commit 3 months ago
parityti2.c 8b3352ece4 Untitled commit 3 months ago
popcountdi2.c 8b3352ece4 Untitled commit 3 months ago
popcountsi2.c 8b3352ece4 Untitled commit 3 months ago
popcountti2.c 8b3352ece4 Untitled commit 3 months ago
powidf2.c 8b3352ece4 Untitled commit 3 months ago
powisf2.c 8b3352ece4 Untitled commit 3 months ago
powitf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
powixf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
subdf3.c 8b3352ece4 Untitled commit 3 months ago
subsf3.c 8b3352ece4 Untitled commit 3 months ago
subtf3.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
subvdi3.c 8b3352ece4 Untitled commit 3 months ago
subvsi3.c 8b3352ece4 Untitled commit 3 months ago
subvti3.c 8b3352ece4 Untitled commit 3 months ago
trampoline_setup.c 81518d1241 Update contrib/libs/cxxsupp/builtins to 19.1.3 2 months ago
truncdfbf2.c 8b3352ece4 Untitled commit 3 months ago
truncdfhf2.c 8b3352ece4 Untitled commit 3 months ago
truncdfsf2.c 8b3352ece4 Untitled commit 3 months ago
truncsfbf2.c 8b3352ece4 Untitled commit 3 months ago
truncsfhf2.c 8b3352ece4 Untitled commit 3 months ago
trunctfdf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
trunctfhf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
trunctfsf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
trunctfxf2.c a6b36208ec Update compiler_rt to 18.1.8 2 months ago
ucmpdi2.c 8b3352ece4 Untitled commit 3 months ago
ucmpti2.c 8b3352ece4 Untitled commit 3 months ago
udivdi3.c 8b3352ece4 Untitled commit 3 months ago
udivmoddi4.c 8b3352ece4 Untitled commit 3 months ago
udivmodsi4.c 8b3352ece4 Untitled commit 3 months ago
udivmodti4.c 8b3352ece4 Untitled commit 3 months ago
udivsi3.c 8b3352ece4 Untitled commit 3 months ago
udivti3.c 8b3352ece4 Untitled commit 3 months ago
umoddi3.c 8b3352ece4 Untitled commit 3 months ago
umodsi3.c 8b3352ece4 Untitled commit 3 months ago
umodti3.c 8b3352ece4 Untitled commit 3 months ago
unwind-ehabi-helpers.h 8b3352ece4 Untitled commit 3 months ago
ya.make 1745f60703 Intermediate changes 1 week ago

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================

This is a replacement library for libgcc. Each function is contained
in its own file. Each function has a corresponding unit test under
test/Unit.

A rudimentary script to test each file is in the file called
test/Unit/test.

Here is the specification for this library:

http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc

Please note that the libgcc specification explicitly mentions actual types of
arguments and returned values being expressed with machine modes.
In some cases particular types such as "int", "unsigned", "long long", etc.
may be specified just as examples there.

Here is a synopsis of the contents of this library:

typedef int32_t si_int;
typedef uint32_t su_int;

typedef int64_t di_int;
typedef uint64_t du_int;

// Integral bit manipulation

di_int __ashldi3(di_int a, int b); // a << b
ti_int __ashlti3(ti_int a, int b); // a << b

di_int __ashrdi3(di_int a, int b); // a >> b arithmetic (sign fill)
ti_int __ashrti3(ti_int a, int b); // a >> b arithmetic (sign fill)
di_int __lshrdi3(di_int a, int b); // a >> b logical (zero fill)
ti_int __lshrti3(ti_int a, int b); // a >> b logical (zero fill)

int __clzsi2(si_int a); // count leading zeros
int __clzdi2(di_int a); // count leading zeros
int __clzti2(ti_int a); // count leading zeros
int __ctzsi2(si_int a); // count trailing zeros
int __ctzdi2(di_int a); // count trailing zeros
int __ctzti2(ti_int a); // count trailing zeros

int __ffssi2(si_int a); // find least significant 1 bit
int __ffsdi2(di_int a); // find least significant 1 bit
int __ffsti2(ti_int a); // find least significant 1 bit

int __paritysi2(si_int a); // bit parity
int __paritydi2(di_int a); // bit parity
int __parityti2(ti_int a); // bit parity

int __popcountsi2(si_int a); // bit population
int __popcountdi2(di_int a); // bit population
int __popcountti2(ti_int a); // bit population

uint32_t __bswapsi2(uint32_t a); // a byteswapped
uint64_t __bswapdi2(uint64_t a); // a byteswapped

// Integral arithmetic

di_int __negdi2 (di_int a); // -a
ti_int __negti2 (ti_int a); // -a
di_int __muldi3 (di_int a, di_int b); // a * b
ti_int __multi3 (ti_int a, ti_int b); // a * b
si_int __divsi3 (si_int a, si_int b); // a / b signed
di_int __divdi3 (di_int a, di_int b); // a / b signed
ti_int __divti3 (ti_int a, ti_int b); // a / b signed
su_int __udivsi3 (su_int n, su_int d); // a / b unsigned
du_int __udivdi3 (du_int a, du_int b); // a / b unsigned
tu_int __udivti3 (tu_int a, tu_int b); // a / b unsigned
si_int __modsi3 (si_int a, si_int b); // a % b signed
di_int __moddi3 (di_int a, di_int b); // a % b signed
ti_int __modti3 (ti_int a, ti_int b); // a % b signed
su_int __umodsi3 (su_int a, su_int b); // a % b unsigned
du_int __umoddi3 (du_int a, du_int b); // a % b unsigned
tu_int __umodti3 (tu_int a, tu_int b); // a % b unsigned
du_int __udivmoddi4(du_int a, du_int b, du_int* rem); // a / b, *rem = a % b unsigned
tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); // a / b, *rem = a % b unsigned
su_int __udivmodsi4(su_int a, su_int b, su_int* rem); // a / b, *rem = a % b unsigned
si_int __divmodsi4(si_int a, si_int b, si_int* rem); // a / b, *rem = a % b signed
di_int __divmoddi4(di_int a, di_int b, di_int* rem); // a / b, *rem = a % b signed
ti_int __divmodti4(ti_int a, ti_int b, ti_int* rem); // a / b, *rem = a % b signed



// Integral arithmetic with trapping overflow

si_int __absvsi2(si_int a); // abs(a)
di_int __absvdi2(di_int a); // abs(a)
ti_int __absvti2(ti_int a); // abs(a)

si_int __negvsi2(si_int a); // -a
di_int __negvdi2(di_int a); // -a
ti_int __negvti2(ti_int a); // -a

si_int __addvsi3(si_int a, si_int b); // a + b
di_int __addvdi3(di_int a, di_int b); // a + b
ti_int __addvti3(ti_int a, ti_int b); // a + b

si_int __subvsi3(si_int a, si_int b); // a - b
di_int __subvdi3(di_int a, di_int b); // a - b
ti_int __subvti3(ti_int a, ti_int b); // a - b

si_int __mulvsi3(si_int a, si_int b); // a * b
di_int __mulvdi3(di_int a, di_int b); // a * b
ti_int __mulvti3(ti_int a, ti_int b); // a * b


// Integral arithmetic which returns if overflow

si_int __mulosi4(si_int a, si_int b, int* overflow); // a * b, overflow set to one if result not in signed range
di_int __mulodi4(di_int a, di_int b, int* overflow); // a * b, overflow set to one if result not in signed range
ti_int __muloti4(ti_int a, ti_int b, int* overflow); // a * b, overflow set to
one if result not in signed range


// Integral comparison: a < b -> 0
// a == b -> 1
// a > b -> 2

si_int __cmpdi2 (di_int a, di_int b);
si_int __cmpti2 (ti_int a, ti_int b);
si_int __ucmpdi2(du_int a, du_int b);
si_int __ucmpti2(tu_int a, tu_int b);

// Integral / floating point conversion

di_int __fixsfdi( float a);
di_int __fixdfdi( double a);
di_int __fixxfdi(long double a);
di_int __fixtfdi( tf_float a);

ti_int __fixsfti( float a);
ti_int __fixdfti( double a);
ti_int __fixxfti(long double a);
ti_int __fixtfti( tf_float a);

su_int __fixunssfsi( float a);
su_int __fixunsdfsi( double a);
su_int __fixunsxfsi(long double a);
su_int __fixunstfsi( tf_float a);

du_int __fixunssfdi( float a);
du_int __fixunsdfdi( double a);
du_int __fixunsxfdi(long double a);
du_int __fixunstfdi( tf_float a);

tu_int __fixunssfti( float a);
tu_int __fixunsdfti( double a);
tu_int __fixunsxfti(long double a);
tu_int __fixunstfti( tf_float a);

float __floatdisf(di_int a);
double __floatdidf(di_int a);
long double __floatdixf(di_int a);
tf_float __floatditf(int64_t a);

float __floattisf(ti_int a);
double __floattidf(ti_int a);
long double __floattixf(ti_int a);
tf_float __floattitf(ti_int a);

float __floatundisf(du_int a);
double __floatundidf(du_int a);
long double __floatundixf(du_int a);
tf_float __floatunditf(du_int a);

float __floatuntisf(tu_int a);
double __floatuntidf(tu_int a);
long double __floatuntixf(tu_int a);
tf_float __floatuntixf(tu_int a);

// Floating point raised to integer power

float __powisf2( float a, int b); // a ^ b
double __powidf2( double a, int b); // a ^ b
long double __powixf2(long double a, int b); // a ^ b
tf_float __powitf2( tf_float a, int b); // a ^ b

// Complex arithmetic

// (a + ib) * (c + id)

float _Complex __mulsc3( float a, float b, float c, float d);
double _Complex __muldc3(double a, double b, double c, double d);
long double _Complex __mulxc3(long double a, long double b,
long double c, long double d);
tf_float _Complex __multc3(tf_float a, tf_float b, tf_float c, tf_float d);

// (a + ib) / (c + id)

float _Complex __divsc3( float a, float b, float c, float d);
double _Complex __divdc3(double a, double b, double c, double d);
long double _Complex __divxc3(long double a, long double b,
long double c, long double d);
tf_float _Complex __divtc3(tf_float a, tf_float b, tf_float c, tf_float d);


// Runtime support

// __clear_cache() is used to tell process that new instructions have been
// written to an address range. Necessary on processors that do not have
// a unified instruction and data cache.
void __clear_cache(void* start, void* end);

// __enable_execute_stack() is used with nested functions when a trampoline
// function is written onto the stack and that page range needs to be made
// executable.
void __enable_execute_stack(void* addr);

// __gcc_personality_v0() is normally only called by the system unwinder.
// C code (as opposed to C++) normally does not need a personality function
// because there are no catch clauses or destructors to be run. But there
// is a C language extension __attribute__((cleanup(func))) which marks local
// variables as needing the cleanup function "func" to be run when the
// variable goes out of scope. That includes when an exception is thrown,
// so a personality handler is needed.
_Unwind_Reason_Code __gcc_personality_v0(int version, _Unwind_Action actions,
uint64_t exceptionClass, struct _Unwind_Exception* exceptionObject,
_Unwind_Context_t context);

// for use with some implementations of assert() in
void __eprintf(const char* format, const char* assertion_expression,
const char* line, const char* file);

// for systems with emulated thread local storage
void* __emutls_get_address(struct __emutls_control*);


// Power PC specific functions

// There is no C interface to the saveFP/restFP functions. They are helper
// functions called by the prolog and epilog of functions that need to save
// a number of non-volatile float point registers.
saveFP
restFP

// PowerPC has a standard template for trampoline functions. This function
// generates a custom trampoline function with the specific realFunc
// and localsPtr values.
void __trampoline_setup(uint32_t* trampOnStack, int trampSizeAllocated,
const void* realFunc, void* localsPtr);

// adds two 128-bit double-double precision values ( x + y )
long double __gcc_qadd(long double x, long double y);

// subtracts two 128-bit double-double precision values ( x - y )
long double __gcc_qsub(long double x, long double y);

// multiples two 128-bit double-double precision values ( x * y )
long double __gcc_qmul(long double x, long double y);

// divides two 128-bit double-double precision values ( x / y )
long double __gcc_qdiv(long double a, long double b);


// ARM specific functions

// There is no C interface to the switch* functions. These helper functions
// are only needed by Thumb1 code for efficient switch table generation.
switch16
switch32
switch8
switchu8

// This function generates a custom trampoline function with the specific
// realFunc and localsPtr values.
void __trampoline_setup(uint32_t* trampOnStack, int trampSizeAllocated,
const void* realFunc, void* localsPtr);

// There is no C interface to the *_vfp_d8_d15_regs functions. There are
// called in the prolog and epilog of Thumb1 functions. When the C++ ABI use
// SJLJ for exceptions, each function with a catch clause or destructors needs
// to save and restore all registers in it prolog and epilog. But there is
// no way to access vector and high float registers from thumb1 code, so the
// compiler must add call outs to these helper functions in the prolog and
// epilog.
restore_vfp_d8_d15_regs
save_vfp_d8_d15_regs


// Note: long ago ARM processors did not have floating point hardware support.
// Floating point was done in software and floating point parameters were
// passed in integer registers. When hardware support was added for floating
// point, new *vfp functions were added to do the same operations but with
// floating point parameters in floating point registers.

// Undocumented functions

float __addsf3vfp(float a, float b); // Appears to return a + b
double __adddf3vfp(double a, double b); // Appears to return a + b
float __divsf3vfp(float a, float b); // Appears to return a / b
double __divdf3vfp(double a, double b); // Appears to return a / b
int __eqsf2vfp(float a, float b); // Appears to return one
// iff a == b and neither is NaN.
int __eqdf2vfp(double a, double b); // Appears to return one
// iff a == b and neither is NaN.
double __extendsfdf2vfp(float a); // Appears to convert from
// float to double.
int __fixdfsivfp(double a); // Appears to convert from
// double to int.
int __fixsfsivfp(float a); // Appears to convert from
// float to int.
unsigned int __fixunssfsivfp(float a); // Appears to convert from
// float to unsigned int.
unsigned int __fixunsdfsivfp(double a); // Appears to convert from
// double to unsigned int.
double __floatsidfvfp(int a); // Appears to convert from
// int to double.
float __floatsisfvfp(int a); // Appears to convert from
// int to float.
double __floatunssidfvfp(unsigned int a); // Appears to convert from
// unsigned int to double.
float __floatunssisfvfp(unsigned int a); // Appears to convert from
// unsigned int to float.
int __gedf2vfp(double a, double b); // Appears to return __gedf2
// (a >= b)
int __gesf2vfp(float a, float b); // Appears to return __gesf2
// (a >= b)
int __gtdf2vfp(double a, double b); // Appears to return __gtdf2
// (a > b)
int __gtsf2vfp(float a, float b); // Appears to return __gtsf2
// (a > b)
int __ledf2vfp(double a, double b); // Appears to return __ledf2
// (a <= b)
int __lesf2vfp(float a, float b); // Appears to return __lesf2
// (a <= b)
int __ltdf2vfp(double a, double b); // Appears to return __ltdf2
// (a < b)
int __ltsf2vfp(float a, float b); // Appears to return __ltsf2
// (a < b)
double __muldf3vfp(double a, double b); // Appears to return a * b
float __mulsf3vfp(float a, float b); // Appears to return a * b
int __nedf2vfp(double a, double b); // Appears to return __nedf2
// (a != b)
double __negdf2vfp(double a); // Appears to return -a
float __negsf2vfp(float a); // Appears to return -a
float __negsf2vfp(float a); // Appears to return -a
double __subdf3vfp(double a, double b); // Appears to return a - b
float __subsf3vfp(float a, float b); // Appears to return a - b
float __truncdfsf2vfp(double a); // Appears to convert from
// double to float.
int __unorddf2vfp(double a, double b); // Appears to return __unorddf2
int __unordsf2vfp(float a, float b); // Appears to return __unordsf2


Preconditions are listed for each function at the definition when there are any.
Any preconditions reflect the specification at
http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc.

Assumptions are listed in "int_lib.h", and in individual files. Where possible
assumptions are checked at compile time.