123456789101112131415161718192021222324252627282930313233 |
- #include "int_lib.h"
- COMPILER_RT_ABI si_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 __builtin_ctz(x.s.low) + 1;
- }
|