pub fn eret(cop0: &mut Cop0) -> u64Expand description
ERET โ return from an exception (UM Ch. 16, p. 434).
Returns where to resume. Three rules, all easy to half-implement:
- If
Status.ERLis set, resume atErrorEPCand clearERL; otherwise resume atEPCand clearEXL. Clearing the wrong one leaves the CPU stuck in kernel mode or returns to the wrong address. LLbitis always cleared, which is the only thing besides cache invalidation that clears it (UM ยง3.1) โ the other half of theLL/SCcontract implemented in Sprint 1.EREThas no delay slot and must not itself be placed in one.
The caller clears the link bit; this function reports that it must.