pub unsafe fn resume_to_exception_handler(
pc: usize,
sp: usize,
fp: usize,
payload1: usize,
payload2: usize,
) -> !Expand description
Resume execution at the given PC, SP, and FP, with the given payload values, according to the tail-call ABI’s exception scheme. Note that this scheme does not restore any other registers, so the given state is all that we need.
§Safety
This method requires:
-
the
spandfpto correspond to an active stack frame (above the current function), in code using Cranelift’stailcalling convention. -
The
pcto correspond to atry_callhandler destination, as emitted in Cranelift metadata, or otherwise a target that is expecting the tail-call ABI’s exception ABI. -
The Rust frames between the unwind destination and this frame to be unwind-safe: that is, they cannot have
Drophandlers for which safety requires that they run.