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
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 +--
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