Re: [Qemu-devel] [PATCH] target-or32: fix masking in openrisc_pic_cpu_handler()

2013-07-28 Thread Jia Liu
Hi Xi, On Tue, Jan 22, 2013 at 11:57 PM, Xi Wang wrote: > A correct mask should be `x & (1 << i)', rather than `x && (1 << i)'. > > Also, in C99 signed shift (1 << 31) is undefined behavior, since the > result exceeds INT_MAX; use 1U instead. > > Signed-off-by: Xi Wang > --- > hw/openrisc_pic.c

Re: [Qemu-devel] [PATCH] target-or32: fix masking in openrisc_pic_cpu_handler()

2013-07-26 Thread Paolo Bonzini
Il 22/01/2013 16:57, Xi Wang ha scritto: > A correct mask should be `x & (1 << i)', rather than `x && (1 << i)'. > > Also, in C99 signed shift (1 << 31) is undefined behavior, since the > result exceeds INT_MAX; use 1U instead. > > Signed-off-by: Xi Wang > --- > hw/openrisc_pic.c |8 +--

[Qemu-devel] [PATCH] target-or32: fix masking in openrisc_pic_cpu_handler()

2013-01-22 Thread Xi Wang
A correct mask should be `x & (1 << i)', rather than `x && (1 << i)'. Also, in C99 signed shift (1 << 31) is undefined behavior, since the result exceeds INT_MAX; use 1U instead. Signed-off-by: Xi Wang --- hw/openrisc_pic.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff