Is it a normal user-mode instruction?
No. These instructions are constrained by privilege level and extension support; user-mode legality must follow the privileged rules.
Supervisor trap return: pc<-sepc, privilege<-sstatus.SPP, SIE<-SPIE; with TSR=1, S-mode execution raises an illegal-instruction exception.
SRET uses opcode 1110011 (0x73), funct3 000, funct12 000100000010. The rs1 field selects the source register, the 12-bit immediate provides the second operand, and rd selects the destination.
SRET returns from a supervisor trap handler: pc is set to sepc, the current privilege mode is restored from sstatus.SPP, SIE is restored from SPIE, SPIE is set to 1, and SPP is cleared to 0. SRET can execute in S-mode or a higher privilege mode; if mstatus.TSR=1, S-mode execution raises an illegal-instruction exception. U-mode execution also raises an illegal-instruction exception.
SRET is a system-level instruction defined by the privileged architecture. This page covers architectural semantics only, not platform firmware policy.
Understand this scenario with real code like «sret # Return from S-mode trap».
No. These instructions are constrained by privilege level and extension support; user-mode legality must follow the privileged rules.
No. Address translation, instruction fetch, and data-memory ordering use different fence/invalidation instructions.