Add a "clobbers_flags" flag to encoding recipes.
On some ISAs like Intel's, all arithmetic instructions set all or some of the CPU flags, so flag values can't be live across these instructions. On ISAs like ARM's Aarch32, flags are clobbered by compact 16-bit encodings but not necessarily by 32-bit encodings of the same instruction. The "clobbers_flags" bit on the encoding recipe is used to indicate if CPU flag values can be live across an instruction, or conversely whether the encoding can be used where flag values are live.
This commit is contained in:
@@ -766,6 +766,9 @@ def emit_recipe_constraints(isa, fmt):
|
||||
str(any(isinstance(c, Register)
|
||||
for c in r.outs)).lower())
|
||||
fmt.format('tied_ops: {},', str(bool(tied_i2o)).lower())
|
||||
fmt.format(
|
||||
'clobbers_flags: {},',
|
||||
str(bool(r.clobbers_flags)).lower())
|
||||
|
||||
|
||||
def emit_operand_constraints(
|
||||
|
||||
Reference in New Issue
Block a user