Hi folks,
I'm a little unclear about the following in the RISC-V User-Level ISA V2.2 spec (p.41):
The SC must fail if ... in the meantime the hart executed a privileged exception-return instruction.
I presume "meantime" means since a lr instruction was last executed. Regarding "privileged exception-return instruction", does that just refer to an sret or mret instruction executed at any privilege level for which it's legal? Or does it also include a uret instruction? If it includes a uret, does it include execution at any privilege level (including U), or just at S or M level?
I know these include corner cases unlikely to be used in practice, but it would be good to have a clear and consistent specification. For cases that are unlikely to be used, specifying something simple to implement would be good (eg, any uret/sret/mret executed in any mode).
Thanks, and cheers,
PA
-- Peter Ashenden, CTO IC Design, ASTC