Skip to content

Commit 42acc68

Browse files
authored
fix(data): fix remaining old register names (#808)
- `rd` to `xd` - `rs1` to `xs1` - `rs2` to `xs2` Fix a few cases where a `$` appeared before the register name. Add a few missing "long_names".
1 parent 953aa50 commit 42acc68

File tree

14 files changed

+150
-150
lines changed

14 files changed

+150
-150
lines changed

arch/inst/C/c.add.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ kind: instruction
55
name: c.add
66
long_name: Add
77
description: |
8-
Add the value in rs2 to rd, and store the result in rd.
9-
C.ADD expands into `add rd, rd, rs2`.
8+
Add the value in xs2 to xd, and store the result in xd.
9+
C.ADD expands into `add xd, xd, xs2`.
1010
definedBy:
1111
anyOf:
1212
- C
1313
- Zca
14-
assembly: xd, rs2
14+
assembly: xd, xs2
1515
encoding:
1616
match: 1001----------10
1717
variables:
18-
- name: rs2
18+
- name: xs2
1919
location: 6-2
2020
not: 0
21-
- name: rd
21+
- name: xd
2222
location: 11-7
2323
not: 0
2424
access:
@@ -27,9 +27,9 @@ access:
2727
vs: always
2828
vu: always
2929
operation(): |
30-
XReg t0 = X[rd];
31-
XReg t1 = X[rs2];
32-
X[rd] = t0 + t1;
30+
XReg t0 = X[xd];
31+
XReg t1 = X[xs2];
32+
X[xd] = t0 + t1;
3333
3434
# SPDX-SnippetBegin
3535
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

arch/inst/C/c.addw.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ kind: instruction
55
name: c.addw
66
long_name: Add word
77
description: |
8-
Add the 32-bit values in rs2 from rd, and store the result in rd.
9-
The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15).
10-
C.ADDW expands into `addw rd, rd, rs2`.
8+
Add the 32-bit values in xs2 from xd, and store the result in xd.
9+
The xd and xs2 register indexes should be used as xd+8 and xs2+8 (registers x8-x15).
10+
C.ADDW expands into `addw xd, xd, xs2`.
1111
definedBy:
1212
anyOf:
1313
- C
1414
- Zca
1515
base: 64
16-
assembly: xd, rs2
16+
assembly: xd, xs2
1717
encoding:
1818
match: 100111---01---01
1919
variables:
20-
- name: rs2
20+
- name: xs2
2121
location: 4-2
22-
- name: rd
22+
- name: xd
2323
location: 9-7
2424
access:
2525
s: always
2626
u: always
2727
vs: always
2828
vu: always
2929
operation(): |
30-
Bits<32> t0 = X[creg2reg(rd)][31:0];
31-
Bits<32> t1 = X[creg2reg(rs2)][31:0];
32-
X[creg2reg(rd)] = $signed(t0 + t1);
30+
Bits<32> t0 = X[creg2reg(xd)][31:0];
31+
Bits<32> t1 = X[creg2reg(xs2)][31:0];
32+
X[creg2reg(xd)] = $signed(t0 + t1);
3333
3434
# SPDX-SnippetBegin
3535
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

arch/inst/C/c.and.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@ kind: instruction
55
name: c.and
66
long_name: And
77
description: |
8-
And rd with rs2, and store the result in rd
9-
The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15).
10-
C.AND expands into `and rd, rd, rs2`.
8+
And xd with xs2, and store the result in xd
9+
The xd and xs2 register indexes should be used as xd+8 and xs2+8 (registers x8-x15).
10+
C.AND expands into `and xd, xd, xs2`.
1111
definedBy:
1212
anyOf:
1313
- C
1414
- Zca
15-
assembly: xd, rs2
15+
assembly: xd, xs2
1616
encoding:
1717
match: 100011---11---01
1818
variables:
19-
- name: rs2
19+
- name: xs2
2020
location: 4-2
21-
- name: rd
21+
- name: xd
2222
location: 9-7
2323
access:
2424
s: always
2525
u: always
2626
vs: always
2727
vu: always
2828
operation(): |
29-
XReg t0 = X[creg2reg(rd)];
30-
XReg t1 = X[creg2reg(rs2)];
31-
X[creg2reg(rd)] = t0 & t1;
29+
XReg t0 = X[creg2reg(xd)];
30+
XReg t1 = X[creg2reg(xs2)];
31+
X[creg2reg(xd)] = t0 & t1;
3232
3333
# SPDX-SnippetBegin
3434
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

