[FFmpeg-cvslog] lavu/riscv: grok B as an extension
Rémi Denis-Courmont
git at videolan.org
Thu Jul 25 23:11:04 EEST 2024
ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 22 20:06:09 2024 +0300| [7f97344bfb8deab6fdbf82427489a4751132bb7a] | committer: Rémi Denis-Courmont
lavu/riscv: grok B as an extension
The RISC-V B bit manipulation extension was ratified only two months ago.
But it is strictly equivalent to the union of the zba, zbb and zbs
extensions which were defined almost 3 years earlier. Rather than require
new assembler, we can just match the extension name manually and translate
it into its constituent parts.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7f97344bfb8deab6fdbf82427489a4751132bb7a
---
libavutil/riscv/asm.S | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavutil/riscv/asm.S b/libavutil/riscv/asm.S
index 78e9defbd4..0c29680d84 100644
--- a/libavutil/riscv/asm.S
+++ b/libavutil/riscv/asm.S
@@ -38,7 +38,12 @@
.macro archadd ext=, more:vararg
.ifnb \ext
- .option arch, +\ext
+ .ifc \ext, b
+ # B was defined later, is known to fewer assemblers.
+ archadd zba, zbb, zbs
+ .else
+ .option arch, +\ext
+ .endif
archadd \more
.endif
.endm
More information about the ffmpeg-cvslog
mailing list