Add a parameter type to read a register index from the opcode itself.
--HG-- extra : convert_revision : d2b5468ebf5df5a6ccadb57a30c52c8d16417b9a
This commit is contained in:
parent
ee22bcd609
commit
dcfaa348b1
1 changed files with 5 additions and 0 deletions
|
@ -118,6 +118,7 @@ let {{
|
||||||
|
|
||||||
ModRMRegIndex = "(MODRM_REG | (REX_R << 3))"
|
ModRMRegIndex = "(MODRM_REG | (REX_R << 3))"
|
||||||
ModRMRMIndex = "(MODRM_RM | (REX_B << 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
|
# This function specializes the given piece of code to use a particular
|
||||||
# set of argument types described by "opTypes".
|
# set of argument types described by "opTypes".
|
||||||
|
@ -143,6 +144,10 @@ let {{
|
||||||
else:
|
else:
|
||||||
print "Didn't recognize fixed register size %s!" % opType.rsize
|
print "Didn't recognize fixed register size %s!" % opType.rsize
|
||||||
Name += "_R"
|
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":
|
elif opType.tag == "M":
|
||||||
# This refers to memory. The macroop constructor sets up modrm
|
# This refers to memory. The macroop constructor sets up modrm
|
||||||
# addressing. Non memory modrm settings should cause an error.
|
# addressing. Non memory modrm settings should cause an error.
|
||||||
|
|
Loading…
Reference in a new issue