summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2014-11-17 00:17:06 -0800
committerGabe Black <gabeblack@google.com>2014-11-17 00:17:06 -0800
commit79e7ca307e0bb05a967652a54206d96d023c9231 (patch)
tree9badc0a98ff408a2d4a260a1e89bb2ad49924cca /src/arch/x86
parent994c44035d796791f80e108db821760a1e0c4e83 (diff)
downloadgem5-79e7ca307e0bb05a967652a54206d96d023c9231.tar.xz
x86: APIC: Fix the getRegArrayBit function.
The getRegArrayBit function extracts a bit from a series of registers which are treated as a single large bit array. A previous change had modified the logic which figured out which bit to extract from ">> 5" to "% 5" which seems wrong, especially when other, similar functions were changed to use "% 32".
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/interrupts.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh
index dabee5441..b584c234b 100644
--- a/src/arch/x86/interrupts.hh
+++ b/src/arch/x86/interrupts.hh
@@ -180,7 +180,7 @@ class Interrupts : public BasicPioDevice, IntDevice
bool
getRegArrayBit(ApicRegIndex base, uint8_t vector)
{
- return bits(regs[base + (vector / 32)], vector % 5);
+ return bits(regs[base + (vector / 32)], vector % 32);
}
void requestInterrupt(uint8_t vector, uint8_t deliveryMode, bool level);