projects
/
kopensolaris-gnu
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mon Jun 24 19:57:01 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[kopensolaris-gnu/glibc.git]
/
sysdeps
/
rs6000
/
ffs.c
diff --git
a/sysdeps/rs6000/ffs.c
b/sysdeps/rs6000/ffs.c
index
b8dfcdf
..
44e7a43
100644
(file)
--- a/
sysdeps/rs6000/ffs.c
+++ b/
sysdeps/rs6000/ffs.c
@@
-1,6
+1,6
@@
/* ffs -- find first set bit in a word, counted from least significant end.
For IBM rs6000.
/* ffs -- find first set bit in a word, counted from least significant end.
For IBM rs6000.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991
, 1992
Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@
-23,6
+23,8
@@
Cambridge, MA 02139, USA. */
#undef ffs
#undef ffs
+#ifdef __GNUC__
+
int
DEFUN(ffs, (x), int x)
{
int
DEFUN(ffs, (x), int x)
{
@@
-31,3
+33,7
@@
DEFUN(ffs, (x), int x)
asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x));
return 32 - cnt;
}
asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x));
return 32 - cnt;
}
+
+#else
+#include <sysdeps/generic/ffs.c>
+#endif