/external/compiler-rt/lib/builtins/ |
D | muloti4.c | 23 COMPILER_RT_ABI ti_int 24 __muloti4(ti_int a, ti_int b, int* overflow) in __muloti4() 26 const int N = (int)(sizeof(ti_int) * CHAR_BIT); in __muloti4() 27 const ti_int MIN = (ti_int)1 << (N-1); in __muloti4() 28 const ti_int MAX = ~MIN; in __muloti4() 30 ti_int result = a * b; in __muloti4() 43 ti_int sa = a >> (N - 1); in __muloti4() 44 ti_int abs_a = (a ^ sa) - sa; in __muloti4() 45 ti_int sb = b >> (N - 1); in __muloti4() 46 ti_int abs_b = (b ^ sb) - sb; in __muloti4()
|
D | mulvti3.c | 23 COMPILER_RT_ABI ti_int 24 __mulvti3(ti_int a, ti_int b) in __mulvti3() 26 const int N = (int)(sizeof(ti_int) * CHAR_BIT); in __mulvti3() 27 const ti_int MIN = (ti_int)1 << (N-1); in __mulvti3() 28 const ti_int MAX = ~MIN; in __mulvti3() 41 ti_int sa = a >> (N - 1); in __mulvti3() 42 ti_int abs_a = (a ^ sa) - sa; in __mulvti3() 43 ti_int sb = b >> (N - 1); in __mulvti3() 44 ti_int abs_b = (b ^ sb) - sb; in __mulvti3()
|
D | fixxfti.c | 30 COMPILER_RT_ABI ti_int 33 const ti_int ti_max = (ti_int)((~(tu_int)0) / 2); in __fixxfti() 34 const ti_int ti_min = -ti_max - 1; in __fixxfti() 40 ti_int s = -(si_int)((fb.u.high.s.low & 0x00008000) >> 15); in __fixxfti() 41 ti_int r = fb.u.low.all; in __fixxfti() 42 if ((unsigned)e >= sizeof(ti_int) * CHAR_BIT) in __fixxfti()
|
D | README.txt | 34 ti_int __ashlti3(ti_int a, si_int b); // a << b 37 ti_int __ashrti3(ti_int a, si_int b); // a >> b arithmetic (sign fill) 39 ti_int __lshrti3(ti_int a, si_int b); // a >> b logical (zero fill) 43 si_int __clzti2(ti_int a); // count leading zeros 46 si_int __ctzti2(ti_int a); // count trailing zeros 49 si_int __ffsti2(ti_int a); // find least significant 1 bit 53 si_int __parityti2(ti_int a); // bit parity 57 si_int __popcountti2(ti_int a); // bit population 65 ti_int __negti2 (ti_int a); // -a 67 ti_int __multi3 (ti_int a, ti_int b); // a * b [all …]
|
D | divti3.c | 21 COMPILER_RT_ABI ti_int 22 __divti3(ti_int a, ti_int b) in __divti3() 24 const int bits_in_tword_m1 = (int)(sizeof(ti_int) * CHAR_BIT) - 1; in __divti3() 25 ti_int s_a = a >> bits_in_tword_m1; /* s_a = a < 0 ? -1 : 0 */ in __divti3() 26 ti_int s_b = b >> bits_in_tword_m1; /* s_b = b < 0 ? -1 : 0 */ in __divti3()
|
D | modti3.c | 21 COMPILER_RT_ABI ti_int 22 __modti3(ti_int a, ti_int b) in __modti3() 24 const int bits_in_tword_m1 = (int)(sizeof(ti_int) * CHAR_BIT) - 1; in __modti3() 25 ti_int s = b >> bits_in_tword_m1; /* s = b < 0 ? -1 : 0 */ in __modti3() 31 return ((ti_int)r ^ s) - s; /* negate if s == -1 */ in __modti3()
|
D | negvti2.c | 23 COMPILER_RT_ABI ti_int 24 __negvti2(ti_int a) in __negvti2() 26 const ti_int MIN = (ti_int)1 << ((int)(sizeof(ti_int) * CHAR_BIT)-1); in __negvti2()
|
D | absvti2.c | 23 COMPILER_RT_ABI ti_int 24 __absvti2(ti_int a) in __absvti2() 26 const int N = (int)(sizeof(ti_int) * CHAR_BIT); in __absvti2() 27 if (a == ((ti_int)1 << (N-1))) in __absvti2() 29 const ti_int s = a >> (N - 1); in __absvti2()
|
D | subvti3.c | 23 COMPILER_RT_ABI ti_int 24 __subvti3(ti_int a, ti_int b) in __subvti3() 26 ti_int s = (tu_int) a - (tu_int) b; in __subvti3()
|
/external/compiler-rt/test/builtins/Unit/ |
D | divti3_test.c | 21 COMPILER_RT_ABI ti_int __divti3(ti_int a, ti_int b); 23 int test__divti3(ti_int a, ti_int b, ti_int expected) in test__divti3() 25 ti_int x = __divti3(a, b); in test__divti3() 44 char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
|
D | modti3_test.c | 21 COMPILER_RT_ABI ti_int __modti3(ti_int a, ti_int b); 23 int test__modti3(ti_int a, ti_int b, ti_int expected) in test__modti3() 25 ti_int x = __modti3(a, b); in test__modti3() 44 char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
|
D | multi3_test.c | 19 COMPILER_RT_ABI ti_int __multi3(ti_int a, ti_int b); 21 int test__multi3(ti_int a, ti_int b, ti_int expected) in test__multi3() 23 ti_int x = __multi3(a, b); in test__multi3() 42 char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
|
D | parityti2_test.c | 22 COMPILER_RT_ABI si_int __parityti2(ti_int a); 24 int naive_parity(ti_int a) in naive_parity() 32 int test__parityti2(ti_int a) in test__parityti2() 46 char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0}; 56 if (test__parityti2(((ti_int)rand() << 96) + ((ti_int)rand() << 64) + in main() 57 ((ti_int)rand() << 32) + rand())) in main()
|
D | popcountti2_test.c | 22 COMPILER_RT_ABI si_int __popcountti2(ti_int a); 24 int naive_popcount(ti_int a) in naive_popcount() 32 int test__popcountti2(ti_int a) in test__popcountti2() 46 char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0}; 74 if (test__popcountti2(((ti_int)rand() << 96) | ((ti_int)rand() << 64) | in main() 75 ((ti_int)rand() << 32) | rand())) in main()
|
D | subvti3_test.c | 24 COMPILER_RT_ABI ti_int __subvti3(ti_int a, ti_int b); 26 int test__subvti3(ti_int a, ti_int b) in test__subvti3() 28 ti_int x = __subvti3(a, b); in test__subvti3() 29 ti_int expected = a - b; in test__subvti3()
|
D | absvti2_test.c | 24 COMPILER_RT_ABI ti_int __absvti2(ti_int a); 26 int test__absvti2(ti_int a) in test__absvti2() 28 ti_int x = __absvti2(a); in test__absvti2() 29 ti_int expected = a; in test__absvti2() 77 if (test__absvti2(make_ti(((ti_int)rand() << 32) | rand(), in main() 78 ((ti_int)rand() << 32) | rand()))) in main()
|
D | addvti3_test.c | 23 COMPILER_RT_ABI ti_int __addvti3(ti_int a, ti_int b); 25 int test__addvti3(ti_int a, ti_int b) in test__addvti3() 27 ti_int x = __addvti3(a, b); in test__addvti3() 28 ti_int expected = a + b; in test__addvti3()
|
D | negvti2_test.c | 23 COMPILER_RT_ABI ti_int __negvti2(ti_int a); 24 COMPILER_RT_ABI ti_int __negti2(ti_int a); 26 int test__negvti2(ti_int a) in test__negvti2() 28 ti_int x = __negvti2(a); in test__negvti2() 29 ti_int expected = __negti2(a); in test__negvti2()
|
D | mulvti3_test.c | 23 COMPILER_RT_ABI ti_int __mulvti3(ti_int a, ti_int b); 25 int test__mulvti3(ti_int a, ti_int b, ti_int expected) in test__mulvti3() 27 ti_int x = __mulvti3(a, b); in test__mulvti3()
|
D | negti2_test.c | 21 COMPILER_RT_ABI ti_int __negti2(ti_int a); 23 int test__negti2(ti_int a, ti_int expected) in test__negti2() 25 ti_int x = __negti2(a); in test__negti2() 41 char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
|
D | lshrti3_test.c | 23 COMPILER_RT_ABI ti_int __lshrti3(ti_int a, si_int b); 25 int test__lshrti3(ti_int a, si_int b, ti_int expected) in test__lshrti3() 27 ti_int x = __lshrti3(a, b); in test__lshrti3() 44 char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
|
D | ashlti3_test.c | 23 COMPILER_RT_ABI ti_int __ashlti3(ti_int a, si_int b); 25 int test__ashlti3(ti_int a, si_int b, ti_int expected) in test__ashlti3() 27 ti_int x = __ashlti3(a, b); in test__ashlti3() 46 char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
|
D | ashrti3_test.c | 23 COMPILER_RT_ABI ti_int __ashrti3(ti_int a, si_int b); 25 int test__ashrti3(ti_int a, si_int b, ti_int expected) in test__ashrti3() 27 ti_int x = __ashrti3(a, b); in test__ashrti3() 44 char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
|
D | cmpti2_test.c | 23 COMPILER_RT_ABI si_int __cmpti2(ti_int a, ti_int b); 25 int test__cmpti2(ti_int a, ti_int b, si_int expected) in test__cmpti2() 40 char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
|
D | muloti4_test.c | 23 COMPILER_RT_ABI ti_int __muloti4(ti_int a, ti_int b, int *overflow); 25 int test__muloti4(ti_int a, ti_int b, ti_int expected, int expected_overflow) in test__muloti4() 28 ti_int x = __muloti4(a, b, &ov); in test__muloti4()
|