Skip to content

Commit c792551

Browse files
committed
fix: fcvtmod.w.d requires explicit "rtz"
Per The RISC-V Instruction Set Manual, Volume I: Unprivileged Architecture, Version 20250508, 25.4 Modular Convert-to-Integer Instruction: > The assembly syntax requires the RTZ rounding mode to be explicitly > specified, i.e., `fcvtmod.w.d rd, rs1, rtz`. But, the Sail code does not accept that third "rtz" operand. Add the explicit third operand to `fcvtmod.w.d`.
1 parent d0f5bc1 commit c792551

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model/riscv_insts_zfa.sail

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ mapping clause encdec = FCVTMOD_W_D(rs1, rd)
789789
when currentlyEnabled(Ext_D) & currentlyEnabled(Ext_Zfa)
790790

791791
mapping clause assembly = FCVTMOD_W_D(rs1, rd)
792-
<-> "fcvtmod.w.d" ^ spc() ^ reg_name(rd) ^ sep() ^ freg_name(rs1)
792+
<-> "fcvtmod.w.d" ^ spc() ^ reg_name(rd) ^ sep() ^ freg_name(rs1) ^ ",rtz"
793793

794794
function clause execute(FCVTMOD_W_D(rs1, rd)) = {
795795
let rs1_val_D = F_D(rs1);

0 commit comments

Comments
 (0)