diff options
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r-- | gcc/libgcc2.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 2801681..3736b2c 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -340,11 +340,27 @@ __ashrdi3 (DWtype u, word_type b) } #endif +#ifdef L_ffssi2 +#undef int +extern int __ffsSI2 (UWtype u); +int +__ffsSI2 (UWtype u) +{ + UWtype count; + + if (u == 0) + return 0; + + count_trailing_zeros (count, u); + return count + 1; +} +#endif + #ifdef L_ffsdi2 #undef int -extern int __ffsdi2 (DWtype u); +extern int __ffsDI2 (DWtype u); int -__ffsdi2 (DWtype u) +__ffsDI2 (DWtype u) { DWunion uu; UWtype word, count, add; |