Skip to content

Commit 0b879ff

Browse files
authored
fix(data): fix cases where GPR register file used instead of FPR (#858)
Fixes #777.
1 parent 590fc15 commit 0b879ff

File tree

213 files changed

+1991
-1991
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+1991
-1991
lines changed

backends/instructions_appendix/all_instructions.golden.adoc

Lines changed: 968 additions & 968 deletions
Large diffs are not rendered by default.

spec/std/isa/inst/B/andn.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ kind: instruction
88
name: andn
99
long_name: AND with inverted operand
1010
description: |
11-
Performs the bitwise logical AND operation between `rs1` and the
12-
bitwise inversion of `rs2`.
11+
Performs the bitwise logical AND operation between `xs1` and the
12+
bitwise inversion of `xs2`.
1313
definedBy:
1414
anyOf: [Zbb, Zbkb]
1515
assembly: xd, xs1, xs2

spec/std/isa/inst/B/clmul.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ assembly: xd, xs1, xs2
1515
encoding:
1616
match: 0000101----------001-----0110011
1717
variables:
18-
- name: rs2
18+
- name: xs2
1919
location: 24-20
20-
- name: rs1
20+
- name: xs1
2121
location: 19-15
22-
- name: rd
22+
- name: xd
2323
location: 11-7
2424
access:
2525
s: always
@@ -32,17 +32,17 @@ operation(): |
3232
raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
3333
}
3434
35-
XReg rs1_val = X[rs1];
36-
XReg rs2_val = X[rs2];
35+
XReg xs1_val = X[xs1];
36+
XReg xs2_val = X[xs2];
3737
XReg output = 0;
3838
3939
for (U32 i=0; i < xlen(); i++) {
40-
output = (((rs2_val >> i) & 1) == 1)
41-
? output ^ (rs1_val << i)
40+
output = (((xs2_val >> i) & 1) == 1)
41+
? output ^ (xs1_val << i)
4242
: output;
4343
}
4444
45-
X[rd] = output;
45+
X[xd] = output;
4646
4747
# SPDX-SnippetBegin
4848
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

spec/std/isa/inst/B/clmulh.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ assembly: xd, xs1, xs2
1515
encoding:
1616
match: 0000101----------011-----0110011
1717
variables:
18-
- name: rs2
18+
- name: xs2
1919
location: 24-20
20-
- name: rs1
20+
- name: xs1
2121
location: 19-15
22-
- name: rd
22+
- name: xd
2323
location: 11-7
2424
access:
2525
s: always
@@ -32,17 +32,17 @@ operation(): |
3232
raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
3333
}
3434
35-
XReg rs1_val = X[rs1];
36-
XReg rs2_val = X[rs2];
35+
XReg xs1_val = X[xs1];
36+
XReg xs2_val = X[xs2];
3737
XReg output = 0;
3838
3939
for (U32 i=1; i <= xlen(); i++) {
40-
output = (((rs2_val >> i) & 1) == 1)
41-
? output ^ (rs1_val >> (xlen() - i))
40+
output = (((xs2_val >> i) & 1) == 1)
41+
? output ^ (xs1_val >> (xlen() - i))
4242
: output;
4343
}
4444
45-
X[rd] = output;
45+
X[xd] = output;
4646
4747
# SPDX-SnippetBegin
4848
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

spec/std/isa/inst/B/orn.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ kind: instruction
88
name: orn
99
long_name: OR with inverted operand
1010
description: |
11-
Performs the bitwise logical OR operation between rs1 and the bitwise inversion of rs2.
11+
Performs the bitwise logical OR operation between xs1 and the bitwise inversion of xs2.
1212
definedBy:
1313
anyOf: [Zbb, Zbkb]
1414
assembly: xd, xs1, xs2
1515
encoding:
1616
match: 0100000----------110-----0110011
1717
variables:
18-
- name: rs2
18+
- name: xs2
1919
location: 24-20
20-
- name: rs1
20+
- name: xs1
2121
location: 19-15
22-
- name: rd
22+
- name: xd
2323
location: 11-7
2424
access:
2525
s: always
@@ -32,7 +32,7 @@ operation(): |
3232
raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
3333
}
3434
35-
X[rd] = X[rs1] | ~X[rs2];
35+
X[xd] = X[xs1] | ~X[xs2];
3636
3737
# SPDX-SnippetBegin
3838
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

