summaryrefslogtreecommitdiff
path: root/compiler-rt/lib/builtins/clzdi2.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/builtins/clzdi2.c')
-rw-r--r--compiler-rt/lib/builtins/clzdi2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/builtins/clzdi2.c b/compiler-rt/lib/builtins/clzdi2.c
index a0bacb2ae39e..12c17982a5cb 100644
--- a/compiler-rt/lib/builtins/clzdi2.c
+++ b/compiler-rt/lib/builtins/clzdi2.c
@@ -21,15 +21,15 @@
// ctz instruction, gcc resolves __builtin_clz to __clzdi2 rather than
// __clzsi2, leading to infinite recursion.
#define __builtin_clz(a) __clzsi2(a)
-extern si_int __clzsi2(si_int);
+extern int __clzsi2(si_int);
#endif
// Precondition: a != 0
-COMPILER_RT_ABI si_int __clzdi2(di_int a) {
+COMPILER_RT_ABI int __clzdi2(di_int a) {
dwords x;
x.all = a;
const si_int f = -(x.s.high == 0);
- return __builtin_clz((x.s.high & ~f) | (x.s.low & f)) +
+ return clzsi((x.s.high & ~f) | (x.s.low & f)) +
(f & ((si_int)(sizeof(si_int) * CHAR_BIT)));
}