Skip to content

Commit 810ef93

Browse files
authored
fix(data): rename operands to match Sail (#859)
1 parent 3d6a7ed commit 810ef93

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

backends/instructions_appendix/all_instructions.golden.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Instruction Appendix
22
:doctype: book
3-
:wavedrom: /home/uniqueusman/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

@@ -6155,13 +6155,13 @@ Atomic Read and Clear Bits in CSR with Immediate
61556155
Encoding::
61566156
[wavedrom, ,svg,subs='attributes',width="100%"]
61576157
....
6158-
{"reg":[{"bits":7,"name": 0x73,"type":2},{"bits":5,"name": "xd","type":4},{"bits":3,"name": 0x7,"type":2},{"bits":5,"name": "uimm","type":4},{"bits":12,"name": "csr","type":4}]}
6158+
{"reg":[{"bits":7,"name": 0x73,"type":2},{"bits":5,"name": "xd","type":4},{"bits":3,"name": 0x7,"type":2},{"bits":5,"name": "imm","type":4},{"bits":12,"name": "csr","type":4}]}
61596159
....
61606160

61616161
Description::
61626162
The CSRRCI variant is similar to CSRRC, except this updates the CSR using an XLEN-bit value obtained
6163-
by zero-extending a 5-bit unsigned immediate (uimm[4:0]) field encoded in the `xs1` field instead of a
6164-
value from an integer register. For CSRRCI, if the `uimm[4:0]` field is zero, then this instruction
6163+
by zero-extending a 5-bit unsigned immediate (imm[4:0]) field encoded in the `xs1` field instead of a
6164+
value from an integer register. For CSRRCI, if the `imm[4:0]` field is zero, then this instruction
61656165
will not write to the CSR, and shall not cause any of the side effects that might otherwise occur on
61666166
a CSR write, nor raise illegal-instruction exceptions on accesses to read-only CSRs. The CSRRCI will
61676167
always read the CSR and cause any read side effects regardless of `xd` and `xs1` fields.
@@ -6172,7 +6172,7 @@ Decode Variables::
61726172
|===
61736173
|Variable Name |Location
61746174
|csr |$encoding[31:20]
6175-
|uimm |$encoding[19:15]
6175+
|imm |$encoding[19:15]
61766176
|xd |$encoding[11:7]
61776177
|===
61786178

@@ -6237,13 +6237,13 @@ Atomic Read and Set Bits in CSR with Immediate
62376237
Encoding::
62386238
[wavedrom, ,svg,subs='attributes',width="100%"]
62396239
....
6240-
{"reg":[{"bits":7,"name": 0x73,"type":2},{"bits":5,"name": "xd","type":4},{"bits":3,"name": 0x6,"type":2},{"bits":5,"name": "uimm","type":4},{"bits":12,"name": "csr","type":4}]}
6240+
{"reg":[{"bits":7,"name": 0x73,"type":2},{"bits":5,"name": "xd","type":4},{"bits":3,"name": 0x6,"type":2},{"bits":5,"name": "imm","type":4},{"bits":12,"name": "csr","type":4}]}
62416241
....
62426242

62436243
Description::
62446244
The CSRRSI variant is similar to CSRRS, except this updates the CSR using an XLEN-bit value obtained
6245-
by zero-extending a 5-bit unsigned immediate (uimm[4:0]) field encoded in the `xs1` field instead of a
6246-
value from an integer register. For CSRRSI, if the `uimm[4:0]` field is zero, then this instruction
6245+
by zero-extending a 5-bit unsigned immediate (imm[4:0]) field encoded in the `xs1` field instead of a
6246+
value from an integer register. For CSRRSI, if the `imm[4:0]` field is zero, then this instruction
62476247
will not write to the CSR, and shall not cause any of the side effects that might otherwise occur on
62486248
a CSR write, nor raise illegal-instruction exceptions on accesses to read-only CSRs. The CSRRSI will
62496249
always read the CSR and cause any read side effects regardless of `xd` and `xs1` fields.
@@ -6254,7 +6254,7 @@ Decode Variables::
62546254
|===
62556255
|Variable Name |Location
62566256
|csr |$encoding[31:20]
6257-
|uimm |$encoding[19:15]
6257+
|imm |$encoding[19:15]
62586258
|xd |$encoding[11:7]
62596259
|===
62606260

@@ -19941,7 +19941,7 @@ No synopsis available
1994119941
Encoding::
1994219942
[wavedrom, ,svg,subs='attributes',width="100%"]
1994319943
....
19944-
{"reg":[{"bits":7,"name": 0x57,"type":2},{"bits":5,"name": "vd","type":4},{"bits":8,"name": 0x82,"type":2},{"bits":5,"name": "vs2","type":4},{"bits":1,"name": "vm","type":4},{"bits":6,"name": 0x10,"type":2}]}
19944+
{"reg":[{"bits":7,"name": 0x57,"type":2},{"bits":5,"name": "xd","type":4},{"bits":8,"name": 0x82,"type":2},{"bits":5,"name": "vs2","type":4},{"bits":1,"name": "vm","type":4},{"bits":6,"name": 0x10,"type":2}]}
1994519945
....
1994619946

1994719947
Description::
@@ -19954,7 +19954,7 @@ Decode Variables::
1995419954
|Variable Name |Location
1995519955
|vm |$encoding[25]
1995619956
|vs2 |$encoding[24:20]
19957-
|vd |$encoding[11:7]
19957+
|xd |$encoding[11:7]
1995819958
|===
1995919959

1996019960
Included in::

spec/std/isa/inst/V/vcpop.m.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ long_name: No synopsis available
1010
description: |
1111
No description available.
1212
definedBy: V
13-
assembly: vd, vs2, vm
13+
assembly: xd, vs2, vm
1414
encoding:
1515
match: 010000------10000010-----1010111
1616
variables:
1717
- name: vm
1818
location: 25-25
1919
- name: vs2
2020
location: 24-20
21-
- name: vd
21+
- name: xd
2222
location: 11-7
2323
access:
2424
s: always

spec/std/isa/inst/Zcd/c.fld.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ definedBy:
1818
- C
1919
- D
2020
- Zcd
21-
assembly: xd, imm(xs1)
21+
assembly: fd, imm(xs1)
2222
encoding:
2323
match: 001-----------00
2424
variables:

spec/std/isa/inst/Zcd/c.fsd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ definedBy:
1818
- C
1919
- D
2020
- Zcd
21-
assembly: xs2, imm(xs1)
21+
assembly: fs2, imm(xs1)
2222
encoding:
2323
match: 101-----------00
2424
variables:

spec/std/isa/inst/Zicsr/csrrci.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ name: csrrci
99
long_name: Atomic Read and Clear Bits in CSR with Immediate
1010
description: |
1111
The CSRRCI variant is similar to CSRRC, except this updates the CSR using an XLEN-bit value obtained
12-
by zero-extending a 5-bit unsigned immediate (uimm[4:0]) field encoded in the `xs1` field instead of a
13-
value from an integer register. For CSRRCI, if the `uimm[4:0]` field is zero, then this instruction
12+
by zero-extending a 5-bit unsigned immediate (imm[4:0]) field encoded in the `xs1` field instead of a
13+
value from an integer register. For CSRRCI, if the `imm[4:0]` field is zero, then this instruction
1414
will not write to the CSR, and shall not cause any of the side effects that might otherwise occur on
1515
a CSR write, nor raise illegal-instruction exceptions on accesses to read-only CSRs. The CSRRCI will
1616
always read the CSR and cause any read side effects regardless of `xd` and `xs1` fields.
1717
definedBy: Zicsr
18-
assembly: xd, csr, uimm
18+
assembly: xd, csr, imm
1919
encoding:
2020
match: -----------------111-----1110011
2121
variables:
2222
- name: csr
2323
location: 31-20
24-
- name: uimm
24+
- name: imm
2525
location: 19-15
2626
- name: xd
2727
location: 11-7
@@ -33,9 +33,9 @@ access:
3333
data_independent_timing: false
3434
pseudoinstructions:
3535
- when: xd == 0
36-
to: csrci csr,uimm
36+
to: csrci csr,imm
3737
operation(): |
38-
Boolean will_write = uimm != 0;
38+
Boolean will_write = imm != 0;
3939
4040
Csr csr_handle = direct_csr_lookup(csr);
4141
@@ -53,7 +53,7 @@ operation(): |
5353
if (will_write) {
5454
# set bits using the mask
5555
# performing any WARL transformations first
56-
XReg mask = uimm;
56+
XReg mask = imm;
5757
csr_sw_write(csr_handle, initial_csr_value & ~mask);
5858
}
5959

spec/std/isa/inst/Zicsr/csrrsi.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ name: csrrsi
99
long_name: Atomic Read and Set Bits in CSR with Immediate
1010
description: |
1111
The CSRRSI variant is similar to CSRRS, except this updates the CSR using an XLEN-bit value obtained
12-
by zero-extending a 5-bit unsigned immediate (uimm[4:0]) field encoded in the `xs1` field instead of a
13-
value from an integer register. For CSRRSI, if the `uimm[4:0]` field is zero, then this instruction
12+
by zero-extending a 5-bit unsigned immediate (imm[4:0]) field encoded in the `xs1` field instead of a
13+
value from an integer register. For CSRRSI, if the `imm[4:0]` field is zero, then this instruction
1414
will not write to the CSR, and shall not cause any of the side effects that might otherwise occur on
1515
a CSR write, nor raise illegal-instruction exceptions on accesses to read-only CSRs. The CSRRSI will
1616
always read the CSR and cause any read side effects regardless of `xd` and `xs1` fields.
1717
definedBy: Zicsr
18-
assembly: xd, csr, uimm
18+
assembly: xd, csr, imm
1919
encoding:
2020
match: -----------------110-----1110011
2121
variables:
2222
- name: csr
2323
location: 31-20
24-
- name: uimm
24+
- name: imm
2525
location: 19-15
2626
- name: xd
2727
location: 11-7
@@ -33,9 +33,9 @@ access:
3333
data_independent_timing: false
3434
pseudoinstructions:
3535
- when: xd == 0
36-
to: csrsi csr,uimm
36+
to: csrsi csr,imm
3737
operation(): |
38-
Boolean will_write = uimm != 0;
38+
Boolean will_write = imm != 0;
3939
4040
Csr csr_handle = direct_csr_lookup(csr);
4141
@@ -53,7 +53,7 @@ operation(): |
5353
if (will_write) {
5454
# set bits using the mask
5555
# performing any WARL transformations first
56-
XReg mask = uimm;
56+
XReg mask = imm;
5757
csr_sw_write(csr_handle, initial_csr_value | mask);
5858
}
5959

0 commit comments

Comments
 (0)