Add a trapff instruction.

This is the floating point equivalent of trapif: Trap when a given
condition is in the floating-point flags.

Define Intel encodings comparable to the trapif encodings.
This commit is contained in:
Jakob Stoklund Olesen
2018-02-20 14:35:41 -08:00
parent 1e56d44465
commit b9b1d0fcd5
12 changed files with 91 additions and 1 deletions

View File

@@ -176,6 +176,15 @@ trapif = Instruction(
""",
ins=(Cond, f, code), can_trap=True)
Cond = Operand('Cond', floatcc)
f = Operand('f', fflags)
trapff = Instruction(
'trapff', r"""
Trap when condition is true in floating point CPU flags.
""",
ins=(Cond, f, code), can_trap=True)
rvals = Operand('rvals', VARIABLE_ARGS, doc='return values')
x_return = Instruction(