[PATCH 1/1] RISC-V: Fix canonical extension order (K and J)

Tsukasa OI research_trasio@irq.a4lg.com
Mon Mar 28 13:12:01 GMT 2022


This commit fixes canonical extension order to follow the RISC-V ISA
Manual draft-20210402-1271737 or later.

bfd/ChangeLog:

	* elfxx-riscv.c (riscv_recognized_prefixed_ext): Fix "K" extension
	prefix to be placed before "J".
---
 bfd/elfxx-riscv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index cb2cc146c04..1219a7b44d4 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -1338,7 +1338,7 @@ riscv_recognized_prefixed_ext (const char *ext)
 }
 
 /* Canonical order for single letter extensions.  */
-static const char riscv_ext_canonical_order[] = "eigmafdqlcbjktpvn";
+static const char riscv_ext_canonical_order[] = "eigmafdqlcbkjtpvn";
 
 /* Array is used to compare the orders of standard extensions quickly.  */
 static int riscv_ext_order[26] = {0};
-- 
2.32.0



More information about the Binutils mailing list