cranelift: tweak condition in safepoint detection to check for resumable traps;
This commit is contained in:
@@ -59,6 +59,14 @@ impl Opcode {
|
||||
pub fn constraints(self) -> OpcodeConstraints {
|
||||
OPCODE_CONSTRAINTS[self as usize - 1]
|
||||
}
|
||||
|
||||
/// Returns true if the instruction is a resumable trap.
|
||||
pub fn is_resumable_trap(&self) -> bool {
|
||||
match self {
|
||||
Opcode::ResumableTrap | Opcode::ResumableTrapnz => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This trait really belongs in cranelift-reader where it is used by the `.clif` file parser, but since
|
||||
|
||||
Reference in New Issue
Block a user