mirror of https://github.com/xqemu/xqemu.git
Use ctz64 in favor of ffsll
Not all host platforms support ffsll. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
1447379b13
commit
6ad8702a77
|
@ -2,6 +2,7 @@
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/pc.h"
|
#include "hw/pc.h"
|
||||||
#include "hw/isa.h"
|
#include "hw/isa.h"
|
||||||
|
#include "host-utils.h"
|
||||||
|
|
||||||
#include "exec-all.h"
|
#include "exec-all.h"
|
||||||
#include "kvm.h"
|
#include "kvm.h"
|
||||||
|
@ -148,9 +149,9 @@ void cpu_save(QEMUFile *f, void *opaque)
|
||||||
to find it and save its number instead (-1 for none). */
|
to find it and save its number instead (-1 for none). */
|
||||||
pending_irq = -1;
|
pending_irq = -1;
|
||||||
for (i = 0; i < ARRAY_SIZE(env->interrupt_bitmap); i++) {
|
for (i = 0; i < ARRAY_SIZE(env->interrupt_bitmap); i++) {
|
||||||
bit = ffsll(env->interrupt_bitmap[i]);
|
if (env->interrupt_bitmap[i]) {
|
||||||
if (bit) {
|
bit = ctz64(env->interrupt_bitmap[i]);
|
||||||
pending_irq = i * 64 + bit - 1;
|
pending_irq = i * 64 + bit;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue