Skip to content

Commit b4cb645

Browse files
do chore:update_golden_appendix
1 parent 992a0cf commit b4cb645

File tree

3 files changed

+75
-118
lines changed

3 files changed

+75
-118
lines changed

backends/instructions_appendix/all_instructions.golden.adoc

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,6 @@ Encoding::
569569
Description::
570570
This instruction implements the rotation, SubBytes and Round Constant addition steps of the AES
571571
block cipher Key Schedule.
572-
573-
574572
`rnum` must be in the range `0x0..0xA`. The values `0xB..0xF` are reserved.
575573

576574

@@ -7268,7 +7266,7 @@ Encoding::
72687266
....
72697267

72707268
Description::
7271-
The xref:insts:fadd_d.adoc#udb:doc:inst:fadd_d[fadd.d] instruction is analogous to xref:insts:fadd_s.adoc#udb:doc:inst:fadd_s[fadd.s] and performs double-precision floating-point addition between
7269+
The xref:insts:fadd_d.adoc#udb:doc:inst:fadd_d[fadd.d] instruction is analogous to xref:insts:fadd_s.adoc#udb:doc:inst:fadd_s[fadd.s] and performs double-precision floating-point addition of
72727270
`fs1` and `fs2` and writes the final result to `fd`.
72737271

72747272

@@ -7387,7 +7385,7 @@ Encoding::
73877385
....
73887386

73897387
Description::
7390-
The xref:insts:fadd_s.adoc#udb:doc:inst:fadd_s[fadd.s] instruction performs single-precision floating-point addition of `xs1` and `xs2`
7388+
The xref:insts:fadd_s.adoc#udb:doc:inst:fadd_s[fadd.s] instruction performs single-precision floating-point addition of `fs1` and `fs2`
73917389
and writes the final result to `fd`.
73927390

73937391

@@ -10622,8 +10620,7 @@ Encoding::
1062210620
....
1062310621

1062410622
Description::
10625-
The
10626-
The xref:insts:fli_q.adoc#udb:doc:inst:fli_q[fli.q] instruction loads one of 32 quad-precision floating-point constants, encoded in the `rs1`
10623+
The xref:insts:fli_q.adoc#udb:doc:inst:fli_q[fli.q] instruction loads one of 32 quad-precision floating-point constants, encoded in the `xs1`
1062710624
field, into floating-point register `rd`.
1062810625
xref:insts:fli_q.adoc#udb:doc:inst:fli_q[fli.q] is encoded like xref:insts:fmv_w_x.adoc#udb:doc:inst:fmv_w_x[fmv.w.x], but with _fmt_ = Q.
1062910626

@@ -12246,7 +12243,7 @@ Included in::
1224612243
== fmv.d.x
1224712244

1224812245
Synopsis::
12249-
Floating-Point Move from Integer Register to Double-Precision Register
12246+
Floating-Point Move Double-Precision from Integer Register
1225012247

1225112248
Assembly::
1225212249
fmv.d.x fd, xs1
@@ -12365,7 +12362,7 @@ Included in::
1236512362
== fmv.x.d
1236612363

1236712364
Synopsis::
12368-
Floating-Point Move from Double-Precision Register to Integer Register
12365+
Floating-Point Move Double-Precision to Integer Register
1236912366

1237012367
Assembly::
1237112368
fmv.x.d xd, fs1
@@ -12631,7 +12628,7 @@ Encoding::
1263112628
Description::
1263212629
The xref:insts:fmvp_q_x.adoc#udb:doc:inst:fmvp_q_x[fmvp.q.x] instruction moves a double-precision number from a pair of integer registers into
1263312630
a floating-point register.
12634-
Integer registers xs1 and xs2 supply bits 63:0 and 127:64, respectively; the result is written to
12631+
Integer registers `xs1` and `xs2` supply bits 63:0 and 127:64, respectively; the result is written to
1263512632
floating-point register `fd`.
1263612633
xref:insts:fmvp_q_x.adoc#udb:doc:inst:fmvp_q_x[fmvp.q.x] is encoded in the OP-FP major opcode with _funct3_=0 and _funct7_=1011011.
1263712634

