aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi@remlab.net>2024-07-22 20:01:17 +0300
committerRémi Denis-Courmont <remi@remlab.net>2024-07-25 18:55:48 +0300
commit1e7ab200ee2c6d1992ba9a68e6467ae6b7348dec (patch)
tree0d29281da06062cc2f4af1aa6b685da6b09bfd17
parent2128c1773956d96a9f6dad06aabd93ee4715b2e3 (diff)
downloadffmpeg-1e7ab200ee2c6d1992ba9a68e6467ae6b7348dec.tar.gz
lavu/riscv: allow any number of extensions
This reworks the func/endfunc macros to support any number of ISA extension as parameters.
-rw-r--r--libavutil/riscv/asm.S17
1 files 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