From 7f97344bfb8deab6fdbf82427489a4751132bb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 22 Jul 2024 20:06:09 +0300 Subject: [PATCH] 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. --- 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