diff mbox series

[FFmpeg-devel,1/9] lavu/riscv: allow any number of extensions

Message ID 20240722184431.40853-1-remi@remlab.net
State New
Headers show
Series [FFmpeg-devel,1/9] lavu/riscv: allow any number of extensions | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Rémi Denis-Courmont July 22, 2024, 6:44 p.m. UTC
This reworks the func/endfunc macros to support any number of ISA extension
as parameters.
---
 libavutil/riscv/asm.S | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/libavutil/riscv/asm.S b/libavutil/riscv/asm.S
index 2cf4f7b7ab..78e9defbd4 100644
--- a/libavutil/riscv/asm.S
+++ b/libavutil/riscv/asm.S
@@ -36,17 +36,18 @@ 
 #define HWD
 #endif
 
-        .macro func sym, ext1=, ext2=
+        .macro  archadd ext=, more:vararg
+            .ifnb   \ext
+                .option arch, +\ext
+                archadd \more
+            .endif
+        .endm
+
+        .macro func sym, exts:vararg
             .text
             .align 2
-
             .option push
-            .ifnb \ext1
-            .option arch, +\ext1
-            .ifnb \ext2
-            .option arch, +\ext2
-            .endif
-            .endif
+            archadd \exts
 
             .global \sym
             .hidden \sym