[gcc(refs/vendors/riscv/heads/gcc-15-with-riscv-opts)] RISC-V: Emit \n\t at the end of instruction instead of ;
Jeff Law
law@gcc.gnu.org
Sat Jan 17 07:24:52 GMT 2026
https://gcc.gnu.org/g:80db72847b427950b47cc67ba8afe694743c0e0e
commit 80db72847b427950b47cc67ba8afe694743c0e0e
Author: Jim Lin <jim@andestech.com>
Date: Thu Nov 27 15:02:20 2025 +0800
RISC-V: Emit \n\t at the end of instruction instead of ;
Instead of emitting only one line `fmv.x.s a5,fa0;slli a5,a5,16;srai a5,a5,16`
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_output_move): Use \n\t instead
of semicolon to separate instructions in fmv.x.h emulation.
(cherry picked from commit 99052ad691ffc058f5b89794fd59b64b1d001425)
Diff:
---
gcc/config/riscv/riscv.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index c194d6b144e5..85cec7326566 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -5014,7 +5014,7 @@ riscv_output_move (rtx dest, rtx src)
if (TARGET_ZFHMIN || TARGET_ZFBFMIN)
return "fmv.x.h\t%0,%1";
/* Using fmv.x.s + sign-extend to emulate fmv.x.h. */
- return "fmv.x.s\t%0,%1;slli\t%0,%0,16;srai\t%0,%0,16";
+ return "fmv.x.s\t%0,%1\n\tslli\t%0,%0,16\n\tsrai\t%0,%0,16";
case 4:
return "fmv.x.s\t%0,%1";
case 8:
More information about the Gcc-cvs
mailing list