projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93abc97
)
* ffsll.c (ffsll): Correct implementation.
author
Ian Lance Taylor
<ian@airs.com>
Mon, 30 Mar 2009 23:17:11 +0000
(23:17 +0000)
committer
Ian Lance Taylor
<ian@airs.com>
Mon, 30 Mar 2009 23:17:11 +0000
(23:17 +0000)
gold/ChangeLog
patch
|
blob
|
history
gold/ffsll.c
patch
|
blob
|
history
diff --git
a/gold/ChangeLog
b/gold/ChangeLog
index b6ad2e29420660ebb5ccd7194ad61744c3c79916..0726507999e76da41bac642b128ca13568f346cc 100644
(file)
--- a/
gold/ChangeLog
+++ b/
gold/ChangeLog
@@
-1,3
+1,7
@@
+2009-03-30 Ian Lance Taylor <iant@google.com>
+
+ * ffsll.c (ffsll): Correct implementation.
+
2009-03-27 Ian Lance Taylor <iant@google.com>
* ffsll.c: New file.
diff --git
a/gold/ffsll.c
b/gold/ffsll.c
index aeae845f094dc9c6121ca1d1ca0d3d7057a0d19f..b247bc30af3c0e9a06969533d543d8366890380c 100644
(file)
--- a/
gold/ffsll.c
+++ b/
gold/ffsll.c
@@
-36,8
+36,13
@@
ffsll (long long arg)
unsigned long long i;
int ret;
- ret = 0;
- for (i = (unsigned long long) arg; i != 0; i >>= 1)
- ++ret;
+ if (arg == 0)
+ ret = 0;
+ else
+ {
+ ret = 1;
+ for (i = (unsigned long long) arg; (i & 1) == 0; i >>= 1)
+ ++ret;
+ }
return ret;
}