[to-be-committed] RISC-V: Sync extension of canonical order with spec

Message ID 20260603071557.1872596-1-kito.cheng@sifive.com
State Committed
Headers
Series [to-be-committed] RISC-V: Sync extension of canonical order with spec |

Checks

Context Check Description
rivoscibot/toolchain-ci-rivos-apply-patch success Patch applied
rivoscibot/toolchain-ci-rivos-lint success Lint passed
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gcv-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--linux-rv64gcv-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--linux-rv64gc_zba_zbb_zbc_zbs-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-test success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed

Commit Message

Kito Cheng June 3, 2026, 7:15 a.m. UTC
  The canonical order has been adjusted a little bit [1-2].  Fortunately, the
affected extensions haven't been ratified yet, so there's no real impact.
Although P doesn't have an upstream yet, to avoid forgetting to update the
canonical order in the future, I've decided to update it now while I still
remember it.

[1] https://github.com/riscv/riscv-isa-manual/pull/2903
[2] https://github.com/riscv/riscv-isa-manual/pull/2910

gcc/ChangeLog:

	* common/config/riscv/riscv-common.cc (riscv_supported_std_ext):
	Move 'v' before 'p' and drop 'n' to match the spec.
	* config/riscv/arch-canonicalize (CANONICAL_ORDER): Ditto.
---
 gcc/common/config/riscv/riscv-common.cc | 2 +-
 gcc/config/riscv/arch-canonicalize      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc
index 5d3d37c7a7b..d2e6e1cfe06 100644
--- a/gcc/common/config/riscv/riscv-common.cc
+++ b/gcc/common/config/riscv/riscv-common.cc
@@ -799,7 +799,7 @@  riscv_subset_list::lookup (const char *subset, int major_version,
 static const char *
 riscv_supported_std_ext (void)
 {
-  return "mafdqlcbkjtpvnh";
+  return "mafdqlcbkjtvph";
 }
 
 /* Parsing subset version.
diff --git a/gcc/config/riscv/arch-canonicalize b/gcc/config/riscv/arch-canonicalize
index 5f05d85dadd..00c1274c12f 100755
--- a/gcc/config/riscv/arch-canonicalize
+++ b/gcc/config/riscv/arch-canonicalize
@@ -30,7 +30,7 @@  import os
 from functools import reduce
 
 SUPPORTED_ISA_SPEC = ["2.2", "20190608", "20191213"]
-CANONICAL_ORDER = "imafdqlcbkjtpvnh"
+CANONICAL_ORDER = "imafdqlcbkjtvph"
 LONG_EXT_PREFIXES = ['z', 's', 'h', 'x']
 
 def parse_define_riscv_ext(content):