diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2011-02-13 17:42:56 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2011-02-13 17:42:56 -0800 |
commit | 399e095510ff6bc469c45b1e5afa96567d757004 (patch) | |
tree | 5c22de7797a5c304a86ddd8fb48dfdd69cfaeaf7 /src/arch/x86/microcode_rom.hh | |
parent | 1aa9698fa00e8ffce9b8d3c90b3bd76c3c9e950e (diff) | |
download | gem5-399e095510ff6bc469c45b1e5afa96567d757004.tar.xz |
X86: On a bad microopc, return a microop that returns a fault that panics.
This way a bad micropc will have to get all the way to commit before killing
the simulation. This accounts for misspeculated branches.
Diffstat (limited to 'src/arch/x86/microcode_rom.hh')
-rw-r--r-- | src/arch/x86/microcode_rom.hh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/arch/x86/microcode_rom.hh b/src/arch/x86/microcode_rom.hh index f8ad410ce..84c503bb9 100644 --- a/src/arch/x86/microcode_rom.hh +++ b/src/arch/x86/microcode_rom.hh @@ -32,6 +32,7 @@ #define __ARCH_X86_MICROCODE_ROM_HH__ #include "arch/x86/emulenv.hh" +#include "arch/x86/insts/badmicroop.hh" #include "cpu/static_inst.hh" namespace X86ISAInst @@ -60,8 +61,10 @@ namespace X86ISAInst fetchMicroop(MicroPC microPC, StaticInstPtr curMacroop) { microPC = normalMicroPC(microPC); - assert(microPC < numMicroops); - return genFuncs[microPC](curMacroop); + if (microPC >= numMicroops) + return X86ISA::badMicroop; + else + return genFuncs[microPC](curMacroop); } }; } |