Skip to content

Commit 1a7a348

Browse files
authored
fix(data): stack-pointer instruction assembly needs stack-pointer (#834)
PR #804 removed the `(sp)` operand from stack-pointer-based instructions. This change was motivated by comparing the assembly with the RISC-V Sail model. Unfortunately, the Sail model was incorrect in comparison to the RISC-V spec, the spec being the current "single source of truth". Add the stack pointer operand back to these instructions. Fixes issue #833.
1 parent faf7646 commit 1a7a348

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

arch/inst/C/c.addi16sp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ definedBy:
1313
anyOf:
1414
- C
1515
- Zca
16-
assembly: imm
16+
assembly: imm(sp)
1717
encoding:
1818
match: 011-00010-----01
1919
variables:

arch/inst/C/c.addi4spn.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ definedBy:
1313
anyOf:
1414
- C
1515
- Zca
16-
assembly: xd, imm
16+
assembly: xd, imm(sp)
1717
encoding:
1818
match: 000-----------00
1919
variables:

arch/inst/C/c.ldsp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ definedBy:
1616
- C
1717
- Zca
1818
base: 64
19-
assembly: xd, imm
19+
assembly: xd, imm(sp)
2020
encoding:
2121
match: 011-----------10
2222
variables:

arch/inst/C/c.lwsp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ definedBy:
1414
anyOf:
1515
- C
1616
- Zca
17-
assembly: xd, imm
17+
assembly: xd, imm(sp)
1818
encoding:
1919
match: 010-----------10
2020
variables:

arch/inst/C/c.sdsp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ definedBy:
1414
- C
1515
- Zca
1616
base: 64
17-
assembly: xs2, imm
17+
assembly: xs2, imm(sp)
1818
encoding:
1919
match: 111-----------10
2020
variables:

arch/inst/C/c.swsp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ definedBy:
1313
anyOf:
1414
- C
1515
- Zca
16-
assembly: xs2, imm
16+
assembly: xs2, imm(sp)
1717
encoding:
1818
match: 110-----------10
1919
variables:

arch/inst/Zcd/c.fldsp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ definedBy:
1515
- C
1616
- D
1717
- Zcd
18-
assembly: fd, imm
18+
assembly: fd, imm(sp)
1919
encoding:
2020
match: 001-----------10
2121
variables:

arch/inst/Zcd/c.fsdsp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ definedBy:
1515
- C
1616
- D
1717
- Zcd
18-
assembly: fs2, imm
18+
assembly: fs2, imm(sp)
1919
encoding:
2020
match: 101-----------10
2121
variables:

arch/inst/Zcf/c.flwsp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ definedBy:
1515
- C
1616
- F
1717
- Zcf
18-
assembly: fd, imm
18+
assembly: fd, imm(sp)
1919
base: 32
2020
encoding:
2121
match: 011-----------10

arch/inst/Zcf/c.fswsp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ definedBy:
1515
- C
1616
- F
1717
- Zcf
18-
assembly: fs2, imm
18+
assembly: fs2, imm(sp)
1919
base: 32
2020
encoding:
2121
match: 111-----------10

0 commit comments

Comments
 (0)