diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-07-20 14:55:16 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-07-20 14:55:16 -0700 |
commit | dcfaa348b190c97a2476b0e9c099160c8c1e0202 (patch) | |
tree | adccb9fd4d7aff9fff8505a274840f5f314f8b7f /src/arch/x86/isa | |
parent | ee22bcd60940ed8cd23865e40ed8debc6c1f4288 (diff) | |
download | gem5-dcfaa348b190c97a2476b0e9c099160c8c1e0202.tar.xz |
Add a parameter type to read a register index from the opcode itself.
--HG--
extra : convert_revision : d2b5468ebf5df5a6ccadb57a30c52c8d16417b9a
Diffstat (limited to 'src/arch/x86/isa')
-rw-r--r-- | src/arch/x86/isa/specialize.isa | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/x86/isa/specialize.isa b/src/arch/x86/isa/specialize.isa index 3183f32ba..5165ea206 100644 --- a/src/arch/x86/isa/specialize.isa +++ b/src/arch/x86/isa/specialize.isa @@ -118,6 +118,7 @@ let {{ ModRMRegIndex = "(MODRM_REG | (REX_R << 3))" ModRMRMIndex = "(MODRM_RM | (REX_B << 3))" + InstRegIndex = "(OPCODE_OP_BOTTOM3 | (REX_B << 3))" # This function specializes the given piece of code to use a particular # set of argument types described by "opTypes". @@ -143,6 +144,10 @@ let {{ else: print "Didn't recognize fixed register size %s!" % opType.rsize Name += "_R" + elif opType.tag == "B": + # This refers to registers whose index is encoded as part of the opcode + Name += "_R" + env.addReg(InstRegIndex) elif opType.tag == "M": # This refers to memory. The macroop constructor sets up modrm # addressing. Non memory modrm settings should cause an error. |