[FFmpeg-devel] [PATCH 1/9] lavu/riscv: allow any number of extensions
Rémi Denis-Courmont
remi at remlab.net
Mon Jul 22 21:44:20 EEST 2024
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 --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
--
2.45.2
More information about the ffmpeg-devel
mailing list