mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
pxa2xx: Don't shift into sign bit
Add missing 'U' suffixes to avoid potentially shifting into the sign bit of a signed integer. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1392988008-15938-2-git-send-email-peter.maydell@linaro.org
This commit is contained in:
parent
b29c8f115d
commit
43a32ed68f
3 changed files with 6 additions and 6 deletions
|
@ -105,7 +105,7 @@ static inline uint32_t pxa2xx_pic_highest(PXA2xxPICState *s) {
|
|||
|
||||
for (i = PXA2XX_PIC_SRCS - 1; i >= 0; i --) {
|
||||
irq = s->priority[i] & 0x3f;
|
||||
if ((s->priority[i] & (1 << 31)) && irq < PXA2XX_PIC_SRCS) {
|
||||
if ((s->priority[i] & (1U << 31)) && irq < PXA2XX_PIC_SRCS) {
|
||||
/* Source peripheral ID is valid. */
|
||||
bit = 1 << (irq & 31);
|
||||
int_set = (irq >= 32);
|
||||
|
@ -119,7 +119,7 @@ static inline uint32_t pxa2xx_pic_highest(PXA2xxPICState *s) {
|
|||
if (mask[int_set] & bit & ~s->is_fiq[int_set]) {
|
||||
/* IRQ asserted */
|
||||
ichp &= 0x0000ffff;
|
||||
ichp |= (1 << 31) | (irq << 16);
|
||||
ichp |= (1U << 31) | (irq << 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue