Skip to content

Commit 10dafd4

Browse files
authored
fix(data): be more clear that mret/sret return from traps (#1174)
Per ISA spec: > An MRET or SRET instruction is used to return from a trap in M-mode > or S-mode respectively. (Brought to my attention via riscv/sail-riscv#520 (comment))
1 parent 5d6c397 commit 10dafd4

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

backends/instructions_appendix/all_instructions.golden.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Instruction Appendix
22
:doctype: book
3-
:wavedrom: /workspaces/riscv-unified-db/node_modules/.bin/wavedrom-cli
3+
:wavedrom: /workspace/riscv-unified-db/node_modules/.bin/wavedrom-cli
44
// Now the document header is complete and the wavedrom attribute is active.
55

66

@@ -15998,7 +15998,7 @@ Included in::
1599815998
== mret
1599915999

1600016000
Synopsis::
16001-
Machine Exception Return
16001+
Machine-mode Return from Trap
1600216002

1600316003
Encoding::
1600416004
[wavedrom, ,svg,subs='attributes',width="100%"]
@@ -16007,7 +16007,7 @@ Encoding::
1600716007
....
1600816008

1600916009
Description::
16010-
Returns from an exception in M-mode.
16010+
Return from machine mode after handling a trap.
1601116011

1601216012

1601316013
Decode Variables::
@@ -19476,7 +19476,7 @@ Included in::
1947619476
== sret
1947719477

1947819478
Synopsis::
19479-
Supervisor Exception Return
19479+
Supervisor Mode Return from Trap
1948019480

1948119481
Encoding::
1948219482
[wavedrom, ,svg,subs='attributes',width="100%"]
@@ -19485,7 +19485,7 @@ Encoding::
1948519485
....
1948619486

1948719487
Description::
19488-
Returns from an exception.
19488+
Returns from supervisor mode after handling a trap.
1948919489

1949019490
When xref:insts:sret.adoc#udb:doc:inst:sret[sret] is allowed to execute, its behavior depends on whether or not the current privilege
1949119491
mode is virtualized.

spec/std/isa/inst/I/mret.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
$schema: "inst_schema.json#"
55
kind: instruction
66
name: mret
7-
long_name: Machine Exception Return
7+
long_name: Machine-mode Return from Trap
88
description: |
9-
Returns from an exception in M-mode.
9+
Return from machine mode after handling a trap.
1010
assembly: ""
1111
definedBy: Sm
1212
access:

spec/std/isa/inst/S/sret.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
$schema: "inst_schema.json#"
77
kind: instruction
88
name: sret
9-
long_name: Supervisor Exception Return
9+
long_name: Supervisor Mode Return from Trap
1010
description: |
11-
Returns from an exception.
11+
Returns from supervisor mode after handling a trap.
1212
1313
When `sret` is allowed to execute, its behavior depends on whether or not the current privilege
1414
mode is virtualized.

0 commit comments

Comments
 (0)