From 885f078bb7f5262307fddd37d14d1ee0ab701117 Mon Sep 17 00:00:00 2001 From: xiaofan Date: Sat, 17 May 2025 13:46:18 +0800 Subject: [PATCH] Fix RiscVEmitter::QuickFLI (#20351) using `fmv.w.x` intead of `fmv.d.x` when load Float32 to float register Signed-off-by: xiaofan --- Common/RiscVEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/RiscVEmitter.cpp b/Common/RiscVEmitter.cpp index f90f7d04c1..a6063ef989 100644 --- a/Common/RiscVEmitter.cpp +++ b/Common/RiscVEmitter.cpp @@ -2497,7 +2497,7 @@ void RiscVEmitter::QuickFLI(int bits, RiscVReg rd, float v, RiscVReg scratchReg) QuickFLI(32, rd, (double)v, scratchReg); } else if (bits == 32) { LI(scratchReg, v); - FMV(FMv::D, FMv::X, rd, scratchReg); + FMV(FMv::W, FMv::X, rd, scratchReg); } else { _assert_msg_(false, "Unsupported QuickFLI bits"); }