summaryrefslogtreecommitdiff
path: root/src/arch/x86/microcode_rom.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-02-13 17:42:56 -0800
committerGabe Black <gblack@eecs.umich.edu>2011-02-13 17:42:56 -0800
commit399e095510ff6bc469c45b1e5afa96567d757004 (patch)
tree5c22de7797a5c304a86ddd8fb48dfdd69cfaeaf7 /src/arch/x86/microcode_rom.hh
parent1aa9698fa00e8ffce9b8d3c90b3bd76c3c9e950e (diff)
downloadgem5-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.hh7
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);
}
};
}