OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a879125
)
hw/intc/slavio_intctl: Avoid shifting left into sign bit
author
Peter Maydell
<peter.maydell@linaro.org>
Mon, 17 Mar 2014 16:00:39 +0000
(16:00 +0000)
committer
Michael Tokarev
<mjt@tls.msk.ru>
Thu, 27 Mar 2014 15:22:49 +0000
(19:22 +0400)
Add 'U' suffix to avoid undefined behaviour.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/intc/slavio_intctl.c
patch
|
blob
|
history
diff --git
a/hw/intc/slavio_intctl.c
b/hw/intc/slavio_intctl.c
index
41a1672
..
b10fb66
100644
(file)
--- a/
hw/intc/slavio_intctl.c
+++ b/
hw/intc/slavio_intctl.c
@@
-272,7
+272,7
@@
static void slavio_check_interrupts(SLAVIO_INTCTLState *s, int set_irqs)
CPU_IRQ_TIMER_IN;
if (i == s->target_cpu) {
for (j = 0; j < 32; j++) {
- if ((s->intregm_pending & (1 << j)) && intbit_to_level[j]) {
+ if ((s->intregm_pending & (1
U
<< j)) && intbit_to_level[j]) {
s->slaves[i].intreg_pending |= 1 << intbit_to_level[j];
}
}