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/insts/macroop.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/insts/macroop.hh')
-rw-r--r-- | src/arch/x86/insts/macroop.hh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/arch/x86/insts/macroop.hh b/src/arch/x86/insts/macroop.hh index fcf051a37..4f4176b77 100644 --- a/src/arch/x86/insts/macroop.hh +++ b/src/arch/x86/insts/macroop.hh @@ -41,6 +41,7 @@ #define __ARCH_X86_INSTS_MACROOP_HH__ #include "arch/x86/emulenv.hh" +#include "arch/x86/insts/badmicroop.hh" #include "arch/x86/types.hh" #include "arch/x86/insts/static_inst.hh" @@ -76,8 +77,10 @@ class MacroopBase : public X86StaticInst StaticInstPtr fetchMicroop(MicroPC microPC) const { - assert(microPC < numMicroops); - return microops[microPC]; + if (microPC >= numMicroops) + return badMicroop; + else + return microops[microPC]; } std::string |