[FFmpeg-devel] [PATCH 2/5] lavu/float_dsp: fix compilation with RISC-V ILP32 ABI
Rémi Denis-Courmont
remi at remlab.net
Wed Nov 20 20:48:17 EET 2024
---
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
--
2.45.2
More information about the ffmpeg-devel
mailing list