diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-06-12 16:47:10 +0000 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-06-12 16:47:10 +0000 |
commit | 0d8d3f988f835e58e5e53b6ee2be871e7bff9132 (patch) | |
tree | f5b9da8dd6265a91ef6040999b3bade2d9ee7b15 /src/arch/x86/isa | |
parent | baf145e0f537cafeaa756d1128e3507dfce4bd01 (diff) | |
download | gem5-0d8d3f988f835e58e5e53b6ee2be871e7bff9132.tar.xz |
Make use of some of the REX prefix.
--HG--
extra : convert_revision : 948eceb59a1cd9b02ad9355dd5894af0bbec4e83
Diffstat (limited to 'src/arch/x86/isa')
-rw-r--r-- | src/arch/x86/isa/specialize.isa | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/arch/x86/isa/specialize.isa b/src/arch/x86/isa/specialize.isa index 3b4e09daa..fe3730b77 100644 --- a/src/arch/x86/isa/specialize.isa +++ b/src/arch/x86/isa/specialize.isa @@ -95,6 +95,9 @@ let {{ self.size = match.group("size") self.rsize = match.group("rsize") + ModRMRegIndex = "(MODRM_REG | (REX_R << 3))" + ModRMRMIndex = "(MODRM_RM | (REX_B << 3))" + # This function specializes the given piece of code to use a particular # set of argument types described by "opTypes". def specializeInst(Name, opTypes, env): @@ -121,14 +124,14 @@ let {{ raise Exception, "Problem parsing operand tag: %s" % opType.tag elif opType.tag in ("C", "D", "G", "P", "S", "T", "V"): # Use the "reg" field of the ModRM byte to select the register - env.addReg("(uint8_t)MODRM_REG") + env.addReg(ModRMRegIndex) elif opType.tag in ("E", "Q", "W"): # This might refer to memory or to a register. We need to # divide it up farther. regTypes = copy.copy(opTypes) regTypes.pop(0) regEnv = copy.copy(env) - regEnv.addReg("(uint8_t)MODRM_RM") + regEnv.addReg(ModRMRMIndex) # This needs to refer to memory, but we'll fill in the details # later. It needs to take into account unaligned memory # addresses. @@ -149,7 +152,7 @@ let {{ elif opType.tag in ("PR", "R", "VR"): # There should probably be a check here to verify that mod # is equal to 11b - env.addReg("(uint8_t)MODRM_RM") + env.addReg(ModRMRMIndex) else: raise Exception, "Unrecognized tag %s." % opType.tag opTypes.pop(0) |