Change index domain for typevar_operand.

An instruction format is now seen as having two separate operand lists:
immediates and values. Change InstructionFormat.typevar_operand to be a
pure index into the value list.
This commit is contained in:
Jakob Stoklund Olesen
2017-03-10 10:38:38 -08:00
parent da693f72e2
commit cdb4cce3dc
3 changed files with 17 additions and 14 deletions

View File

@@ -168,7 +168,8 @@ class Instruction(object):
typevar_error = None
if self.format.typevar_operand is not None:
try:
tv = self.ins[self.format.typevar_operand].typevar
opnum = self.value_opnums[self.format.typevar_operand]
tv = self.ins[opnum].typevar
if tv is tv.free_typevar():
self.other_typevars = self._verify_ctrl_typevar(tv)
self.ctrl_typevar = tv