Synchronize InstructionFormat and InstructionData.

These two enums must have identical variants. One is generated from the
instruction formats in meta/cretonne/formats.py, the other defines the contents
of an instruction.

Emit a conversion from InstructionData to InstructionFormat which also serves
to verify the correspondence. Rustc will error is the match is not complete.
This commit is contained in:
Jakob Stoklund Olesen
2016-05-13 14:27:24 -07:00
parent 9c9be1cb58
commit 3670f57c40
4 changed files with 67 additions and 2 deletions

View File

@@ -55,6 +55,17 @@ value = OperandKind(
operand.
""")
#: A variable-sizes list of value operands. Use for Ebb and function call
#: arguemnts.
args = OperandKind(
'args', """
A variable size list of `value` operands.
Use this to represent arguemtns passed to a function call, arguments
passed to an extended basic block, or a variable number of results
returned from an instruction.
""")
# Instances of immediate operand types are provided in the cretonne.immediates
# module.