Generate a Builder data type. WIP.

The Builder provides a convenient interface for inserting instructions
into an extended basic block.

The bulk of the builder methods are generated automatically from the
meta language instruction descriptions.

Still TODO: Keep track of an insertion position.
This commit is contained in:
Jakob Stoklund Olesen
2016-10-12 10:51:05 -07:00
parent 5a2f8cbdf8
commit 8ca970ba5c
4 changed files with 213 additions and 2 deletions

View File

@@ -1057,7 +1057,7 @@ fdemote = Instruction(
ins=x, outs=a)
x = Operand('x', Float)
a = Operand('a', Int)
a = Operand('a', IntTo)
fcvt_to_uint = Instruction(
'fcvt_to_uint', r"""
@@ -1083,6 +1083,9 @@ fcvt_to_sint = Instruction(
""",
ins=x, outs=a)
x = Operand('x', Int)
a = Operand('a', FloatTo)
fcvt_from_uint = Instruction(
'fcvt_from_uint', r"""
Convert unsigned integer to floating point.