spec/schemas/schema_defs.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,26 +102,19 @@
102102
{
103103
"type": "array",
104104
"items": {
105-
"$ref": "#/$defs/tagged_text"
105+
"$ref": "#/$defs/conditional_text"
106106
}
107107
}
108108
]
109109
},
110-
"tagged_text": {
110+
"conditional_text": {
111111
"type": "object",
112-
"required": ["id", "text", "normative"],
112+
"required": ["text"],
113113
"properties": {
114-
"id": {
115-
"type": "string",
116-
"description": "Unique identifier for the statement"
117-
},
118114
"text": {
119115
"type": "string",
120116
"description": "Asciidoctor source"
121117
},
122-
"normative": {
123-
"type": "boolean"
124-
},
125118
"when()": {
126119
"type": "string",
127120
"description": "IDL boolean expression. When true, the text applies"

spec/std/isa/csr/hstatus.yaml

Lines changed: 66 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ fields:
2323
location: 33-32
2424
base: 64
2525
description:
26-
- id: csr-hstatus-vsxl-values
27-
normative: false
28-
text: |
26+
- text: |
2927
Determines the effective XLEN in VS-mode. Valid values are:
3028
3129
[separator="!"]
@@ -36,14 +34,12 @@ fields:
3634
! 1 ! 64
3735
!===
3836
when(): return VSXLEN == 3264;
39-
- id: csr-hstatus-vsxl-rv32
40-
normative: false
41-
text: |
37+
38+
- text: |
4239
Because the implementation only supports a single VSXLEN == 32, this field is read-only-0.
4340
when(): return VSXLEN == 32;
44-
- id: csr-hstatus-vsxl-rv64
45-
normative: false
46-
text: |
41+
42+
- text: |
4743
Because the implementation only supports a single VSXLEN == 64, this field is read-only-1.
4844
when(): return VSXLEN == 64;
4945
@@ -77,76 +73,64 @@ fields:
7773
VTSR:
7874
location: 22
7975
long_name: Virtual Trap SRET
80-
description:
81-
- id: csr-hstatus-vtsr-behavior
82-
normative: false
83-
text: |
84-
When `hstatus.VTSR` is set, executing the `sret` instruction in VS-mode
85-
raises a `Virtual Instruction` exception.
86-
87-
When `hstatus.VTSR` is clear, an `sret` instruction in VS-mode returns control
88-
to the mode stored in `vsstatus.SPP`.
76+
description: |
77+
When `hstatus.VTSR` is set, executing the `sret` instruction in VS-mode
78+
raises a `Virtual Instruction` exception.
79+
80+
When `hstatus.VTSR` is clear, an `sret` instruction in VS-mode returns control
81+
to the mode stored in `vsstatus.SPP`.
8982
type: RW
9083
reset_value: UNDEFINED_LEGAL
9184
VTW:
9285
location: 21
9386
long_name: Virtual Trap WFI
94-
description:
95-
- id: csr-hstatus-vtw-behavior
96-
normative: false
97-
text: |
98-
When `hstatus.VTW` is set, a `wfi` instruction executed in VS-mode raises
99-
a `Virtual Instruction` exception after waiting an implementation-defined
100-
amount of time (which can be 0).
87+
description: |
88+
When `hstatus.VTW` is set, a `wfi` instruction executed in VS-mode raises
89+
a `Virtual Instruction` exception after waiting an implementation-defined
90+
amount of time (which can be 0).
10191
102-
When both `hstatus.VTW` and `mstatus.TW` are clear, a `wfi` instruction
103-
executes in VS-mode without a timeout period.
92+
When both `hstatus.VTW` and `mstatus.TW` are clear, a `wfi` instruction
93+
executes in VS-mode without a timeout period.
10494
105-
The `wfi` instruction is also affected by `mstatus.TW`, as shown below:
95+
The `wfi` instruction is also affected by `mstatus.TW`, as shown below:
10696
107-
[separator="!",%autowidth,%footer]
108-
!===
109-
.2+! [.rotate]#`mstatus.TW`# .2+! [.rotate]#`hstatus.VTW`# 4+^.>! `wfi` behavior
110-
h! HS-mode h! U-mode h! VS-mode h! VU-mode
97+
[separator="!",%autowidth,%footer]
98+
!===
99+
.2+! [.rotate]#`mstatus.TW`# .2+! [.rotate]#`hstatus.VTW`# 4+^.>! `wfi` behavior
100+
h! HS-mode h! U-mode h! VS-mode h! VU-mode
111101
112-
! 0 ! 0 ! Wait ! Trap (I) ! Wait ! Trap (V)
113-
! 0 ! 1 ! Wait ! Trap (I) ! Trap (V) ! Trap (V)
114-
! 1 ! - ! Trap (I) ! Trap (I) ! Trap (I) ! Trap (I)
102+
! 0 ! 0 ! Wait ! Trap (I) ! Wait ! Trap (V)
103+
! 0 ! 1 ! Wait ! Trap (I) ! Trap (V) ! Trap (V)
104+
! 1 ! - ! Trap (I) ! Trap (I) ! Trap (I) ! Trap (I)
115105
116-
6+! Trap (I) - Trap with `Illegal Instruction` code +
117-
Trap (V) - Trap with `Virtual Instruction` code
118-
!===
106+
6+! Trap (I) - Trap with `Illegal Instruction` code +
107+
Trap (V) - Trap with `Virtual Instruction` code
108+
!===
119109
type: RW
120110
reset_value: UNDEFINED_LEGAL
121111
VTVM:
122112
location: 20
123113
long_name: Virtual Trap Virtual Memory
124-
description:
125-
- id: csr-hstatus-vtvm-behavior
126-
normative: false
127-
text: |
128-
When set, a 'Virtual Instruction` trap occurs when executing an `sfence.vma`, `sinval.vma`,
129-
or an explicit CSR access of the `satp` (really `vsatp`) register when in VS-mode.
114+
description: |
115+
When set, a 'Virtual Instruction` trap occurs when executing an `sfence.vma`, `sinval.vma`,
116+
or an explicit CSR access of the `satp` (really `vsatp`) register when in VS-mode.
130117
131-
When clear, the instructions execute as normal in VS-mode.
118+
When clear, the instructions execute as normal in VS-mode.
132119
133-
Notably, `hstatus.VTVM` does *not* cause `hfence.vvma`, `sfence.w.inval`, or `sfence.inval.ir` to trap.
120+
Notably, `hstatus.VTVM` does *not* cause `hfence.vvma`, `sfence.w.inval`, or `sfence.inval.ir` to trap.
134121
135-
`mstatus.TVM` does not affect the VS-mode instructions controlled by `hstatus.TVTM`.
122+
`mstatus.TVM` does not affect the VS-mode instructions controlled by `hstatus.TVTM`.
136123
type: RW
137124
reset_value: UNDEFINED_LEGAL
138125
VGEIN:
139126
location: 17-12
140127
long_name: Virtual Guest External Interrupt Number
141-
description:
142-
- id: csr-hstatus-vgein-behavior
143-
normative: false
144-
text: |
145-
Selects the guest external interrupt source for VS-level external interrupts.
128+
description: |
129+
Selects the guest external interrupt source for VS-level external interrupts.
146130
147-
When `hstatus.VGEIN` == 0, no external interrupt source is selected.
131+
When `hstatus.VGEIN` == 0, no external interrupt source is selected.
148132
149-
When `hstatus.VGEIN` != 0, it selects which bit of `hgeip` is currently active in VS-mode.
133+
When `hstatus.VGEIN` != 0, it selects which bit of `hgeip` is currently active in VS-mode.
150134
151135
type(): |
152136
# if NUM_EXTERNAL_GUEST_INTERRUPTS+1 is 63 (because indexing in `hgeip` starts at 1),
@@ -169,92 +153,75 @@ fields:
169153
HU:
170154
location: 9
171155
long_name: Hypervisor in U-mode
172-
description:
173-
- id: csr-hstatus-hu-behavior
174-
normative: false
175-
text: |
176-
When set, the hypervisor load/store instructions (`hlv`, `hlvx`, and `hsv`) can be
177-
executed in U-mode.
156+
description: |
157+
When set, the hypervisor load/store instructions (`hlv`, `hlvx`, and `hsv`) can be
158+
executed in U-mode.
178159
179-
When clear, the hypervisor load/store instructions cause an `Illegal Instruction` trap.
160+
When clear, the hypervisor load/store instructions cause an `Illegal Instruction` trap.
180161
type: RW
181162
reset_value: UNDEFINED_LEGAL
182163
SPVP:
183164
location: 8
184165
long_name: Supervisor Previous Virtual Privilege
185-
description:
186-
- id: csr-hstatus-spvp-behavior
187-
normative: false
188-
text: |
189-
Written by hardware:
166+
description: |
167+
Written by hardware:
190168
191-
* When taking a trap into HS-mode from VS-mode or VU-mode, `hstatus.SPVP` is written with the nominal privilege mode
169+
* When taking a trap into HS-mode from VS-mode or VU-mode, `hstatus.SPVP` is written with the nominal privilege mode
192170
193-
Notably, unlike its analog `mstatus.SPP`, `hstatus.SPVP` is *not* cleared when returning from a trap.
171+
Notably, unlike its analog `mstatus.SPP`, `hstatus.SPVP` is *not* cleared when returning from a trap.
194172
195-
Can also be written by software without immediate side-effect.
173+
Can also be written by software without immediate side-effect.
196174
197-
Affects execution by:
175+
Affects execution by:
198176
199-
* Controls the effective privilege level applied to the hypervisor load/store instructions, `hlv`, `hlvx`, and `hsv`.
177+
* Controls the effective privilege level applied to the hypervisor load/store instructions, `hlv`, `hlvx`, and `hsv`.
200178
type: RW
201179
reset_value: UNDEFINED_LEGAL
202180
SPV:
203181
location: 7
204182
long_name: Supervisor Previous Virtualization Mode
205-
description:
206-
- id: csr-hstatus-spv-behavior
207-
normative: false
208-
text: |
209-
Written by hardware:
183+
description: |
184+
Written by hardware:
210185
211-
* On a trap into HS-mode, hardware writes 1 when the prior mode was VS-mode or VU-mode, and 0 otherwise.
186+
* On a trap into HS-mode, hardware writes 1 when the prior mode was VS-mode or VU-mode, and 0 otherwise.
212187
213-
Can also be written by software without immediate side-effect.
188+
Can also be written by software without immediate side-effect.
214189
215-
Affects execution by:
190+
Affects execution by:
216191
217-
* When an `sret` instruction in executed in HS-mode or M-mode,
218-
control returns to VS-mode or VU-mode (as selected by `mstatus.SPP`) when
219-
`hstatus.SPV` is 1 and to HS-mode or U-mode otherwise.
192+
* When an `sret` instruction in executed in HS-mode or M-mode,
193+
control returns to VS-mode or VU-mode (as selected by `mstatus.SPP`) when
194+
`hstatus.SPV` is 1 and to HS-mode or U-mode otherwise.
220195
type: RW
221196
reset_value: UNDEFINED_LEGAL
222197
GVA:
223198
location: 6
224199
long_name: Guest Virtual Address
225-
description:
226-
- id: csr-hstatus-gva-behavior
227-
normative: false
228-
text: |
229-
Written by hardware whenever a trap is taken into HS-mode:
200+
description: |
201+
Written by hardware whenever a trap is taken into HS-mode:
230202
231-
* Writes 1 when a trap causes a guest virtual address to be written into `stval` (`Breakpoint`, `* Address Misaligned`, `* Access Fault`, `* Page Fault`, or `* Guest-Page Fault`).
232-
* Writes 0 otherwise
203+
* Writes 1 when a trap causes a guest virtual address to be written into `stval` (`Breakpoint`, `* Address Misaligned`, `* Access Fault`, `* Page Fault`, or `* Guest-Page Fault`).
204+
* Writes 0 otherwise
233205
234-
Does not affect execution.
206+
Does not affect execution.
235207
type: RW
236208
reset_value: UNDEFINED_LEGAL
237209
VSBE:
238210
location: 5
239211
long_name: VS-mode Big Endian
240212
description:
241-
- id: csr-hstatus-vgein-behavior
242-
normative: false
243-
text: |
213+
- text: |
244214
Controls the endianness of data VS-mode (0 = little, 1 = big).
245215
Instructions are always little endian, regardless of the data setting.
246216
247-
- id: csr-hstatus-vgein-little-endian
248-
normative: false
249-
text: |
217+
- text: |
250218
Since the CPU does not support big endian in VS-mode, this is hardwired to 0.
251219
when(): return VS_MODE_ENDIANNESS == "little";
252220
253-
- id: csr-hstatus-vgein-big-endian
254-
normative: false
255-
text: |
221+
- text: |
256222
Since the CPU does not support little endian in VS-mode, this is hardwired to 1.
257223
when(): return VS_MODE_ENDIANNESS == "big";
224+
258225
type(): |
259226
if (VS_MODE_ENDIANNESS == "dynamic") {
260227
# mode is mutable

0 commit comments

Comments
 (0)