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.
This commit is contained in:
Rémi Denis-Courmont 2024-07-22 20:06:09 +03:00
parent 1e7ab200ee
commit 7f97344bfb

View File

@ -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