spec/std/isa/inst/B/rev8.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description: |
1515
1616
[NOTE]
1717
The byte-reverse operation is only available for the full register width. To emulate word-sized
18-
and halfword-sized byte-reversal, perform a `rev8 rd,rs` followed by a `srai rd,rd,K`, where K
18+
and halfword-sized byte-reversal, perform a `rev8 xd,xs1` followed by a `srai xd,xd,K`, where K
1919
is XLEN-32 and XLEN-16, respectively.
2020
definedBy:
2121
anyOf: [Zbb, Zbkb]
@@ -24,16 +24,16 @@ encoding:
2424
RV32:
2525
match: 011010011000-----101-----0010011
2626
variables:
27-
- name: rs1
27+
- name: xs1
2828
location: 19-15
29-
- name: rd
29+
- name: xd
3030
location: 11-7
3131
RV64:
3232
match: 011010111000-----101-----0010011
3333
variables:
34-
- name: rs1
34+
- name: xs1
3535
location: 19-15
36-
- name: rd
36+
- name: xd
3737
location: 11-7
3838
access:
3939
s: always
@@ -46,7 +46,7 @@ operation(): |
4646
raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
4747
}
4848
49-
XReg input = X[rs1];
49+
XReg input = X[xs1];
5050
XReg output = 0;
5151
5252
XReg j = xlen() - 1;
@@ -56,7 +56,7 @@ operation(): |
5656
j = j - 8;
5757
}
5858
59-
X[rd] = output;
59+
X[xd] = output;
6060
6161
# SPDX-SnippetBegin
6262
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

spec/std/isa/inst/B/rol.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ kind: instruction
88
name: rol
99
long_name: Rotate left (Register)
1010
description: |
11-
Performs a rotate left of rs1 by the amount in least-significant `log2(XLEN)` bits of rs2.
11+
Performs a rotate left of xs1 by the amount in least-significant `log2(XLEN)` bits of xs2.
1212
definedBy:
1313
anyOf: [Zbb, Zbkb]
1414
assembly: xd, xs1, xs2
1515
encoding:
1616
match: 0110000----------001-----0110011
1717
variables:
18-
- name: rs2
18+
- name: xs2
1919
location: 24-20
20-
- name: rs1
20+
- name: xs1
2121
location: 19-15
22-
- name: rd
22+
- name: xd
2323
location: 11-7
2424
access:
2525
s: always
@@ -32,9 +32,9 @@ operation(): |
3232
raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
3333
}
3434
35-
XReg shamt = (xlen() == 32) ? X[rs2][4:0] : X[rs2][5:0];
35+
XReg shamt = (xlen() == 32) ? X[xs2][4:0] : X[xs2][5:0];
3636
37-
X[rd] = (X[rs1] << shamt) | (X[rs1] >> (xlen() - shamt));
37+
X[xd] = (X[xs1] << shamt) | (X[xs1] >> (xlen() - shamt));
3838
3939
# SPDX-SnippetBegin
4040
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

