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:
@@ -75,6 +75,7 @@ RegFill = InstructionFormat(
|
||||
Trap = InstructionFormat(trapcode)
|
||||
CondTrap = InstructionFormat(VALUE, trapcode)
|
||||
IntCondTrap = InstructionFormat(intcc, VALUE, trapcode)
|
||||
FloatCondTrap = InstructionFormat(floatcc, VALUE, trapcode)
|
||||
|
||||
# Finally extract the names of global variables in this module.
|
||||
InstructionFormat.extract_names(globals())
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user