changeset 9f100bac04f1 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=9f100bac04f1
description:
        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:

 src/arch/x86/interrupts.hh |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 45204db420c0 -r 9f100bac04f1 src/arch/x86/interrupts.hh
--- a/src/arch/x86/interrupts.hh        Mon Nov 17 00:16:36 2014 -0800
+++ b/src/arch/x86/interrupts.hh        Mon Nov 17 00:17:06 2014 -0800
@@ -180,7 +180,7 @@
     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);
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to