Change InstBuilder low-level format constructor signatures.

The per-instruction format low-level constructors in InstBuilder should
be independent of the relative ordering of value and immediate operands
in order to prepare for the future instruction format merger.

Reorder their arguments such that all the immediate operands are placed
before the value operands.

For instruction formats that use a value list representation, just take
a single ValueList argument. The value lists are created by the
individual instruction constructors. This means that the format
constructor doesn't care how many of the instructions operands are
'fixed' and how many are 'variable' arguments.
This commit is contained in:
Jakob Stoklund Olesen
2017-03-10 09:05:53 -08:00
parent 054edeb765
commit d9c61373e2
2 changed files with 62 additions and 39 deletions

View File

@@ -158,6 +158,13 @@ class Operand(object):
"""
return self.kind is VALUE
def is_varargs(self):
# type: () -> bool
"""
Is this a VARIABLE_ARGS operand?
"""
return self.kind is VARIABLE_ARGS
def is_immediate(self):
# type: () -> bool
"""