libgcc2.h, libgcc2.c (__ffsSI2): New.

* libgcc2.h, libgcc2.c (__ffsSI2): New.
        (__ffsDI2): Rename from __ffsdi2.
        * mklibgcc.in (lib2funcs): Add _ffssi2.

From-SVN: r62422
This commit is contained in:
Richard Henderson 2003-02-04 16:52:24 -08:00 committed by Richard Henderson
parent 0c9ed8564d
commit dfff898c27
4 changed files with 30 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2003-02-04 Richard Henderson <rth@redhat.com>
* libgcc2.h, libgcc2.c (__ffsSI2): New.
(__ffsDI2): Rename from __ffsdi2.
* mklibgcc.in (lib2funcs): Add _ffssi2.
2003-02-04 Richard Henderson <rth@redhat.com>
* libgcc2.c (__paritysi2, __paritydi2): Replace last two reduction

View File

@ -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;

View File

@ -182,7 +182,6 @@ typedef int word_type __attribute__ ((mode (__word__)));
#define __lshrdi3 __NDW(lshr,3)
#define __ashldi3 __NDW(ashl,3)
#define __ashrdi3 __NDW(ashr,3)
#define __ffsdi2 __NDW(ffs,2)
#define __cmpdi2 __NDW(cmp,2)
#define __ucmpdi2 __NDW(ucmp,2)
#define __udivmoddi4 __NDW(udivmod,4)
@ -203,6 +202,9 @@ typedef int word_type __attribute__ ((mode (__word__)));
#define __fixunsdfSI __NW(fixunsdf,)
#define __fixunssfSI __NW(fixunssf,)
#define __ffsSI2 __NW(ffs,2)
#define __ffsDI2 __NDW(ffs,2)
extern DWtype __muldi3 (DWtype, DWtype);
extern DWtype __divdi3 (DWtype, DWtype);
extern UDWtype __udivdi3 (UDWtype, UDWtype);

View File

@ -44,14 +44,14 @@ echo 'force:'
echo
# Library members defined in libgcc2.c.
lib2funcs='_muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz
lib2funcs='_muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3
_cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi
_fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi
_floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf _clear_cache
_trampoline __main _exit _absvsi2 _absvdi2 _addvsi3 _addvdi3
_subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors
_clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab _popcountsi2
_popcountdi2 _paritysi2 _paritydi2'
_ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab
_popcountsi2 _popcountdi2 _paritysi2 _paritydi2'
# Disable SHLIB_LINK if shared libgcc not enabled.
if [ "@enable_shared@" = "no" ]; then