aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/compiler-rt/lib/builtins
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/compiler-rt/lib/builtins')
-rw-r--r--contrib/llvm-project/compiler-rt/lib/builtins/floatsisf.c4
-rw-r--r--contrib/llvm-project/compiler-rt/lib/builtins/floatsitf.c8
-rw-r--r--contrib/llvm-project/compiler-rt/lib/builtins/floatunsisf.c4
-rw-r--r--contrib/llvm-project/compiler-rt/lib/builtins/floatunsitf.c4
-rw-r--r--contrib/llvm-project/compiler-rt/lib/builtins/fp_extend.h4
-rw-r--r--contrib/llvm-project/compiler-rt/lib/builtins/udivmoddi4.c4
6 files changed, 14 insertions, 14 deletions
diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/floatsisf.c b/contrib/llvm-project/compiler-rt/lib/builtins/floatsisf.c
index fe060407755b..c01f81e41e8e 100644
--- a/contrib/llvm-project/compiler-rt/lib/builtins/floatsisf.c
+++ b/contrib/llvm-project/compiler-rt/lib/builtins/floatsisf.c
@@ -17,7 +17,7 @@
#include "int_lib.h"
-COMPILER_RT_ABI fp_t __floatsisf(int a) {
+COMPILER_RT_ABI fp_t __floatsisf(si_int a) {
const int aWidth = sizeof a * CHAR_BIT;
@@ -33,7 +33,7 @@ COMPILER_RT_ABI fp_t __floatsisf(int a) {
}
// Exponent of (fp_t)a is the width of abs(a).
- const int exponent = (aWidth - 1) - __builtin_clz(a);
+ const int exponent = (aWidth - 1) - clzsi(a);
rep_t result;
// Shift a into the significand field, rounding if it is a right-shift
diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/floatsitf.c b/contrib/llvm-project/compiler-rt/lib/builtins/floatsitf.c
index f56063f368d9..80a4ef08fb0e 100644
--- a/contrib/llvm-project/compiler-rt/lib/builtins/floatsitf.c
+++ b/contrib/llvm-project/compiler-rt/lib/builtins/floatsitf.c
@@ -16,7 +16,7 @@
#include "fp_lib.h"
#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
-COMPILER_RT_ABI fp_t __floatsitf(int a) {
+COMPILER_RT_ABI fp_t __floatsitf(si_int a) {
const int aWidth = sizeof a * CHAR_BIT;
@@ -26,14 +26,14 @@ COMPILER_RT_ABI fp_t __floatsitf(int a) {
// All other cases begin by extracting the sign and absolute value of a
rep_t sign = 0;
- unsigned aAbs = (unsigned)a;
+ su_int aAbs = (su_int)a;
if (a < 0) {
sign = signBit;
- aAbs = ~(unsigned)a + 1U;
+ aAbs = ~(su_int)a + (su_int)1U;
}
// Exponent of (fp_t)a is the width of abs(a).
- const int exponent = (aWidth - 1) - __builtin_clz(aAbs);
+ const int exponent = (aWidth - 1) - clzsi(aAbs);
rep_t result;
// Shift a into the significand field and clear the implicit bit.
diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/floatunsisf.c b/contrib/llvm-project/compiler-rt/lib/builtins/floatunsisf.c
index 33a1b5ae2a63..ec062b5943e9 100644
--- a/contrib/llvm-project/compiler-rt/lib/builtins/floatunsisf.c
+++ b/contrib/llvm-project/compiler-rt/lib/builtins/floatunsisf.c
@@ -17,7 +17,7 @@
#include "int_lib.h"
-COMPILER_RT_ABI fp_t __floatunsisf(unsigned int a) {
+COMPILER_RT_ABI fp_t __floatunsisf(su_int a) {
const int aWidth = sizeof a * CHAR_BIT;
@@ -26,7 +26,7 @@ COMPILER_RT_ABI fp_t __floatunsisf(unsigned int a) {
return fromRep(0);
// Exponent of (fp_t)a is the width of abs(a).
- const int exponent = (aWidth - 1) - __builtin_clz(a);
+ const int exponent = (aWidth - 1) - clzsi(a);
rep_t result;
// Shift a into the significand field, rounding if it is a right-shift
diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/floatunsitf.c b/contrib/llvm-project/compiler-rt/lib/builtins/floatunsitf.c
index a4bf0f65fe1c..7ba1fb6000dc 100644
--- a/contrib/llvm-project/compiler-rt/lib/builtins/floatunsitf.c
+++ b/contrib/llvm-project/compiler-rt/lib/builtins/floatunsitf.c
@@ -16,7 +16,7 @@
#include "fp_lib.h"
#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
-COMPILER_RT_ABI fp_t __floatunsitf(unsigned int a) {
+COMPILER_RT_ABI fp_t __floatunsitf(su_int a) {
const int aWidth = sizeof a * CHAR_BIT;
@@ -25,7 +25,7 @@ COMPILER_RT_ABI fp_t __floatunsitf(unsigned int a) {
return fromRep(0);
// Exponent of (fp_t)a is the width of abs(a).
- const int exponent = (aWidth - 1) - __builtin_clz(a);
+ const int exponent = (aWidth - 1) - clzsi(a);
rep_t result;
// Shift a into the significand field and clear the implicit bit.
diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/fp_extend.h b/contrib/llvm-project/compiler-rt/lib/builtins/fp_extend.h
index aad4436730dd..eee4722bf90e 100644
--- a/contrib/llvm-project/compiler-rt/lib/builtins/fp_extend.h
+++ b/contrib/llvm-project/compiler-rt/lib/builtins/fp_extend.h
@@ -33,9 +33,9 @@ static __inline int src_rep_t_clz(src_rep_t a) {
return __builtin_clzl(a);
#else
if (a & REP_C(0xffffffff00000000))
- return __builtin_clz(a >> 32);
+ return clzsi(a >> 32);
else
- return 32 + __builtin_clz(a & REP_C(0xffffffff));
+ return 32 + clzsi(a & REP_C(0xffffffff));
#endif
}
diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/udivmoddi4.c b/contrib/llvm-project/compiler-rt/lib/builtins/udivmoddi4.c
index ca17b36ce585..123e5fb05f8c 100644
--- a/contrib/llvm-project/compiler-rt/lib/builtins/udivmoddi4.c
+++ b/contrib/llvm-project/compiler-rt/lib/builtins/udivmoddi4.c
@@ -82,7 +82,7 @@ COMPILER_RT_ABI du_int __udivmoddi4(du_int a, du_int b, du_int *rem) {
r.s.high = n.s.high & (d.s.high - 1);
*rem = r.all;
}
- return n.s.high >> __builtin_ctz(d.s.high);
+ return n.s.high >> ctzsi(d.s.high);
}
// K K
// ---
@@ -112,7 +112,7 @@ COMPILER_RT_ABI du_int __udivmoddi4(du_int a, du_int b, du_int *rem) {
*rem = n.s.low & (d.s.low - 1);
if (d.s.low == 1)
return n.all;
- sr = __builtin_ctz(d.s.low);
+ sr = ctzsi(d.s.low);
q.s.high = n.s.high >> sr;
q.s.low = (n.s.high << (n_uword_bits - sr)) | (n.s.low >> sr);
return q.all;