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
..
cputimer.c
Makefile.objs
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