qemu-e2k/hw/openrisc
Jia Liu ed396e2b2d hw/openrisc: Fix masking in openrisc_pic_cpu_handler()
Consider the masking of PICSR and PICMR:

    ((cpu->env.picsr && (1 << i)) && (cpu->env.picmr && (1 << i)))

To correctly mask bits, we should use the bitwise AND "&" rather than
the logical AND "&&".  Also, the loop is not necessary for masking.
Simply use (cpu->env.picsr & cpu->env.picmr).

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Acked-by: Jia Liu <proljc@gmail.com>
2013-08-21 09:23:10 +08:00
..
Makefile.objs hw: move boards and other isolated files to hw/ARCH 2013-03-01 15:01:19 +01:00
cputimer.c cpu: Move halted and interrupt_request fields to CPUState 2013-03-12 10:35:55 +01:00
openrisc_sim.c hw/openrisc: Avoid using uninitialised variable 'entry' 2013-08-21 09:15:36 +08:00
pic_cpu.c hw/openrisc: Fix masking in openrisc_pic_cpu_handler() 2013-08-21 09:23:10 +08:00