Skip to content

Commit 3c4bdfd

Browse files
committed
fix: fsd, fsw have reversed operands
1 parent 60586e0 commit 3c4bdfd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

model/riscv_insts_zcd.sail

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ function clause execute (C_FSD(uimm, rsc1, rsc2)) = {
7676

7777
mapping clause assembly = C_FSD(uimm, rsc1, rsc2)
7878
if (xlen == 32 | xlen == 64)
79-
<-> "c.fsd" ^ spc() ^ creg_name(rsc1) ^ sep() ^ hex_bits_8(uimm @ 0b000) ^ "(" ^ creg_name(rsc2) ^ ")"
79+
<-> "c.fsd" ^ spc() ^ creg_name(rsc2) ^ sep() ^ hex_bits_8(uimm @ 0b000) ^ "(" ^ creg_name(rsc1) ^ ")"
8080
if (xlen == 32 | xlen == 64)

model/riscv_insts_zcf.sail

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ function clause execute (C_FSW(uimm, rsc1, rsc2)) = {
7272
}
7373

7474
mapping clause assembly = C_FSW(uimm, rsc1, rsc2)
75-
<-> "c.fsw" ^ spc() ^ creg_name(rsc1) ^ sep() ^ hex_bits_7(uimm @ 0b00) ^ "(" ^ creg_name(rsc2) ^ ")"
75+
<-> "c.fsw" ^ spc() ^ creg_name(rsc2) ^ sep() ^ hex_bits_7(uimm @ 0b00) ^ "(" ^ creg_name(rsc1) ^ ")"
7676
when xlen == 32

0 commit comments

Comments
 (0)