arch/inst/C/c.or.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@ kind: instruction
55
name: c.or
66
long_name: Or
77
description: |
8-
Or rd with rs2, and store the result in rd
9-
The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15).
10-
C.OR expands into `or rd, rd, rs2`.
8+
Or xd with xs2, and store the result in xd
9+
The xd and xs2 register indexes should be used as xd+8 and xs2+8 (registers x8-x15).
10+
C.OR expands into `or xd, xd, xs2`.
1111
definedBy:
1212
anyOf:
1313
- C
1414
- Zca
15-
assembly: xd, rs2
15+
assembly: xd, xs2
1616
encoding:
1717
match: 100011---10---01
1818
variables:
19-
- name: rs2
19+
- name: xs2
2020
location: 4-2
21-
- name: rd
21+
- name: xd
2222
location: 9-7
2323
access:
2424
s: always
2525
u: always
2626
vs: always
2727
vu: always
2828
operation(): |
29-
XReg t0 = X[creg2reg(rd)];
30-
XReg t1 = X[creg2reg(rs2)];
31-
X[creg2reg(rd)] = t0 | t1;
29+
XReg t0 = X[creg2reg(xd)];
30+
XReg t1 = X[creg2reg(xs2)];
31+
X[creg2reg(xd)] = t0 | t1;
3232
3333
# SPDX-SnippetBegin
3434
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

arch/inst/C/c.sub.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@ kind: instruction
55
name: c.sub
66
long_name: Subtract
77
description: |
8-
Subtract the value in rs2 from rd, and store the result in rd.
9-
The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15).
10-
C.SUB expands into `sub rd, rd, rs2`.
8+
Subtract the value in xs2 from xd, and store the result in xd.
9+
The xd and xs2 register indexes should be used as xd+8 and xs2+8 (registers x8-x15).
10+
C.SUB expands into `sub xd, xd, xs2`.
1111
definedBy:
1212
anyOf:
1313
- C
1414
- Zca
15-
assembly: xd, rs2
15+
assembly: xd, xs2
1616
encoding:
1717
match: 100011---00---01
1818
variables:
19-
- name: rs2
19+
- name: xs2
2020
location: 4-2
21-
- name: rd
21+
- name: xd
2222
location: 9-7
2323
access:
2424
s: always
2525
u: always
2626
vs: always
2727
vu: always
2828
operation(): |
29-
XReg t0 = X[creg2reg(rd)];
30-
XReg t1 = X[creg2reg(rs2)];
31-
X[creg2reg(rd)] = t0 - t1;
29+
XReg t0 = X[creg2reg(xd)];
30+
XReg t1 = X[creg2reg(xs2)];
31+
X[creg2reg(xd)] = t0 - t1;
3232
3333
# SPDX-SnippetBegin
3434
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

arch/inst/C/c.subw.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ kind: instruction
55
name: c.subw
66
long_name: Subtract word
77
description: |
8-
Subtract the 32-bit values in rs2 from rd, and store the result in rd.
9-
The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15).
10-
C.SUBW expands into `subw rd, rd, rs2`.
8+
Subtract the 32-bit values in xs2 from xd, and store the result in xd.
9+
The xd and xs2 register indexes should be used as xd+8 and xs2+8 (registers x8-x15).
10+
C.SUBW expands into `subw xd, xd, xs2`.
1111
definedBy:
1212
anyOf:
1313
- C
1414
- Zca
1515
base: 64
16-
assembly: xd, rs2
16+
assembly: xd, xs2
1717
encoding:
1818
match: 100111---00---01
1919
variables:
20-
- name: rs2
20+
- name: xs2
2121
location: 4-2
22-
- name: rd
22+
- name: xd
2323
location: 9-7
2424
access:
2525
s: always
2626
u: always
2727
vs: always
2828
vu: always
2929
operation(): |
30-
Bits<32> t0 = X[creg2reg(rd)][31:0];
31-
Bits<32> t1 = X[creg2reg(rs2)][31:0];
32-
X[creg2reg(rd)] = sext(t0 - t1, 31);
30+
Bits<32> t0 = X[creg2reg(xd)][31:0];
31+
Bits<32> t1 = X[creg2reg(xs2)][31:0];
32+
X[creg2reg(xd)] = sext(t0 - t1, 31);
3333
3434
# SPDX-SnippetBegin
3535
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

