summaryrefslogtreecommitdiffstats
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-05 00:52:24 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-05 00:52:24 +0000
commit092445b3188376f3b11c2f2914f6ed181b0f8eaa (patch)
tree3cec67f0cfc96008129e3fab75a5e212b3cbd7f0 /gcc/libgcc2.c
parent9acebba82637e1a8e9d0902443f0bf3bd6b70752 (diff)
downloadppe42-gcc-092445b3188376f3b11c2f2914f6ed181b0f8eaa.tar.gz
ppe42-gcc-092445b3188376f3b11c2f2914f6ed181b0f8eaa.zip
* libgcc2.h, libgcc2.c (__ffsSI2): New.
(__ffsDI2): Rename from __ffsdi2. * mklibgcc.in (lib2funcs): Add _ffssi2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62422 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 2801681e97f..3736b2c61ca 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;
OpenPOWER on IntegriCloud