diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-04-19 13:47:15 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-04-19 13:47:15 -0700 |
commit | 089b3840865f816493a33f2ccf987307d0a79f87 (patch) | |
tree | 6b7ea8b807a1693be08fc02f0326d7741369201d /src | |
parent | eee74ba42777ee9eed62598545a0ebdd87ea9024 (diff) | |
download | gem5-089b3840865f816493a33f2ccf987307d0a79f87.tar.xz |
X86: Fix the functions that manipulate large bit arrays in the local APIC.
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/x86/interrupts.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh index 1f3a414ce..72a852ada 100644 --- a/src/arch/x86/interrupts.hh +++ b/src/arch/x86/interrupts.hh @@ -172,19 +172,19 @@ class Interrupts : public BasicPioDevice, IntDev void setRegArrayBit(ApicRegIndex base, uint8_t vector) { - regs[base + (vector % 32)] |= (1 << (vector >> 5)); + regs[base + (vector / 32)] |= (1 << (vector % 32)); } void clearRegArrayBit(ApicRegIndex base, uint8_t vector) { - regs[base + (vector % 32)] &= ~(1 << (vector >> 5)); + regs[base + (vector / 32)] &= ~(1 << (vector % 32)); } bool getRegArrayBit(ApicRegIndex base, uint8_t vector) { - return bits(regs[base + (vector % 32)], vector >> 5); + return bits(regs[base + (vector / 32)], vector % 5); } void requestInterrupt(uint8_t vector, uint8_t deliveryMode, bool level); |