Blue Swirl wrote: > On 7/1/09, Jan Kiszka wrote: >> Not all host platforms support the ll variant. This is not a critical >> path, so go the easy way. > >> - for (i = 0; i < ARRAY_SIZE(env->interrupt_bitmap); i++) { >> - bit = ffsll(env->interrupt_bitmap[i]); >> + for (i = 0; i < sizeof(env->interrupt_bitmap) / sizeof(int); i++) { >> + bit = ffs(((int *)env->interrupt_bitmap)[i]); >> if (bit) { >> - pending_irq = i * 64 + bit - 1; >> + pending_irq = i * 8 * sizeof(int) + bit - 1; > > I think this will not work on a big endian host. Right, may theoretically bite us once we are able to migrate between kvm and tcg. Will send a better version nevertheless. Jan