arch/inst/C/c.xor.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@ kind: instruction
55
name: c.xor
66
long_name: Exclusive Or
77
description: |
8-
Exclusive or rd with rs2, and store the result in rd
9-
The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15).
10-
C.XOR expands into `xor rd, rd, rs2`.
8+
Exclusive or xd with xs2, and store the result in xd
9+
The xd and xs2 register indexes should be used as xd+8 and xs2+8 (registers x8-x15).
10+
C.XOR expands into `xor xd, xd, xs2`.
1111
definedBy:
1212
anyOf:
1313
- C
1414
- Zca
15-
assembly: xd, rs2
15+
assembly: xd, xs2
1616
encoding:
1717
match: 100011---01---01
1818
variables:
19-
- name: rs2
19+
- name: xs2
2020
location: 4-2
21-
- name: rd
21+
- name: xd
2222
location: 9-7
2323
access:
2424
s: always
2525
u: always
2626
vs: always
2727
vu: always
2828
operation(): |
29-
XReg t0 = X[creg2reg(rd)];
30-
XReg t1 = X[creg2reg(rs2)];
31-
X[creg2reg(rd)] = t0 ^ t1;
29+
XReg t0 = X[creg2reg(xd)];
30+
XReg t1 = X[creg2reg(xs2)];
31+
X[creg2reg(xd)] = t0 ^ t1;
3232
3333
# SPDX-SnippetBegin
3434
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

arch/inst/F/froundnx.s.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
$schema: "inst_schema.json#"
44
kind: instruction
55
name: froundnx.s
6-
long_name: No synopsis available
6+
long_name: Floating-point Round Single-precision to Integer with Inexact
77
description: |
88
No description available.
99
definedBy: Zfa
10-
assembly: fd, rs1, rm
10+
assembly: fd, xs1, rm
1111
encoding:
1212
match: 010000000101-------------1010011
1313
variables:
14-
- name: rs1
14+
- name: xs1
1515
location: 19-15
1616
- name: rm
1717
location: 14-12

arch/inst/Zfh/flh.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ description: |
1313
1414
definedBy:
1515
anyOf: [Zfh, Zfhmin, Zhinx]
16-
assembly: xd, imm12($rs1)
16+
assembly: xd, imm12(xs1)
1717
encoding:
1818
match: -----------------001-----0000111
1919
variables:
2020
- name: imm
2121
location: 31-20
22-
- name: rs1
22+
- name: xs1
2323
location: 19-15
2424
- name: fd
2525
location: 11-7
@@ -31,7 +31,7 @@ access:
3131
operation(): |
3232
check_f_ok($encoding);
3333
34-
XReg virtual_address = X[rs1] + $signed(imm);
34+
XReg virtual_address = X[xs1] + $signed(imm);
3535
3636
Bits<16> hp_value = read_memory<16>(virtual_address, $encoding);
3737

arch/inst/Zfh/fli.h.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
$schema: inst_schema.json#
44
kind: instruction
55
name: fli.h
6-
long_name: No synopsis available
6+
long_name: Floating-point Load Immediate Half-precision
77
description: |
88
No description available.
99
definedBy:
1010
allOf: [Zfa, Zfh]
11-
assembly: rd, imm
11+
assembly: fd, imm
1212
encoding:
1313
match: 111101000001-----000-----1010011
1414
variables:
15-
- name: rs1
15+
- name: imm
1616
location: 19-15
17-
- name: rd
17+
- name: fd
1818
location: 11-7
1919
access:
2020
s: always

0 commit comments

Comments
 (0)