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