spec/std/isa/inst/B/rolw.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ kind: instruction
88
name: rolw
99
long_name: Rotate left word (Register)
1010
description: |
11-
Performs a rotate left of the least-significant word of rs1 by the amount in least-significant 5 bits of rs2.
11+
Performs a rotate left of the least-significant word of xs1 by the amount in least-significant 5 bits of xs2.
1212
The resulting word value is sign-extended by copying bit 31 to all of the more-significant bits.
1313
definedBy:
1414
anyOf: [Zbb, Zbkb]
@@ -17,11 +17,11 @@ base: 64
1717
encoding:
1818
match: 0110000----------001-----0111011
1919
variables:
20-
- name: rs2
20+
- name: xs2
2121
location: 24-20
22-
- name: rs1
22+
- name: xs1
2323
location: 19-15
24-
- name: rd
24+
- name: xd
2525
location: 11-7
2626
access:
2727
s: always
@@ -34,12 +34,12 @@ operation(): |
3434
raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
3535
}
3636
37-
XReg rs1_word = X[rs1][31:0];
38-
XReg shamt = X[rs2][4:0];
37+
XReg xs1_word = X[xs1][31:0];
38+
XReg shamt = X[xs2][4:0];
3939
40-
XReg unextended_result = (rs1_word << shamt) | (rs1_word >> (32 - shamt));
40+
XReg unextended_result = (xs1_word << shamt) | (xs1_word >> (32 - shamt));
4141
42-
X[rd] = {{32{unextended_result[31]}}, unextended_result};
42+
X[xd] = {{32{unextended_result[31]}}, unextended_result};
4343
4444
# SPDX-SnippetBegin
4545
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

spec/std/isa/inst/B/ror.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ kind: instruction
88
name: ror
99
long_name: Rotate right (Register)
1010
description: |
11-
Performs a rotate right of rs1 by the amount in least-significant `log2(XLEN)` bits of rs2.
11+
Performs a rotate right of xs1 by the amount in least-significant `log2(XLEN)` bits of xs2.
1212
definedBy:
1313
anyOf: [Zbb, Zbkb]
1414
assembly: xd, xs1, xs2
1515
encoding:
1616
match: 0110000----------101-----0110011
1717
variables:
18-
- name: rs2
18+
- name: xs2
1919
location: 24-20
20-
- name: rs1
20+
- name: xs1
2121
location: 19-15
22-
- name: rd
22+
- name: xd
2323
location: 11-7
2424
access:
2525
s: always
@@ -32,9 +32,9 @@ operation(): |
3232
raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
3333
}
3434
35-
XReg shamt = (xlen() == 32) ? X[rs2][4:0] : X[rs2][5:0];
35+
XReg shamt = (xlen() == 32) ? X[xs2][4:0] : X[xs2][5:0];
3636
37-
X[rd] = (X[rs1] >> shamt) | (X[rs1] << (xlen() - shamt));
37+
X[xd] = (X[xs1] >> shamt) | (X[xs1] << (xlen() - shamt));
3838
3939
# SPDX-SnippetBegin
4040
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

spec/std/isa/inst/B/rori.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ kind: instruction
88
name: rori
99
long_name: Rotate right (Immediate)
1010
description: |
11-
Performs a rotate right of rs1 by the amount in the least-significant log2(XLEN) bits of shamt.
11+
Performs a rotate right of xs1 by the amount in the least-significant log2(XLEN) bits of shamt.
1212
For RV32, the encodings corresponding to shamt[5]=1 are reserved.
1313
definedBy:
1414
anyOf: [Zbb, Zbkb]
@@ -19,18 +19,18 @@ encoding:
1919
variables:
2020
- name: shamt
2121
location: 24-20
22-
- name: rs1
22+
- name: xs1
2323
location: 19-15
24-
- name: rd
24+
- name: xd
2525
location: 11-7
2626
RV64:
2727
match: 011000-----------101-----0010011
2828
variables:
2929
- name: shamt
3030
location: 25-20
31-
- name: rs1
31+
- name: xs1
3232
location: 19-15
33-
- name: rd
33+
- name: xd
3434
location: 11-7
3535
access:
3636
s: always
@@ -45,7 +45,7 @@ operation(): |
4545
4646
XReg shamt = (xlen() == 32) ? shamt[4:0] : shamt[5:0];
4747
48-
X[rd] = (X[rs1] >> shamt) | (X[rs1] << (xlen() - shamt));
48+
X[xd] = (X[xs1] >> shamt) | (X[xs1] << (xlen() - shamt));
4949
5050
# SPDX-SnippetBegin
5151
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

0 commit comments

Comments
 (0)