mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
exec: replace ffsl with ctzl
See commit fbeadf50 (bitops: unify bitops_ffsl with the one in
host-utils.h, call it bitops_ctzl) on why ctzl should be used instead
of ffsl.
This is also needed for musl libc which does not implement ffsl.
Signed-off-by: Natanael Copa <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
This commit is contained in:
1 parent
747eb78baa
commit
7224f66ec3
1 file changed
+1
-1
@@ -117,7 +117,7 @@ static inline void cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap,
|
||||
if (bitmap[i] != 0) {
|
||||
c = leul_to_cpu(bitmap[i]);
|
||||
do {
|
||||
j = ffsl(c) - 1;
|
||||
j = ctzl(c);
|
||||
c &= ~(1ul << j);
|
||||
page_number = (i * HOST_LONG_BITS + j) * hpratio;
|
||||
addr = page_number * TARGET_PAGE_SIZE;
|
||||
|
||||
Reference in new issue
Block a user