diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-02-27 09:23:58 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-02-27 09:23:58 -0800 |
commit | 3dfa564e70e4804ef118ba94c81233fb85f56ba2 (patch) | |
tree | 0423a50010c4f19c3871c67eb72eb5c186d93e70 /src/arch/x86/isa | |
parent | 9dfa3f7f735ead0ada9eb79227f217d0d76e0f49 (diff) | |
download | gem5-3dfa564e70e4804ef118ba94c81233fb85f56ba2.tar.xz |
X86: Respect segment override prefixes even when there's no ModRM byte.
Diffstat (limited to 'src/arch/x86/isa')
-rw-r--r-- | src/arch/x86/isa/macroop.isa | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/arch/x86/isa/macroop.isa b/src/arch/x86/isa/macroop.isa index 8eaf5f786..3a836ff68 100644 --- a/src/arch/x86/isa/macroop.isa +++ b/src/arch/x86/isa/macroop.isa @@ -135,7 +135,7 @@ def template MacroConstructor {{ %(adjust_env)s; %(adjust_imm)s; %(adjust_disp)s; - %(do_modrm)s; + %(init_env)s; %(constructor)s; const char *macrocodeBlock = "%(class_name)s"; //alloc_microops is the code that sets up the microops @@ -166,7 +166,7 @@ let {{ } self.declared = False self.adjust_env = "" - self.doModRM = "" + self.init_env = "" self.adjust_imm = ''' uint64_t adjustedImm = IMMEDIATE; //This is to pacify gcc in case the immediate isn't used. @@ -228,7 +228,7 @@ let {{ "adjust_disp" : self.adjust_disp, "disassembly" : env.disassembly, "regSize" : regSize, - "do_modrm" : self.doModRM}) + "init_env" : self.initEnv}) return MacroConstructor.subst(iop) + \ MacroDisassembly.subst(iop); }}; @@ -304,6 +304,7 @@ let {{ let {{ doModRMString = "env.doModRM(machInst);\n" + noModRMString = "env.setSeg(machInst);\n" def genMacroop(Name, env): blocks = OutputBlocks() if not macroopDict.has_key(Name): @@ -311,7 +312,9 @@ let {{ macroop = macroopDict[Name] if not macroop.declared: if env.doModRM: - macroop.doModRM = doModRMString + macroop.initEnv = doModRMString + else: + macroop.initEnv = noModRMString blocks.header_output = macroop.getDeclaration() blocks.decoder_output = macroop.getDefinition(env) macroop.declared = True |