[PATCH 1/1] RISC-V: Add support for zama16b extension.

Dongyan Chen chendongyan@isrc.iscas.ac.cn
Sat Jun 27 14:45:17 GMT 2026


This patch adds minimal support for the RISC-V Zama16b extension, version 1.0[1].

[1] https://github.com/riscv/riscv-isa-manual/blob/main/src/unpriv/zama.adoc

bfd/ChangeLog:

	* elfxx-riscv.c: Add zama16b extension.

gas/ChangeLog:

	* NEWS: Add zama16b extension.
	* testsuite/gas/riscv/march-help.l: Ditto.

---
 bfd/elfxx-riscv.c                    | 1 +
 gas/NEWS                             | 2 ++
 gas/testsuite/gas/riscv/march-help.l | 1 +
 3 files changed, 4 insertions(+)

diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index 961c44a9206..3b5a944e9c4 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -1483,6 +1483,7 @@ static const struct riscv_supported_ext riscv_supported_std_z_ext[] =
   {"zaamo",		ISA_SPEC_CLASS_DRAFT,		1, 0, 0 },
   {"zabha",		ISA_SPEC_CLASS_DRAFT,		1, 0, 0 },
   {"zacas",		ISA_SPEC_CLASS_DRAFT,		1, 0, 0 },
+  {"zama16b",		ISA_SPEC_CLASS_DRAFT,		1, 0, 0 },
   {"zalasr",           ISA_SPEC_CLASS_DRAFT,           1, 0,  0 },
   {"zalrsc",		ISA_SPEC_CLASS_DRAFT,		1, 0, 0 },
   {"zawrs",		ISA_SPEC_CLASS_DRAFT,		1, 0, 0 },
diff --git a/gas/NEWS b/gas/NEWS
index 4c55a544f25..3531a917d86 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -11,6 +11,8 @@
 * Add support for RISC-V vendor extensions:
   SpacemiT: xsmtvdot v1.0, xsmtvdotii v1.0.
 
+* Add support for RISC-V zama16b extension with version 1.0.
+
 Changes in 2.46:
 
 * Add support for AMD Zen6 processor.
diff --git a/gas/testsuite/gas/riscv/march-help.l b/gas/testsuite/gas/riscv/march-help.l
index db6a86bc287..f3b99993394 100644
--- a/gas/testsuite/gas/riscv/march-help.l
+++ b/gas/testsuite/gas/riscv/march-help.l
@@ -37,6 +37,7 @@ All available -march extensions for RISC-V:
 	zacas                                   1.0
 	zalasr                                  1.0
 	zalrsc                                  1.0
+	zama16b                                 1.0
 	zawrs                                   1.0
 	zfbfmin                                 1.0
 	zfa                                     1.0
-- 
2.34.1



More information about the Binutils mailing list