encode: Support RVMR encoding

This commit is contained in:
Alexis Engelke
2021-03-23 12:53:18 +01:00
parent 0521ff7d42
commit 5faa90a292
3 changed files with 19 additions and 8 deletions

View File

@@ -128,8 +128,10 @@ class InstrDesc(NamedTuple):
def imm_size(self, opsz):
flags = ENCODINGS[self.encoding]
if flags.imm_control < 4:
if flags.imm_control < 3:
return 0
if flags.imm_control == 3:
return 1
if self.mnemonic == "ENTER":
return 3
if "IMM_8" in self.flags: