Add a trapif instruction.
This is a conditional trap controlled by integer CPU flags. Compare to brif.
This commit is contained in:
@@ -74,6 +74,7 @@ RegFill = InstructionFormat(
|
||||
|
||||
Trap = InstructionFormat(trapcode)
|
||||
CondTrap = InstructionFormat(VALUE, trapcode)
|
||||
IntCondTrap = InstructionFormat(intcc, VALUE, trapcode)
|
||||
|
||||
# Finally extract the names of global variables in this module.
|
||||
InstructionFormat.extract_names(globals())
|
||||
|
||||
@@ -167,6 +167,15 @@ trapnz = Instruction(
|
||||
""",
|
||||
ins=(c, code), can_trap=True)
|
||||
|
||||
Cond = Operand('Cond', intcc)
|
||||
f = Operand('f', iflags)
|
||||
|
||||
trapif = Instruction(
|
||||
'trapif', r"""
|
||||
Trap when condition is true in integer 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