Alistair Francis wrote:
When the Ssdbltrp extension is enabled, SSTATUS.SDT field is cleared
when executing sret. When executing mret/mnret, SSTATUS.SDT is cleared
when returning to U, VS or VU and VSSTATUS.SDT is cleared when returning
to VU from HS.
I don't see mret being mentioned in the spec. Where do you see that
V/SSTATUS.SDT should be cleared?
Ssdbltrp specifies:
In S-mode, the SRET instruction sets sstatus.SDT to 0,
and if the new privilege mode is VU, it also sets
vsstatus.SDT to 0. However, in VS-mode, only vsstatus.SDT
is set to to 0.
The MRET instructions sets sstatus.SDT to 0, if the new
privilege mode is U, VS, or VU. Additionally, if it is
VU, then vsstatus.SDT is also set to 0.
Smdbltrp specifies:
The MRET and SRET instructions, when executed in M-mode,
set the MDT bit to 0. If the new privilege mode is U, VS,
or VU, then sstatus.SDT is also set to 0. Additionally,
if it is VU, then vsstatus.SDT is also set to 0.
The MNRET instruction sets the MDT bit to 0 if the new
privilege mode is not M. If it is U, VS, or VU, then
sstatus.SDT is also set to 0. Additionally, if it is VU,
then vsstatus.SDT is also set to 0.
regards
ved