summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/specialize.isa
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-17 18:15:21 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-17 18:15:21 -0700
commit33cb4c2f09d7ad21cf37bab6ce1f846a049e121e (patch)
tree1d80c03cba18c1aa2cf998509fa9b0838d8e4c3d /src/arch/x86/isa/specialize.isa
parent3a4438a8683e73fc5fb6195a627372a5de2c5a99 (diff)
downloadgem5-33cb4c2f09d7ad21cf37bab6ce1f846a049e121e.tar.xz
X86: Use suffixes to differentiate XMM/MMX/GPR operands.
Diffstat (limited to 'src/arch/x86/isa/specialize.isa')
-rw-r--r--src/arch/x86/isa/specialize.isa25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/arch/x86/isa/specialize.isa b/src/arch/x86/isa/specialize.isa
index b74363470..4ebba6981 100644
--- a/src/arch/x86/isa/specialize.isa
+++ b/src/arch/x86/isa/specialize.isa
@@ -190,7 +190,12 @@ let {{
env.addReg(ModRMRegIndex)
env.addToDisassembly(
"printReg(out, %s, regSize);\n" % ModRMRegIndex)
- Name += "_R"
+ if opType.tag == "P":
+ Name += "_MMX"
+ elif opType.tag == "V":
+ Name += "_XMM"
+ else:
+ Name += "_R"
elif opType.tag in ("E", "Q", "W"):
# This might refer to memory or to a register. We need to
# divide it up farther.
@@ -202,9 +207,16 @@ let {{
# modrm addressing.
memEnv = copy.copy(env)
memEnv.doModRM = True
+ regSuffix = "_R"
+ if opType.tag == "Q":
+ regSuffix = "_MMX"
+ elif opType.tag == "W":
+ regSuffix = "_XMM"
return doSplitDecode("MODRM_MOD",
- {"3" : (specializeInst, Name + "_R", copy.copy(opTypes), regEnv)},
- (doRipRelativeDecode, Name, copy.copy(opTypes), memEnv))
+ {"3" : (specializeInst, Name + regSuffix,
+ copy.copy(opTypes), regEnv)},
+ (doRipRelativeDecode, Name,
+ copy.copy(opTypes), memEnv))
elif opType.tag in ("I", "J"):
# Immediates
env.addToDisassembly(
@@ -218,7 +230,12 @@ let {{
env.addReg(ModRMRMIndex)
env.addToDisassembly(
"printReg(out, %s, regSize);\n" % ModRMRMIndex)
- Name += "_R"
+ if opType.tag == "PR":
+ Name += "_MMX"
+ elif opType.tag == "VR":
+ Name += "_XMM"
+ else:
+ Name += "_R"
elif opType.tag in ("X", "Y"):
# This type of memory addressing is for string instructions.
# They'll use the right index and segment internally.