summaryrefslogtreecommitdiff
path: root/lib/builtins/ffsti2.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/builtins/ffsti2.c')
-rw-r--r--lib/builtins/ffsti2.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/builtins/ffsti2.c b/lib/builtins/ffsti2.c
index 91beb6177..41e668016 100644
--- a/lib/builtins/ffsti2.c
+++ b/lib/builtins/ffsti2.c
@@ -19,18 +19,15 @@
* the value zero if a is zero. The least significant bit is index one.
*/
-COMPILER_RT_ABI si_int
-__ffsti2(ti_int a)
-{
- twords x;
- x.all = a;
- if (x.s.low == 0)
- {
- if (x.s.high == 0)
- return 0;
- return __builtin_ctzll(x.s.high) + (1 + sizeof(di_int) * CHAR_BIT);
- }
- return __builtin_ctzll(x.s.low) + 1;
+COMPILER_RT_ABI si_int __ffsti2(ti_int a) {
+ twords x;
+ x.all = a;
+ if (x.s.low == 0) {
+ if (x.s.high == 0)
+ return 0;
+ return __builtin_ctzll(x.s.high) + (1 + sizeof(di_int) * CHAR_BIT);
+ }
+ return __builtin_ctzll(x.s.low) + 1;
}
#endif /* CRT_HAS_128BIT */