Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
arm/ | 22-Nov-2023 | - | 3,197 | 1,381 | ||
armv6m/ | 22-Nov-2023 | - | 21 | 8 | ||
i386/ | 22-Nov-2023 | - | 1,102 | 695 | ||
ppc/ | 22-Nov-2023 | - | 853 | 519 | ||
x86_64/ | 22-Nov-2023 | - | 240 | 112 | ||
CMakeLists.txt | D | 22-Nov-2023 | 4.5 KiB | 263 | 255 | |
Makefile.mk | D | 22-Nov-2023 | 711 | 23 | 7 | |
README.txt | D | 22-Nov-2023 | 14.5 KiB | 344 | 266 | |
absvdi2.c | D | 22-Nov-2023 | 816 | 30 | 10 | |
absvsi2.c | D | 22-Nov-2023 | 811 | 30 | 10 | |
absvti2.c | D | 22-Nov-2023 | 872 | 35 | 12 | |
adddf3.c | D | 22-Nov-2023 | 740 | 23 | 6 | |
addsf3.c | D | 22-Nov-2023 | 738 | 23 | 6 | |
addtf3.c | D | 22-Nov-2023 | 804 | 26 | 8 | |
addvdi3.c | D | 22-Nov-2023 | 839 | 37 | 17 | |
addvsi3.c | D | 22-Nov-2023 | 838 | 37 | 17 | |
addvti3.c | D | 22-Nov-2023 | 891 | 41 | 19 | |
apple_versioning.c | D | 22-Nov-2023 | 12.9 KiB | 351 | 310 | |
ashldi3.c | D | 22-Nov-2023 | 1.2 KiB | 44 | 23 | |
ashlti3.c | D | 22-Nov-2023 | 1.2 KiB | 46 | 24 | |
ashrdi3.c | D | 22-Nov-2023 | 1.3 KiB | 45 | 23 | |
ashrti3.c | D | 22-Nov-2023 | 1.3 KiB | 47 | 24 | |
assembly.h | D | 22-Nov-2023 | 5 KiB | 147 | 113 | |
atomic.c | D | 22-Nov-2023 | 11.1 KiB | 338 | 238 | |
clear_cache.c | D | 22-Nov-2023 | 3 KiB | 99 | 61 | |
clzdi2.c | D | 22-Nov-2023 | 826 | 30 | 10 | |
clzsi2.c | D | 22-Nov-2023 | 1.5 KiB | 54 | 19 | |
clzti2.c | D | 22-Nov-2023 | 887 | 34 | 12 | |
cmpdi2.c | D | 22-Nov-2023 | 1.1 KiB | 52 | 25 | |
cmpti2.c | D | 22-Nov-2023 | 1,003 | 43 | 20 | |
comparedf2.c | D | 22-Nov-2023 | 4 KiB | 142 | 74 | |
comparesf2.c | D | 22-Nov-2023 | 4 KiB | 141 | 74 | |
comparetf2.c | D | 22-Nov-2023 | 4 KiB | 134 | 68 | |
ctzdi2.c | D | 22-Nov-2023 | 836 | 30 | 10 | |
ctzsi2.c | D | 22-Nov-2023 | 1.7 KiB | 58 | 20 | |
ctzti2.c | D | 22-Nov-2023 | 897 | 34 | 12 | |
divdc3.c | D | 22-Nov-2023 | 2.2 KiB | 61 | 43 | |
divdf3.c | D | 22-Nov-2023 | 7.5 KiB | 186 | 75 | |
divdi3.c | D | 22-Nov-2023 | 1.1 KiB | 30 | 12 | |
divmoddi4.c | D | 22-Nov-2023 | 700 | 26 | 8 | |
divmodsi4.c | D | 22-Nov-2023 | 703 | 28 | 8 | |
divsc3.c | D | 22-Nov-2023 | 2.2 KiB | 61 | 43 | |
divsf3.c | D | 22-Nov-2023 | 6.9 KiB | 170 | 66 | |
divsi3.c | D | 22-Nov-2023 | 1.4 KiB | 38 | 13 | |
divtf3.c | D | 22-Nov-2023 | 8 KiB | 204 | 87 | |
divti3.c | D | 22-Nov-2023 | 1.2 KiB | 34 | 14 | |
divxc3.c | D | 22-Nov-2023 | 2.2 KiB | 64 | 45 | |
enable_execute_stack.c | D | 22-Nov-2023 | 1.7 KiB | 59 | 28 | |
eprintf.c | D | 22-Nov-2023 | 942 | 36 | 13 | |
extenddftf2.c | D | 22-Nov-2023 | 622 | 24 | 10 | |
extendsfdf2.c | D | 22-Nov-2023 | 546 | 20 | 7 | |
extendsftf2.c | D | 22-Nov-2023 | 621 | 24 | 10 | |
ffsdi2.c | D | 22-Nov-2023 | 939 | 34 | 14 | |
ffsti2.c | D | 22-Nov-2023 | 995 | 38 | 16 | |
fixdfdi.c | D | 22-Nov-2023 | 1.3 KiB | 46 | 20 | |
fixdfsi.c | D | 22-Nov-2023 | 1.8 KiB | 51 | 21 | |
fixdfti.c | D | 22-Nov-2023 | 1.3 KiB | 46 | 19 | |
fixsfdi.c | D | 22-Nov-2023 | 1.2 KiB | 44 | 18 | |
fixsfsi.c | D | 22-Nov-2023 | 1.7 KiB | 48 | 20 | |
fixsfti.c | D | 22-Nov-2023 | 1.2 KiB | 46 | 19 | |
fixunsdfdi.c | D | 22-Nov-2023 | 1.4 KiB | 48 | 19 | |
fixunsdfsi.c | D | 22-Nov-2023 | 1.4 KiB | 45 | 16 | |
fixunsdfti.c | D | 22-Nov-2023 | 1.4 KiB | 48 | 18 | |
fixunssfdi.c | D | 22-Nov-2023 | 1.3 KiB | 45 | 17 | |
fixunssfsi.c | D | 22-Nov-2023 | 1.3 KiB | 46 | 17 | |
fixunssfti.c | D | 22-Nov-2023 | 1.3 KiB | 48 | 18 | |
fixunsxfdi.c | D | 22-Nov-2023 | 1.3 KiB | 45 | 13 | |
fixunsxfsi.c | D | 22-Nov-2023 | 1.4 KiB | 45 | 13 | |
fixunsxfti.c | D | 22-Nov-2023 | 1.4 KiB | 50 | 18 | |
fixxfdi.c | D | 22-Nov-2023 | 1.3 KiB | 45 | 16 | |
fixxfti.c | D | 22-Nov-2023 | 1.4 KiB | 48 | 19 | |
floatdidf.c | D | 22-Nov-2023 | 3.3 KiB | 108 | 59 | |
floatdisf.c | D | 22-Nov-2023 | 2.5 KiB | 81 | 44 | |
floatdixf.c | D | 22-Nov-2023 | 1.4 KiB | 47 | 19 | |
floatsidf.c | D | 22-Nov-2023 | 1.6 KiB | 54 | 21 | |
floatsisf.c | D | 22-Nov-2023 | 1.8 KiB | 60 | 29 | |
floattidf.c | D | 22-Nov-2023 | 2.7 KiB | 84 | 46 | |
floattisf.c | D | 22-Nov-2023 | 2.5 KiB | 83 | 45 | |
floattixf.c | D | 22-Nov-2023 | 2.8 KiB | 85 | 45 | |
floatundidf.c | D | 22-Nov-2023 | 3.3 KiB | 107 | 58 | |
floatundisf.c | D | 22-Nov-2023 | 2.4 KiB | 78 | 41 | |
floatundixf.c | D | 22-Nov-2023 | 1.3 KiB | 43 | 16 | |
floatunsidf.c | D | 22-Nov-2023 | 1.3 KiB | 43 | 15 | |
floatunsisf.c | D | 22-Nov-2023 | 1.6 KiB | 51 | 23 | |
floatuntidf.c | D | 22-Nov-2023 | 2.6 KiB | 81 | 43 | |
floatuntisf.c | D | 22-Nov-2023 | 2.4 KiB | 80 | 42 | |
floatuntixf.c | D | 22-Nov-2023 | 2.6 KiB | 82 | 42 | |
fp_add_impl.inc | D | 22-Nov-2023 | 5.3 KiB | 145 | 123 | |
fp_extend.h | D | 22-Nov-2023 | 2.1 KiB | 77 | 49 | |
fp_extend_impl.inc | D | 22-Nov-2023 | 4.5 KiB | 107 | 95 | |
fp_lib.h | D | 22-Nov-2023 | 8.9 KiB | 271 | 206 | |
fp_mul_impl.inc | D | 22-Nov-2023 | 4.7 KiB | 117 | 97 | |
fp_trunc.h | D | 22-Nov-2023 | 1.7 KiB | 65 | 38 | |
fp_trunc_impl.inc | D | 22-Nov-2023 | 5.8 KiB | 136 | 123 | |
gcc_personality_v0.c | D | 22-Nov-2023 | 7.9 KiB | 250 | 175 | |
int_endianness.h | D | 22-Nov-2023 | 2.6 KiB | 112 | 66 | |
int_lib.h | D | 22-Nov-2023 | 2.4 KiB | 77 | 35 | |
int_math.h | D | 22-Nov-2023 | 2.2 KiB | 68 | 33 | |
int_types.h | D | 22-Nov-2023 | 2.4 KiB | 144 | 108 | |
int_util.c | D | 22-Nov-2023 | 1.8 KiB | 62 | 30 | |
int_util.h | D | 22-Nov-2023 | 1.1 KiB | 30 | 7 | |
lshrdi3.c | D | 22-Nov-2023 | 1.2 KiB | 44 | 23 | |
lshrti3.c | D | 22-Nov-2023 | 1.2 KiB | 46 | 24 | |
moddi3.c | D | 22-Nov-2023 | 1 KiB | 31 | 13 | |
modsi3.c | D | 22-Nov-2023 | 642 | 24 | 6 | |
modti3.c | D | 22-Nov-2023 | 1.1 KiB | 35 | 15 | |
muldc3.c | D | 22-Nov-2023 | 2.3 KiB | 74 | 56 | |
muldf3.c | D | 22-Nov-2023 | 741 | 23 | 6 | |
muldi3.c | D | 22-Nov-2023 | 1.5 KiB | 57 | 35 | |
mulodi4.c | D | 22-Nov-2023 | 1.4 KiB | 59 | 39 | |
mulosi4.c | D | 22-Nov-2023 | 1.4 KiB | 59 | 39 | |
muloti4.c | D | 22-Nov-2023 | 1.4 KiB | 63 | 41 | |
mulsc3.c | D | 22-Nov-2023 | 2.3 KiB | 74 | 56 | |
mulsf3.c | D | 22-Nov-2023 | 741 | 23 | 6 | |
multf3.c | D | 22-Nov-2023 | 790 | 26 | 8 | |
multi3.c | D | 22-Nov-2023 | 1.6 KiB | 59 | 36 | |
mulvdi3.c | D | 22-Nov-2023 | 1.4 KiB | 57 | 37 | |
mulvsi3.c | D | 22-Nov-2023 | 1.4 KiB | 57 | 37 | |
mulvti3.c | D | 22-Nov-2023 | 1.4 KiB | 61 | 39 | |
mulxc3.c | D | 22-Nov-2023 | 2.4 KiB | 78 | 58 | |
negdf2.c | D | 22-Nov-2023 | 666 | 23 | 7 | |
negdi2.c | D | 22-Nov-2023 | 724 | 27 | 6 | |
negsf2.c | D | 22-Nov-2023 | 666 | 23 | 7 | |
negti2.c | D | 22-Nov-2023 | 769 | 31 | 8 | |
negvdi2.c | D | 22-Nov-2023 | 770 | 29 | 9 | |
negvsi2.c | D | 22-Nov-2023 | 770 | 29 | 9 | |
negvti2.c | D | 22-Nov-2023 | 818 | 33 | 11 | |
paritydi2.c | D | 22-Nov-2023 | 712 | 26 | 8 | |
paritysi2.c | D | 22-Nov-2023 | 755 | 28 | 10 | |
parityti2.c | D | 22-Nov-2023 | 765 | 30 | 10 | |
popcountdi2.c | D | 22-Nov-2023 | 1.4 KiB | 37 | 12 | |
popcountsi2.c | D | 22-Nov-2023 | 1.2 KiB | 34 | 11 | |
popcountti2.c | D | 22-Nov-2023 | 1.8 KiB | 45 | 18 | |
powidf2.c | D | 22-Nov-2023 | 820 | 35 | 17 | |
powisf2.c | D | 22-Nov-2023 | 815 | 35 | 17 | |
powitf2.c | D | 22-Nov-2023 | 858 | 39 | 19 | |
powixf2.c | D | 22-Nov-2023 | 859 | 39 | 19 | |
subdf3.c | D | 22-Nov-2023 | 835 | 27 | 7 | |
subsf3.c | D | 22-Nov-2023 | 835 | 27 | 7 | |
subtf3.c | D | 22-Nov-2023 | 879 | 28 | 9 | |
subvdi3.c | D | 22-Nov-2023 | 834 | 37 | 17 | |
subvsi3.c | D | 22-Nov-2023 | 834 | 37 | 17 | |
subvti3.c | D | 22-Nov-2023 | 884 | 41 | 19 | |
trampoline_setup.c | D | 22-Nov-2023 | 1.8 KiB | 49 | 22 | |
truncdfsf2.c | D | 22-Nov-2023 | 539 | 19 | 7 | |
trunctfdf2.c | D | 22-Nov-2023 | 616 | 23 | 10 | |
trunctfsf2.c | D | 22-Nov-2023 | 615 | 23 | 10 | |
ucmpdi2.c | D | 22-Nov-2023 | 1.2 KiB | 52 | 25 | |
ucmpti2.c | D | 22-Nov-2023 | 1,007 | 43 | 20 | |
udivdi3.c | D | 22-Nov-2023 | 642 | 24 | 6 | |
udivmoddi4.c | D | 22-Nov-2023 | 6.5 KiB | 232 | 146 | |
udivmodsi4.c | D | 22-Nov-2023 | 705 | 28 | 8 | |
udivmodti4.c | D | 22-Nov-2023 | 6.7 KiB | 239 | 149 | |
udivsi3.c | D | 22-Nov-2023 | 1.8 KiB | 67 | 33 | |
udivti3.c | D | 22-Nov-2023 | 695 | 28 | 8 | |
umoddi3.c | D | 22-Nov-2023 | 664 | 26 | 8 | |
umodsi3.c | D | 22-Nov-2023 | 645 | 24 | 6 | |
umodti3.c | D | 22-Nov-2023 | 717 | 30 | 10 |
README.txt
1Compiler-RT 2================================ 3 4This directory and its subdirectories contain source code for the compiler 5support routines. 6 7Compiler-RT is open source software. You may freely distribute it under the 8terms of the license agreement found in LICENSE.txt. 9 10================================ 11 12This is a replacement library for libgcc. Each function is contained 13in its own file. Each function has a corresponding unit test under 14test/Unit. 15 16A rudimentary script to test each file is in the file called 17test/Unit/test. 18 19Here is the specification for this library: 20 21http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc 22 23Here is a synopsis of the contents of this library: 24 25typedef int si_int; 26typedef unsigned su_int; 27 28typedef long long di_int; 29typedef unsigned long long du_int; 30 31// Integral bit manipulation 32 33di_int __ashldi3(di_int a, si_int b); // a << b 34ti_int __ashlti3(ti_int a, si_int b); // a << b 35 36di_int __ashrdi3(di_int a, si_int b); // a >> b arithmetic (sign fill) 37ti_int __ashrti3(ti_int a, si_int b); // a >> b arithmetic (sign fill) 38di_int __lshrdi3(di_int a, si_int b); // a >> b logical (zero fill) 39ti_int __lshrti3(ti_int a, si_int b); // a >> b logical (zero fill) 40 41si_int __clzsi2(si_int a); // count leading zeros 42si_int __clzdi2(di_int a); // count leading zeros 43si_int __clzti2(ti_int a); // count leading zeros 44si_int __ctzsi2(si_int a); // count trailing zeros 45si_int __ctzdi2(di_int a); // count trailing zeros 46si_int __ctzti2(ti_int a); // count trailing zeros 47 48si_int __ffsdi2(di_int a); // find least significant 1 bit 49si_int __ffsti2(ti_int a); // find least significant 1 bit 50 51si_int __paritysi2(si_int a); // bit parity 52si_int __paritydi2(di_int a); // bit parity 53si_int __parityti2(ti_int a); // bit parity 54 55si_int __popcountsi2(si_int a); // bit population 56si_int __popcountdi2(di_int a); // bit population 57si_int __popcountti2(ti_int a); // bit population 58 59uint32_t __bswapsi2(uint32_t a); // a byteswapped, arm only 60uint64_t __bswapdi2(uint64_t a); // a byteswapped, arm only 61 62// Integral arithmetic 63 64di_int __negdi2 (di_int a); // -a 65ti_int __negti2 (ti_int a); // -a 66di_int __muldi3 (di_int a, di_int b); // a * b 67ti_int __multi3 (ti_int a, ti_int b); // a * b 68si_int __divsi3 (si_int a, si_int b); // a / b signed 69di_int __divdi3 (di_int a, di_int b); // a / b signed 70ti_int __divti3 (ti_int a, ti_int b); // a / b signed 71su_int __udivsi3 (su_int n, su_int d); // a / b unsigned 72du_int __udivdi3 (du_int a, du_int b); // a / b unsigned 73tu_int __udivti3 (tu_int a, tu_int b); // a / b unsigned 74si_int __modsi3 (si_int a, si_int b); // a % b signed 75di_int __moddi3 (di_int a, di_int b); // a % b signed 76ti_int __modti3 (ti_int a, ti_int b); // a % b signed 77su_int __umodsi3 (su_int a, su_int b); // a % b unsigned 78du_int __umoddi3 (du_int a, du_int b); // a % b unsigned 79tu_int __umodti3 (tu_int a, tu_int b); // a % b unsigned 80du_int __udivmoddi4(du_int a, du_int b, du_int* rem); // a / b, *rem = a % b unsigned 81tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); // a / b, *rem = a % b unsigned 82su_int __udivmodsi4(su_int a, su_int b, su_int* rem); // a / b, *rem = a % b unsigned 83si_int __divmodsi4(si_int a, si_int b, si_int* rem); // a / b, *rem = a % b signed 84 85 86 87// Integral arithmetic with trapping overflow 88 89si_int __absvsi2(si_int a); // abs(a) 90di_int __absvdi2(di_int a); // abs(a) 91ti_int __absvti2(ti_int a); // abs(a) 92 93si_int __negvsi2(si_int a); // -a 94di_int __negvdi2(di_int a); // -a 95ti_int __negvti2(ti_int a); // -a 96 97si_int __addvsi3(si_int a, si_int b); // a + b 98di_int __addvdi3(di_int a, di_int b); // a + b 99ti_int __addvti3(ti_int a, ti_int b); // a + b 100 101si_int __subvsi3(si_int a, si_int b); // a - b 102di_int __subvdi3(di_int a, di_int b); // a - b 103ti_int __subvti3(ti_int a, ti_int b); // a - b 104 105si_int __mulvsi3(si_int a, si_int b); // a * b 106di_int __mulvdi3(di_int a, di_int b); // a * b 107ti_int __mulvti3(ti_int a, ti_int b); // a * b 108 109 110// Integral arithmetic which returns if overflow 111 112si_int __mulosi4(si_int a, si_int b, int* overflow); // a * b, overflow set to one if result not in signed range 113di_int __mulodi4(di_int a, di_int b, int* overflow); // a * b, overflow set to one if result not in signed range 114ti_int __muloti4(ti_int a, ti_int b, int* overflow); // a * b, overflow set to 115 one if result not in signed range 116 117 118// Integral comparison: a < b -> 0 119// a == b -> 1 120// a > b -> 2 121 122si_int __cmpdi2 (di_int a, di_int b); 123si_int __cmpti2 (ti_int a, ti_int b); 124si_int __ucmpdi2(du_int a, du_int b); 125si_int __ucmpti2(tu_int a, tu_int b); 126 127// Integral / floating point conversion 128 129di_int __fixsfdi( float a); 130di_int __fixdfdi( double a); 131di_int __fixxfdi(long double a); 132 133ti_int __fixsfti( float a); 134ti_int __fixdfti( double a); 135ti_int __fixxfti(long double a); 136uint64_t __fixtfdi(long double input); // ppc only, doesn't match documentation 137 138su_int __fixunssfsi( float a); 139su_int __fixunsdfsi( double a); 140su_int __fixunsxfsi(long double a); 141 142du_int __fixunssfdi( float a); 143du_int __fixunsdfdi( double a); 144du_int __fixunsxfdi(long double a); 145 146tu_int __fixunssfti( float a); 147tu_int __fixunsdfti( double a); 148tu_int __fixunsxfti(long double a); 149uint64_t __fixunstfdi(long double input); // ppc only 150 151float __floatdisf(di_int a); 152double __floatdidf(di_int a); 153long double __floatdixf(di_int a); 154long double __floatditf(int64_t a); // ppc only 155 156float __floattisf(ti_int a); 157double __floattidf(ti_int a); 158long double __floattixf(ti_int a); 159 160float __floatundisf(du_int a); 161double __floatundidf(du_int a); 162long double __floatundixf(du_int a); 163long double __floatunditf(uint64_t a); // ppc only 164 165float __floatuntisf(tu_int a); 166double __floatuntidf(tu_int a); 167long double __floatuntixf(tu_int a); 168 169// Floating point raised to integer power 170 171float __powisf2( float a, si_int b); // a ^ b 172double __powidf2( double a, si_int b); // a ^ b 173long double __powixf2(long double a, si_int b); // a ^ b 174long double __powitf2(long double a, si_int b); // ppc only, a ^ b 175 176// Complex arithmetic 177 178// (a + ib) * (c + id) 179 180 float _Complex __mulsc3( float a, float b, float c, float d); 181 double _Complex __muldc3(double a, double b, double c, double d); 182long double _Complex __mulxc3(long double a, long double b, 183 long double c, long double d); 184long double _Complex __multc3(long double a, long double b, 185 long double c, long double d); // ppc only 186 187// (a + ib) / (c + id) 188 189 float _Complex __divsc3( float a, float b, float c, float d); 190 double _Complex __divdc3(double a, double b, double c, double d); 191long double _Complex __divxc3(long double a, long double b, 192 long double c, long double d); 193long double _Complex __divtc3(long double a, long double b, 194 long double c, long double d); // ppc only 195 196 197// Runtime support 198 199// __clear_cache() is used to tell process that new instructions have been 200// written to an address range. Necessary on processors that do not have 201// a unified instruction and data cache. 202void __clear_cache(void* start, void* end); 203 204// __enable_execute_stack() is used with nested functions when a trampoline 205// function is written onto the stack and that page range needs to be made 206// executable. 207void __enable_execute_stack(void* addr); 208 209// __gcc_personality_v0() is normally only called by the system unwinder. 210// C code (as opposed to C++) normally does not need a personality function 211// because there are no catch clauses or destructors to be run. But there 212// is a C language extension __attribute__((cleanup(func))) which marks local 213// variables as needing the cleanup function "func" to be run when the 214// variable goes out of scope. That includes when an exception is thrown, 215// so a personality handler is needed. 216_Unwind_Reason_Code __gcc_personality_v0(int version, _Unwind_Action actions, 217 uint64_t exceptionClass, struct _Unwind_Exception* exceptionObject, 218 _Unwind_Context_t context); 219 220// for use with some implementations of assert() in <assert.h> 221void __eprintf(const char* format, const char* assertion_expression, 222 const char* line, const char* file); 223 224 225 226// Power PC specific functions 227 228// There is no C interface to the saveFP/restFP functions. They are helper 229// functions called by the prolog and epilog of functions that need to save 230// a number of non-volatile float point registers. 231saveFP 232restFP 233 234// PowerPC has a standard template for trampoline functions. This function 235// generates a custom trampoline function with the specific realFunc 236// and localsPtr values. 237void __trampoline_setup(uint32_t* trampOnStack, int trampSizeAllocated, 238 const void* realFunc, void* localsPtr); 239 240// adds two 128-bit double-double precision values ( x + y ) 241long double __gcc_qadd(long double x, long double y); 242 243// subtracts two 128-bit double-double precision values ( x - y ) 244long double __gcc_qsub(long double x, long double y); 245 246// multiples two 128-bit double-double precision values ( x * y ) 247long double __gcc_qmul(long double x, long double y); 248 249// divides two 128-bit double-double precision values ( x / y ) 250long double __gcc_qdiv(long double a, long double b); 251 252 253// ARM specific functions 254 255// There is no C interface to the switch* functions. These helper functions 256// are only needed by Thumb1 code for efficient switch table generation. 257switch16 258switch32 259switch8 260switchu8 261 262// There is no C interface to the *_vfp_d8_d15_regs functions. There are 263// called in the prolog and epilog of Thumb1 functions. When the C++ ABI use 264// SJLJ for exceptions, each function with a catch clause or destuctors needs 265// to save and restore all registers in it prolog and epliog. But there is 266// no way to access vector and high float registers from thumb1 code, so the 267// compiler must add call outs to these helper functions in the prolog and 268// epilog. 269restore_vfp_d8_d15_regs 270save_vfp_d8_d15_regs 271 272 273// Note: long ago ARM processors did not have floating point hardware support. 274// Floating point was done in software and floating point parameters were 275// passed in integer registers. When hardware support was added for floating 276// point, new *vfp functions were added to do the same operations but with 277// floating point parameters in floating point registers. 278 279// Undocumented functions 280 281float __addsf3vfp(float a, float b); // Appears to return a + b 282double __adddf3vfp(double a, double b); // Appears to return a + b 283float __divsf3vfp(float a, float b); // Appears to return a / b 284double __divdf3vfp(double a, double b); // Appears to return a / b 285int __eqsf2vfp(float a, float b); // Appears to return one 286 // iff a == b and neither is NaN. 287int __eqdf2vfp(double a, double b); // Appears to return one 288 // iff a == b and neither is NaN. 289double __extendsfdf2vfp(float a); // Appears to convert from 290 // float to double. 291int __fixdfsivfp(double a); // Appears to convert from 292 // double to int. 293int __fixsfsivfp(float a); // Appears to convert from 294 // float to int. 295unsigned int __fixunssfsivfp(float a); // Appears to convert from 296 // float to unsigned int. 297unsigned int __fixunsdfsivfp(double a); // Appears to convert from 298 // double to unsigned int. 299double __floatsidfvfp(int a); // Appears to convert from 300 // int to double. 301float __floatsisfvfp(int a); // Appears to convert from 302 // int to float. 303double __floatunssidfvfp(unsigned int a); // Appears to convert from 304 // unisgned int to double. 305float __floatunssisfvfp(unsigned int a); // Appears to convert from 306 // unisgned int to float. 307int __gedf2vfp(double a, double b); // Appears to return __gedf2 308 // (a >= b) 309int __gesf2vfp(float a, float b); // Appears to return __gesf2 310 // (a >= b) 311int __gtdf2vfp(double a, double b); // Appears to return __gtdf2 312 // (a > b) 313int __gtsf2vfp(float a, float b); // Appears to return __gtsf2 314 // (a > b) 315int __ledf2vfp(double a, double b); // Appears to return __ledf2 316 // (a <= b) 317int __lesf2vfp(float a, float b); // Appears to return __lesf2 318 // (a <= b) 319int __ltdf2vfp(double a, double b); // Appears to return __ltdf2 320 // (a < b) 321int __ltsf2vfp(float a, float b); // Appears to return __ltsf2 322 // (a < b) 323double __muldf3vfp(double a, double b); // Appears to return a * b 324float __mulsf3vfp(float a, float b); // Appears to return a * b 325int __nedf2vfp(double a, double b); // Appears to return __nedf2 326 // (a != b) 327double __negdf2vfp(double a); // Appears to return -a 328float __negsf2vfp(float a); // Appears to return -a 329float __negsf2vfp(float a); // Appears to return -a 330double __subdf3vfp(double a, double b); // Appears to return a - b 331float __subsf3vfp(float a, float b); // Appears to return a - b 332float __truncdfsf2vfp(double a); // Appears to convert from 333 // double to float. 334int __unorddf2vfp(double a, double b); // Appears to return __unorddf2 335int __unordsf2vfp(float a, float b); // Appears to return __unordsf2 336 337 338Preconditions are listed for each function at the definition when there are any. 339Any preconditions reflect the specification at 340http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc. 341 342Assumptions are listed in "int_lib.h", and in individual files. Where possible 343assumptions are checked at compile time. 344