[FFmpeg-cvslog] lavu/float_dsp: fix compilation with RISC-V ILP32 ABI

Rémi Denis-Courmont git at videolan.org
Mon Nov 25 19:29:32 EET 2024


ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 20 20:30:56 2024 +0200| [63922ba5dc77b85033d4926a86f090c9023aff2a] | committer: Rémi Denis-Courmont

lavu/float_dsp: fix compilation with RISC-V ILP32 ABI

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=63922ba5dc77b85033d4926a86f090c9023aff2a
---

 libavutil/riscv/float_dsp_rvv.S | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/libavutil/riscv/float_dsp_rvv.S b/libavutil/riscv/float_dsp_rvv.S
index fd5ee53744..9c00c8cb2d 100644
--- a/libavutil/riscv/float_dsp_rvv.S
+++ b/libavutil/riscv/float_dsp_rvv.S
@@ -227,7 +227,15 @@ endfunc
 // (a0) += (a1) * fa0 [0..a2-1]
 func ff_vector_dmac_scalar_rvv, zve64d, zba
         lpad    0
+#if __riscv_xlen >= 64
 NOHWD   fmv.d.x   fa0, a2
+#else
+NOHWD   addi    sp, sp, -16
+NOHWD   sw      a0, 0(sp)
+NOHWD   sw      a1, 4(sp)
+NOHWD   fld     fa0, (sp)
+NOHWD   addi    sp, sp, 16
+#endif
 NOHWD   mv        a2, a3
 1:
         vsetvli   t0, a2, e64, m8, ta, ma
@@ -246,7 +254,15 @@ endfunc
 // (a0) = (a1) * fa0 [0..a2-1]
 func ff_vector_dmul_scalar_rvv, zve64d, zba
         lpad    0
+#if __riscv_xlen >= 64
 NOHWD   fmv.d.x  fa0, a2
+#else
+NOHWD   addi    sp, sp, -16
+NOHWD   sw      a0, 0(sp)
+NOHWD   sw      a1, 4(sp)
+NOHWD   fld     fa0, (sp)
+NOHWD   addi    sp, sp, 16
+#endif
 NOHWD   mv       a2, a3
 1:
         vsetvli  t0, a2, e64, m8, ta, ma



More information about the ffmpeg-cvslog mailing list