diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-06-14 13:50:58 +0000 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-06-14 13:50:58 +0000 |
commit | cd3fee1b81ad3c33733ed55e20d00464cdf791f5 (patch) | |
tree | 93dad6c69e5195647413fab418ffcab217badcdc /src/arch/x86/types.hh | |
parent | 640ab1d2e76835ecc20596d5d218b97a2ab0cf9d (diff) | |
download | gem5-cd3fee1b81ad3c33733ed55e20d00464cdf791f5.tar.xz |
Put the mode in the ExtMachInst.
--HG--
extra : convert_revision : 7fc6567ab3d35c06901e6c8a0435f7cab819e17e
Diffstat (limited to 'src/arch/x86/types.hh')
-rw-r--r-- | src/arch/x86/types.hh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/arch/x86/types.hh b/src/arch/x86/types.hh index 225258358..fc9f1d82b 100644 --- a/src/arch/x86/types.hh +++ b/src/arch/x86/types.hh @@ -120,6 +120,24 @@ namespace X86ISA Bitfield<2,0> bottom3; EndBitUnion(Opcode) + BitUnion8(OperatingMode) + Bitfield<3> mode; + Bitfield<2,0> submode; + EndBitUnion(OperatingMode) + + enum X86Mode { + LongMode, + LegacyMode + }; + + enum X86SubMode { + SixtyFourBitMode, + CompatabilityMode, + ProtectedMode, + Virtual8086Mode, + RealMode + }; + //The intermediate structure the x86 predecoder returns. struct ExtMachInst { @@ -151,6 +169,9 @@ namespace X86ISA uint8_t opSize; //The effective address size. uint8_t addrSize; + + //Mode information + OperatingMode mode; }; inline static std::ostream & @@ -172,6 +193,8 @@ namespace X86ISA inline static bool operator == (const ExtMachInst &emi1, const ExtMachInst &emi2) { + if(emi1.mode != emi2.mode) + return false; if(emi1.legacy != emi2.legacy) return false; if(emi1.rex != emi2.rex) |