Create format fields for immediate operands.

Each InstructionFormat instance gets data members corresponding to its immediate
operands, so the can be referred to as BinaryImm.imm, for example.

This will be used to construct instruction predicates.
This commit is contained in:
Jakob Stoklund Olesen
2016-08-23 13:29:29 -07:00
parent 7ead1e3f6f
commit fe7ad84129
2 changed files with 50 additions and 4 deletions

View File

@@ -30,8 +30,8 @@ BinaryOverflow = InstructionFormat(value, value, multiple_results=True)
# The fma instruction has the same constraint on all inputs.
Ternary = InstructionFormat(value, value, value, typevar_operand=1)
InsertLane = InstructionFormat(value, uimm8, value)
ExtractLane = InstructionFormat(value, uimm8)
InsertLane = InstructionFormat(value, ('lane', uimm8), value)
ExtractLane = InstructionFormat(value, ('lane', uimm8))
IntCompare = InstructionFormat(intcc, value, value)
FloatCompare = InstructionFormat(floatcc, value, value)