]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Emit \n\t at the end of instruction instead of ;
authorJim Lin <jim@andestech.com>
Thu, 27 Nov 2025 07:02:20 +0000 (15:02 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Fri, 28 Nov 2025 09:18:39 +0000 (17:18 +0800)
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.

gcc/config/riscv/riscv.cc

index 63ac9d841831e13ce01c13dbb092ea6810d29d8e..3e737d54d57f68cf57758eafad38b40be101b56a 100644 (file)
@@ -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: