Skip to content

Clarify which Smdbltrp SRET behaviors are qualified by M-mode#2871

Open
aswaterman wants to merge 1 commit intomainfrom
fix-2870
Open

Clarify which Smdbltrp SRET behaviors are qualified by M-mode#2871
aswaterman wants to merge 1 commit intomainfrom
fix-2870

Conversation

@aswaterman
Copy link
Copy Markdown
Member

See #2870

@aswaterman aswaterman requested a review from ved-rivos April 10, 2026 23:48
@aswaterman
Copy link
Copy Markdown
Member Author

@Timmmm

@github-actions
Copy link
Copy Markdown

Normative Rule Changes Detected

This PR modifies normatively tagged text. Please review the changes below to ensure they are intentional.

View Detected Changes

Normative Tag Change Report

riscv-spec Specification

================================================================================
Tag Changes Report
================================================================================

Reference file: ref/riscv-spec-norm-tags.json
Current file: build/riscv-spec-norm-tags.json
Modified 1 tag:
  * "norm:mstatus_mdt_clr_mret_sret":
      Reference: "The MRET and SRET instructions, when executed in M-mode, set the MDT bit to 0."
      Current:   "The MDT bit is set to 0."

================================================================================
Summary: 1 total changes
  Added:    0
  Deleted:  0
  Modified: 1
================================================================================

What happens next:

  • This comment is informational only and does not block merging
  • When this PR is merged, a GitHub issue will be automatically created with the NormRules label for CSC tracking
  • If these changes are unintentional, please update the PR before merging

How to update reference files (if needed):

make update-ref
git add ref/*.json
git commit -m "Update normative tag reference files"

Note: New tags (additions) are automatically added to the reference files when PRs are merged to main. Only modifications and deletions require manual review.

This comment was automatically generated by the normative tag check workflow.

@ved-rivos
Copy link
Copy Markdown
Collaborator

ved-rivos commented Apr 12, 2026

LGTM. Left three suggestions.

an `SRET` instruction while the current privilege mode is M, has the following additional
effects.
[#norm:mstatus_mdt_clr_mret_sret]#The `MDT` bit is set to 0.#
[#norm:sstatus_sdt_clr_mret_sret]#If the new privilege mode is U, VS, or VU, then `sstatus.SDT` is also set to 0.#
Copy link
Copy Markdown
Collaborator

@ved-rivos ved-rivos Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[#norm:sstatus_sdt_clr_mret_sret]#If the new privilege mode is U, VS, or VU, then `sstatus.SDT` is also set to 0.#
[#norm:sstatus_sdt_clr_mret_sret]#If the Ssdbltrp extension is also implemented, and the new privilege mode is U, VS, or VU, then `sstatus.SDT` is also set to 0.#

[#norm:sstatus_sdt_clr_mret_sret]#If the new privilege mode is U, VS, or VU, then `sstatus.SDT` is also set to 0.#
[#norm:vsstatus_sdt_clr_mret_sret]#Additionally, if it is VU, then `vsstatus.SDT` is also set to 0.#

[#norm:mstatus_mdt_clr_mnret]#The `MNRET` instruction, provided by the Smrnmi extension, sets the `MDT` bit to 0 if the new privilege mode is not M.#
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[#norm:mstatus_mdt_clr_mnret]#When the Smdbltrp extension is implemented, the `MNRET` instruction, provided by the Smrnmi extension, sets the `MDT` bit to 0 if the new privilege mode is not M.#

[#norm:vsstatus_sdt_clr_mret_sret]#Additionally, if it is VU, then `vsstatus.SDT` is also set to 0.#

[#norm:mstatus_mdt_clr_mnret]#The `MNRET` instruction, provided by the Smrnmi extension, sets the `MDT` bit to 0 if the new privilege mode is not M.#
[#norm:sstatus_sdt_clr_mnret]#If it is U, VS, or VU, then `sstatus.SDT` is also set to 0.#
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[#norm:sstatus_sdt_clr_mnret]#If the Ssdbltrp extension is also implemented, and the new privilege mode is U, VS, or VU, then `sstatus.SDT` is also set to 0.#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants