Skip to content

Commit 6702ba3

Browse files
committed
feat(data): Add a few missing pseudoinstructions
1 parent 34157aa commit 6702ba3

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

arch/inst/I/addi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ access:
2323
vu: always
2424
data_independent_timing: true
2525
operation(): X[xd] = X[xs1] + $signed(imm);
26+
pseudoinstructions:
27+
- when: imm == 0
28+
to: mv xd,xs1
2629

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

arch/inst/I/sltiu.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ access:
2828
vs: always
2929
vu: always
3030
data_independent_timing: true
31+
pseudoinstructions:
32+
- when: xs1 == 0
33+
to: seqz xd,xs1
34+
3135
operation(): |
3236
Bits<MXLEN> sign_extend_imm = $signed(imm);
3337
X[xd] = (X[xs1] < sign_extend_imm) ? 1 : 0;

arch/inst/I/xori.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ access:
2222
vs: always
2323
vu: always
2424
data_independent_timing: true
25+
pseudoinstructions:
26+
- when: $signed(imm) == -1
27+
to: not xd,xs1
28+
2529
operation(): X[xd] = X[xs1] ^ $signed(imm);
2630

2731
# SPDX-SnippetBegin

0 commit comments

Comments
 (0)