Skip to content

Commit ed0da21

Browse files
committed
fix(data): use '0' instead of 'zero'
"zero" is not a constant in IDL. Also, add a comment to "fence" pseudoinstruction, since it maps to "fence" instruction with "iorw,iorw" operands.
1 parent 3b5256c commit ed0da21

File tree

16 files changed

+21
-21
lines changed

16 files changed

+21
-21
lines changed

arch/inst/I/addi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ access:
2323
vu: always
2424
data_independent_timing: true
2525
pseudoinstructions:
26-
- when: (xd == zero && xs1 == zero && imm == 0)
26+
- when: (xd == 0 && xs1 == 0 && imm == 0)
2727
to: nop
2828
- when: imm == 0
2929
to: mv xd,xs1

arch/inst/I/addiw.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ access:
2424
vu: always
2525
data_independent_timing: true
2626
pseudoinstructions:
27-
- when: imm == zero
27+
- when: imm == 0
2828
to: sext.w xd,xs1
2929
operation(): |
3030
XReg operand = sext(X[xs1], 31);

arch/inst/I/beq.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ access:
2727
vs: always
2828
vu: always
2929
pseudoinstructions:
30-
- when: xs2 == zero
30+
- when: xs2 == 0
3131
to: beqz xs1,imm
3232
operation(): |
3333
XReg lhs = X[xs1];

arch/inst/I/bge.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ access:
2727
vs: always
2828
vu: always
2929
pseudoinstructions:
30-
- when: xs1 == zero
30+
- when: xs1 == 0
3131
to: blez xs2,imm
32-
- when: xs2 == zero
32+
- when: xs2 == 0
3333
to: blez xs1,imm
3434
operation(): |
3535
XReg lhs = X[xs1];

arch/inst/I/blt.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ access:
2727
vs: always
2828
vu: always
2929
pseudoinstructions:
30-
- when: xs2 == zero
30+
- when: xs2 == 0
3131
to: bltz xs1,imm
32-
- when: xs1 == zero
32+
- when: xs1 == 0
3333
to: bgtz xs2,imm
3434
operation(): |
3535
XReg lhs = X[xs1];

arch/inst/I/bne.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ access:
2727
vs: always
2828
vu: always
2929
pseudoinstructions:
30-
- when: xs2 == zero
30+
- when: xs2 == 0
3131
to: bnez xs1,imm
3232
operation(): |
3333
XReg lhs = X[xs1];

arch/inst/I/fence.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ pseudoinstructions:
199199
- when: (pred == 1) && (succ == 0) && (xd == 0) && (xs1 == 0)
200200
to: pause
201201
- when: (pred == 4'b1111) && (succ == 4'b1111)
202-
to: fence
202+
to: fence # fence => fence iorw,iorw
203203

204204
# SPDX-SnippetBegin
205205
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>

arch/inst/I/jalr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ access:
2626
vs: always
2727
vu: always
2828
pseudoinstructions:
29-
- when: xd == zero
29+
- when: xd == 0
3030
to: jr imm(xs1)
31-
- when: (rd == zero && xs1 == x1 && imm == 0)
31+
- when: (rd == 0 && xs1 == x1 && imm == 0)
3232
to: ret
3333
operation(): |
3434
XReg returnaddr;

arch/inst/I/slt.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ access:
2525
vu: always
2626
data_independent_timing: true
2727
pseudoinstructions:
28-
- when: xs2 == zero
28+
- when: xs2 == 0
2929
to: sltz xd,xs1
30-
- when: xs1 == zero
30+
- when: xs1 == 0
3131
to: sgtz xd,xs2
3232
operation(): |
3333
XReg src1 = X[xs1];

arch/inst/I/sltu.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ access:
2525
vu: always
2626
data_independent_timing: true
2727
pseudoinstructions:
28-
- when: xs1 == zero
28+
- when: xs1 == 0
2929
to: snez xd,xs2
3030

3131
operation(): |

0 commit comments

Comments
 (0)