88c88
< parser = re.compile(r"(?P<tag>[A-Z][A-Z]*)(?P<size>[a-z][a-z]*)|(r(?P<reg>[A-Z0-9]*)(?P<rsize>[a-z]*))")
---
> parser = re.compile(r"(?P<tag>[A-Z]+)(?P<size>[a-z]*)|(r(?P<reg>[A-Z0-9]+)(?P<rsize>[a-z]*))")
107a108
> opTypes.pop(0)
113c114
< env.addReg("INTREG_R%sX" % opType.reg)
---
> env.addReg("INTREG_R%sX | (REX_B << 3)" % opType.reg)
115c116
< env.addReg("INTREG_R%s" % opType.reg)
---
> env.addReg("INTREG_R%s | (REX_B << 3)" % opType.reg)
123a125,129
> elif opType.tag == "M":
> # This refers to memory. The macroop constructor sets up modrm
> # addressing. Non memory modrm settings should cause an error.
> Name += "_M"
> env.doModRM = True
133,134d138
< regTypes = copy.copy(opTypes)
< regTypes.pop(0)
137,142c141,142
< regName = Name + "_R"
< # This needs to refer to memory, but we'll fill in the details
< # later. It needs to take into account unaligned memory
< # addresses.
< memTypes = copy.copy(opTypes)
< memTypes.pop(0)
---
> # This refers to memory. The macroop constructor should set up
> # modrm addressing.
144,145c144
< memName = Name + "_M"
< print "%0"
---
> memEnv.doModRM = True
147,148c146,147
< {"3" : (regName, regTypes, regEnv)},
< (memName, memTypes, memEnv))
---
> {"3" : (Name + "_R", copy.copy(opTypes), regEnv)},
> (Name + "_M", copy.copy(opTypes), memEnv))
152,157d150
< elif opType.tag == "M":
< # This needs to refer to memory, but we'll fill in the details
< # later. It needs to take into account unaligned memory
< # addresses.
< print "%0"
< Name += "_M"
159,160c152
< # There should probably be a check here to verify that mod
< # is equal to 11b
---
> # Non register modrm settings should cause an error
165d156
< opTypes.pop(0)