diff options
Diffstat (limited to 'compiler-rt/lib/builtins/ffsdi2.c')
-rw-r--r-- | compiler-rt/lib/builtins/ffsdi2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/builtins/ffsdi2.c b/compiler-rt/lib/builtins/ffsdi2.c index 9c1a24260956..beae5530430e 100644 --- a/compiler-rt/lib/builtins/ffsdi2.c +++ b/compiler-rt/lib/builtins/ffsdi2.c @@ -15,13 +15,13 @@ // Returns: the index of the least significant 1-bit in a, or // the value zero if a is zero. The least significant bit is index one. -COMPILER_RT_ABI si_int __ffsdi2(di_int a) { +COMPILER_RT_ABI int __ffsdi2(di_int a) { dwords x; x.all = a; if (x.s.low == 0) { if (x.s.high == 0) return 0; - return __builtin_ctz(x.s.high) + (1 + sizeof(si_int) * CHAR_BIT); + return ctzsi(x.s.high) + (1 + sizeof(si_int) * CHAR_BIT); } - return __builtin_ctz(x.s.low) + 1; + return ctzsi(x.s.low) + 1; } |