uret
User-mode trap return
Returns from a user-mode interrupt or exception handler to the address in uepc.
Used in
- When an instruction cannot be carried outRISC-V assembly
Forms
uret
# Set uepc to the address of after, providing the return destination normally saved by a user trap. uret resumes there; inspect t1=7 after the return.
.text
la t0, after
csrw t0, uepc
uret
after:
li t1, 7