From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id C7F673858428 for ; Tue, 18 Jun 2024 00:02:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C7F673858428 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C7F673858428 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718668969; cv=none; b=SuynQxdpgq3jRUOb+erm4U59wxEk2fpxvyWaVGPPmbToAnlTsOR7Gu6yuafQ6LWL/l+fvh0qfFHYbtgQAjlpeK6oEGF9kK8vIEWz6MRdQQSckX1PpOH+U6YUeuVdF35/awrWi8V4CDfDYpBNEwjUBCrFBl5cdSTCLDFT0faZjrc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718668969; c=relaxed/simple; bh=AHif3rlA9vMGPo6kBBsY/dLQD5/pEw73fjoIjjcHkSI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=v6ZKe2BBIk+j+X6LtX5D6DBNF8n1VgpMCsdMBFlkmC0oumZaFTD/92VDNwTp9LQLuq53sYZtKLMctHejMN3Ia/XOf/m2JonRCPo9wKglip9NXu4z3EVAndbV4NQQWv2jGku8bBQqcTzhHLQ4LOghs9/IRFUgcr/ZXgJuQDT8ZvA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1f70131063cso38195955ad.2 for ; Mon, 17 Jun 2024 17:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1718668964; x=1719273764; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=P0j8FD1I78VA/xL2w32vp+pFt10VcHhUAbB+CUuXrps=; b=k7BgeZy3KwIuULtYaZYkPw8kBgp3ubhmSuh2dFuQU0atiadYMCeZII/dXwTAwZrTdj 9bLB87nPGOqHxTyJuQsw3X7fpBo/D2uLxz65kaWaw3gFLskU3F1mpZ1EiCX+9HDijNLF n1bMnd7Vh4yzwOHPzYaBqjWHHBuhDWMrT1QFDISTFITroKwk4STcKen8ZlneVWlKTbMt pqd+Sa0uW5I/Q0QOGV0CWibDaoP/XBjAR5u1KFZZyj5f15yw5diJDIYQ4N7QQFUsDziv 6SFQ0jpZhu1mxodAkaDeHbBc+0xy23+DP85206bmgI7qSo9PdTcv0O+NLJtp9j5oiwlY xJWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718668964; x=1719273764; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P0j8FD1I78VA/xL2w32vp+pFt10VcHhUAbB+CUuXrps=; b=fpMogg9hqYsWXMXlQ8IlTijm3SCCEEpuIMe1zqX67o1jXyknBEAkBXdDEMSJatOpEj faqLW3OBiCkJgoLbiTXlH2jVQxyt/Rb69Ai0ZpG9Oyj2JX7X8FI03w8jIgAxRKGja+dK 1dOm/kEBJzPhuMh1sNuW1EqlI8U+Ycw0mfSiILun6qGgi27Rm5djVXxC9gqimYE0j/KY NhYwLth+3LVoPovWK3Hu5ljtXKAE7JuMa23FuBhT9fy5x0+VBHR7yL7I7B0efOdcjjh2 u/Jm7h7Iu6phal/FsnEa8KXNYZbm9OiLkiViBs5IE4DmzPXSmBxJsLPyMYDUTZfcfH0o D9ag== X-Gm-Message-State: AOJu0Yynd6I5fF9/MLJi/plB81WctBFqXjEU31vWotVC3Op4ZWiY87Lv rat9trrWmFMf6iCJo99tslI7t2/pxpReQUc8e6aDsmyJJx4y+PwupZeS9tancWoBE5RkU1RxxGo n X-Google-Smtp-Source: AGHT+IHCEZ2dLwOQmBEvKsjXcDdqf5cKnzxSm9torsEZ031dpsGojV4r4mGaqm9IfBRdndDwTQOgiQ== X-Received: by 2002:a17:902:6906:b0:1f7:21fd:ab83 with SMTP id d9443c01a7336-1f8629feaeemr84772395ad.54.1718668963476; Mon, 17 Jun 2024 17:02:43 -0700 (PDT) Received: from patrick-ThinkPad-X1-Carbon-Gen-8.hq.rivosinc.com ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f855e55c47sm85040155ad.33.2024.06.17.17.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 17:02:43 -0700 (PDT) From: Patrick O'Neill To: gcc-patches@gcc.gnu.org Cc: palmer@dabbelt.com, jeffreyalaw@gmail.com, kito.cheng@gmail.com, pan2.li@intel.com, gnu-toolchain@rivosinc.com, Patrick O'Neill Subject: [RFC v3] RISC-V: Promote Zaamo/Zalrsc to a when using an old binutils Date: Mon, 17 Jun 2024 17:02:30 -0700 Message-ID: <20240618000230.2784484-1-patrick@rivosinc.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Binutils 2.42 and before don't support Zaamo/Zalrsc. Promote Zaamo/Zalrsc to 'a' in the -march string when assembling. This change respects Zaamo/Zalrsc when generating code. Testcases that check for the default isa string will fail with the old binutils since zaamo/zalrsc aren't emitted anymore. All other Zaamo/Zalrsc testcases pass. gcc/ChangeLog: * common/config/riscv/riscv-common.cc (riscv_subset_list::to_string): Add toggle to promote Zaamo/Zalrsc extensions to 'a'. (riscv_arch_str): Ditto. (riscv_expand_arch): Ditto. (riscv_expand_arch_from_cpu): Ditto. (riscv_expand_arch_upgrade_exts): New function. Wrapper around riscv_expand_arch to preserve the function signature. (riscv_expand_arch_no_upgrade_exts): Ditto (riscv_expand_arch_from_cpu_upgrade_exts): New function. Wrapper around riscv_expand_arch_from_cpu to preserve the function signature. (riscv_expand_arch_from_cpu_no_upgrade_exts): Ditto. * config/riscv/riscv-protos.h (riscv_arch_str): Add toggle to function prototype. * config/riscv/riscv-subset.h: Ditto. * config/riscv/riscv-target-attr.cc (riscv_process_target_attr): * config/riscv/riscv.cc (riscv_emit_attribute): (riscv_declare_function_name): * config/riscv/riscv.h (riscv_expand_arch): Remove. (riscv_expand_arch_from_cpu): Ditto. (riscv_expand_arch_upgrade_exts): Add toggle wrapper functions. (riscv_expand_arch_no_upgrade_exts): Ditto. (riscv_expand_arch_from_cpu_upgrade_exts): Ditto. (riscv_expand_arch_from_cpu_no_upgrade_exts): Ditto. (EXTRA_SPEC_FUNCTIONS): Ditto. (OPTION_DEFAULT_SPECS): Use non-upgraded march string when invoking the compiler. (ASM_SPEC): Use upgraded march string when invoking the assembler. Signed-off-by: Patrick O'Neill --- v3 ChangeLog: Rebased on non-promoting patch. Wrap all Zaamo/Zalrsc upgrade code in #ifndef to prevent compiler warnings about unused/potentially undefined variables. Silence unused parameter warning with a voidcast. --- RFC since I'm not sure if this upgrade behavior is more trouble than it's worth - this is a pretty invasive change. Happy to iterate further or just drop these changes. --- gcc/common/config/riscv/riscv-common.cc | 111 +++++++++++++++++++++--- gcc/config/riscv/riscv-protos.h | 3 +- gcc/config/riscv/riscv-subset.h | 2 +- gcc/config/riscv/riscv-target-attr.cc | 4 +- gcc/config/riscv/riscv.cc | 7 +- gcc/config/riscv/riscv.h | 46 ++++++---- 6 files changed, 137 insertions(+), 36 deletions(-) diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 1dc1d9904c7..05c26f73b73 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -907,7 +907,7 @@ riscv_subset_list::add (const char *subset, bool implied_p) VERSION_P to determine append version info or not. */ std::string -riscv_subset_list::to_string (bool version_p) const +riscv_subset_list::to_string (bool version_p, bool upgrade_exts) const { std::ostringstream oss; oss << "rv" << m_xlen; @@ -916,10 +916,17 @@ riscv_subset_list::to_string (bool version_p) const riscv_subset_t *subset; bool skip_zifencei = false; - bool skip_zaamo_zalrsc = false; bool skip_zicsr = false; bool i2p0 = false; +#ifndef HAVE_AS_MARCH_ZAAMO_ZALRSC + bool upgrade_zaamo_zalrsc = false; + bool has_a_ext = false; + bool insert_a_ext = false; + bool inserted_a_ext = false; + riscv_subset_t *a_subset; +#endif + /* For RISC-V ISA version 2.2 or earlier version, zicsr and zifencei is included in the base ISA. */ if (riscv_isa_spec == ISA_SPEC_CLASS_2P2) @@ -945,8 +952,33 @@ riscv_subset_list::to_string (bool version_p) const skip_zifencei = true; #endif #ifndef HAVE_AS_MARCH_ZAAMO_ZALRSC - /* Skip since binutils 2.42 and earlier don't recognize zaamo/zalrsc. */ - skip_zaamo_zalrsc = true; + /* Upgrade Zaamo/Zalrsc extensions to 'a' since binutils 2.42 and earlier + don't recognize zaamo/zalrsc. */ + upgrade_zaamo_zalrsc = upgrade_exts; + if (upgrade_zaamo_zalrsc) + { + for (subset = m_head; subset != NULL; subset = subset->next) + { + if (subset->name == "a") + has_a_ext = true; + if (subset->name == "zaamo" || subset->name == "zalrsc") + insert_a_ext = true; + } + if (insert_a_ext && !has_a_ext) + { + unsigned int major_version = 0, minor_version = 0; + get_default_version ("a", &major_version, &minor_version); + a_subset = new riscv_subset_t (); + a_subset->name = "a"; + a_subset->implied_p = false; + a_subset->major_version = major_version; + a_subset->minor_version = minor_version; + } + } +#else + /* Silence unused parameter warning when HAVE_AS_MARCH_ZAAMO_ZALRSC is + set. */ + (void) upgrade_exts; #endif for (subset = m_head; subset != NULL; subset = subset->next) @@ -959,12 +991,29 @@ riscv_subset_list::to_string (bool version_p) const subset->name == "zicsr") continue; - if (skip_zaamo_zalrsc && subset->name == "zaamo") +#ifndef HAVE_AS_MARCH_ZAAMO_ZALRSC + if (upgrade_zaamo_zalrsc && subset->name == "zaamo") continue; - if (skip_zaamo_zalrsc && subset->name == "zalrsc") + if (upgrade_zaamo_zalrsc && subset->name == "zalrsc") continue; + if (upgrade_zaamo_zalrsc && insert_a_ext && !has_a_ext && !inserted_a_ext) + { + gcc_assert (a_subset); + /* Insert `a` extension in cannonical order. */ + if (subset_cmp (a_subset->name, subset->name) > 0) + { + oss << a_subset->name; + if (version_p) + oss << a_subset->major_version + << 'p' + << a_subset->minor_version; + inserted_a_ext = true; + } + } +#endif + /* For !version_p, we only separate extension with underline for multi-letter extension. */ if (!first && @@ -984,6 +1033,14 @@ riscv_subset_list::to_string (bool version_p) const << subset->minor_version; } +#ifndef HAVE_AS_MARCH_ZAAMO_ZALRSC + if (upgrade_zaamo_zalrsc && insert_a_ext && !has_a_ext) + { + gcc_assert (inserted_a_ext); + free (a_subset); + } +#endif + return oss.str (); } @@ -1598,10 +1655,10 @@ riscv_subset_list::finalize () /* Return the current arch string. */ std::string -riscv_arch_str (bool version_p) +riscv_arch_str (bool version_p, bool upgrade_exts) { if (current_subset_list) - return current_subset_list->to_string (version_p); + return current_subset_list->to_string (version_p, upgrade_exts); else return std::string(); } @@ -1907,18 +1964,33 @@ riscv_handle_option (struct gcc_options *opts, const char * riscv_expand_arch (int argc ATTRIBUTE_UNUSED, - const char **argv) + const char **argv, + bool upgrade_exts) { gcc_assert (argc == 1); location_t loc = UNKNOWN_LOCATION; riscv_parse_arch_string (argv[0], NULL, loc); - const std::string arch = riscv_arch_str (false); + const std::string arch = riscv_arch_str (/*version_p*/ false, upgrade_exts); if (arch.length()) return xasprintf ("-march=%s", arch.c_str()); else return ""; } +const char * +riscv_expand_arch_upgrade_exts (int argc ATTRIBUTE_UNUSED, + const char **argv) +{ + return riscv_expand_arch (argc, argv, /*upgrade_exts*/ true); +} + +const char * +riscv_expand_arch_no_upgrade_exts (int argc ATTRIBUTE_UNUSED, + const char **argv) +{ + return riscv_expand_arch (argc, argv, /*upgrade_exts*/ false); +} + /* Expand default -mtune option from -mcpu option, use default --with-tune value if -mcpu don't have valid value. */ @@ -1938,7 +2010,8 @@ riscv_default_mtune (int argc, const char **argv) const char * riscv_expand_arch_from_cpu (int argc ATTRIBUTE_UNUSED, - const char **argv) + const char **argv, + bool upgrade_exts) { gcc_assert (argc > 0 && argc <= 2); const char *default_arch_str = NULL; @@ -1961,10 +2034,24 @@ riscv_expand_arch_from_cpu (int argc ATTRIBUTE_UNUSED, location_t loc = UNKNOWN_LOCATION; riscv_parse_arch_string (arch_str, NULL, loc); - const std::string arch = riscv_arch_str (false); + const std::string arch = riscv_arch_str (/*version_p*/ false, upgrade_exts); return xasprintf ("-march=%s", arch.c_str()); } +const char * +riscv_expand_arch_from_cpu_upgrade_exts (int argc ATTRIBUTE_UNUSED, + const char **argv) +{ + return riscv_expand_arch_from_cpu (argc, argv, /*upgrade_exts*/ true); +} + +const char * +riscv_expand_arch_from_cpu_no_upgrade_exts (int argc ATTRIBUTE_UNUSED, + const char **argv) +{ + return riscv_expand_arch_from_cpu (argc, argv, /*upgrade_exts*/ false); +} + /* Report error if not found suitable multilib. */ const char * riscv_multi_lib_check (int argc ATTRIBUTE_UNUSED, diff --git a/gcc/config/riscv/riscv-protos.h b/gcc/config/riscv/riscv-protos.h index d6473d0cd85..06b33c9f330 100644 --- a/gcc/config/riscv/riscv-protos.h +++ b/gcc/config/riscv/riscv-protos.h @@ -183,7 +183,8 @@ extern tree riscv_builtin_decl (unsigned int, bool); extern void riscv_init_builtins (void); /* Routines implemented in riscv-common.cc. */ -extern std::string riscv_arch_str (bool version_p = true); +extern std::string riscv_arch_str (bool version_p = true, + bool upgrade_exts = false); extern void riscv_parse_arch_string (const char *, struct gcc_options *, location_t); extern bool riscv_hard_regno_rename_ok (unsigned, unsigned); diff --git a/gcc/config/riscv/riscv-subset.h b/gcc/config/riscv/riscv-subset.h index fe7f54d8bc5..8384aab63cb 100644 --- a/gcc/config/riscv/riscv-subset.h +++ b/gcc/config/riscv/riscv-subset.h @@ -90,7 +90,7 @@ public: int major_version = RISCV_DONT_CARE_VERSION, int minor_version = RISCV_DONT_CARE_VERSION) const; - std::string to_string (bool) const; + std::string to_string (bool, bool) const; unsigned xlen () const {return m_xlen;}; diff --git a/gcc/config/riscv/riscv-target-attr.cc b/gcc/config/riscv/riscv-target-attr.cc index 19eb7b06d54..42c2b439e66 100644 --- a/gcc/config/riscv/riscv-target-attr.cc +++ b/gcc/config/riscv/riscv-target-attr.cc @@ -367,7 +367,9 @@ riscv_process_target_attr (tree fndecl, tree args, location_t loc, /* Add the string of the target attribute to the fndecl hash table. */ riscv_subset_list *subset_list = attr_parser.get_riscv_subset_list (); if (subset_list) - riscv_func_target_put (fndecl, subset_list->to_string (true)); + riscv_func_target_put (fndecl, + subset_list->to_string (/*version_p*/ true, + /*upgrade_exts*/ true)); return true; } diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index c17141d909a..09943389986 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -9425,8 +9425,10 @@ riscv_sched_adjust_cost (rtx_insn *, int, rtx_insn *insn, int cost, static void riscv_emit_attribute () { + /* Upgrade extensions if necessary for the assember to understand + Eg. Zalrsc -> a. */ fprintf (asm_out_file, "\t.attribute arch, \"%s\"\n", - riscv_arch_str ().c_str ()); + riscv_arch_str (/*version_p*/ true, /*upgrade_exts*/ true).c_str ()); fprintf (asm_out_file, "\t.attribute unaligned_access, %d\n", TARGET_STRICT_ALIGN ? 0 : 1); @@ -9468,7 +9470,8 @@ riscv_declare_function_name (FILE *stream, const char *name, tree fndecl) std::string *target_name = riscv_func_target_get (fndecl); std::string isa = target_name != NULL ? *target_name - : riscv_cmdline_subset_list ()->to_string (true); + : riscv_cmdline_subset_list ()->to_string (/*version_p*/ true, + /*upgrade_exts*/ true); fprintf (stream, "\t.option arch, %s\n", isa.c_str ()); riscv_func_target_remove_and_destory (fndecl); diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index 57910eecd3e..55d0a842bf2 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/riscv/riscv.h @@ -46,17 +46,24 @@ along with GCC; see the file COPYING3. If not see #define RISCV_TUNE_STRING_DEFAULT "rocket" #endif -extern const char *riscv_expand_arch (int argc, const char **argv); -extern const char *riscv_expand_arch_from_cpu (int argc, const char **argv); +extern const char *riscv_expand_arch_upgrade_exts (int argc, const char **argv); +extern const char *riscv_expand_arch_no_upgrade_exts (int argc, + const char **argv); +extern const char *riscv_expand_arch_from_cpu_upgrade_exts (int argc, + const char **argv); +extern const char *riscv_expand_arch_from_cpu_no_upgrade_exts (int argc, + const char **argv); extern const char *riscv_default_mtune (int argc, const char **argv); extern const char *riscv_multi_lib_check (int argc, const char **argv); extern const char *riscv_arch_help (int argc, const char **argv); -# define EXTRA_SPEC_FUNCTIONS \ - { "riscv_expand_arch", riscv_expand_arch }, \ - { "riscv_expand_arch_from_cpu", riscv_expand_arch_from_cpu }, \ - { "riscv_default_mtune", riscv_default_mtune }, \ - { "riscv_multi_lib_check", riscv_multi_lib_check }, \ +# define EXTRA_SPEC_FUNCTIONS \ + { "riscv_expand_arch_u", riscv_expand_arch_upgrade_exts }, \ + { "riscv_expand_arch_nu", riscv_expand_arch_no_upgrade_exts }, \ + { "riscv_expand_arch_from_cpu_nu", riscv_expand_arch_from_cpu_no_upgrade_exts }, \ + { "riscv_expand_arch_from_cpu_u", riscv_expand_arch_from_cpu_upgrade_exts }, \ + { "riscv_default_mtune", riscv_default_mtune }, \ + { "riscv_multi_lib_check", riscv_multi_lib_check }, \ { "riscv_arch_help", riscv_arch_help }, /* Support for a compile-time default CPU, et cetera. The rules are: @@ -68,15 +75,15 @@ extern const char *riscv_arch_help (int argc, const char **argv); But using default -march/-mtune value if -mcpu don't have valid option. */ #define OPTION_DEFAULT_SPECS \ - {"tune", "%{!mtune=*:" \ - " %{!mcpu=*:-mtune=%(VALUE)}" \ - " %{mcpu=*:-mtune=%:riscv_default_mtune(%* %(VALUE))}}" }, \ - {"arch", "%{!march=*:" \ - " %{!mcpu=*:-march=%(VALUE)}" \ - " %{mcpu=*:%:riscv_expand_arch_from_cpu(%* %(VALUE))}}" }, \ - {"abi", "%{!mabi=*:-mabi=%(VALUE)}" }, \ - {"isa_spec", "%{!misa-spec=*:-misa-spec=%(VALUE)}" }, \ - {"tls", "%{!mtls-dialect=*:-mtls-dialect=%(VALUE)}"}, \ + {"tune", "%{!mtune=*:" \ + " %{!mcpu=*:-mtune=%(VALUE)}" \ + " %{mcpu=*:-mtune=%:riscv_default_mtune(%* %(VALUE))}}" }, \ + {"arch", "%{!march=*:" \ + " %{!mcpu=*:-march=%(VALUE)}" \ + " %{mcpu=*:%:riscv_expand_arch_from_cpu_nu(%* %(VALUE))}}" }, \ + {"abi", "%{!mabi=*:-mabi=%(VALUE)}" }, \ + {"isa_spec", "%{!misa-spec=*:-misa-spec=%(VALUE)}" }, \ + {"tls", "%{!mtls-dialect=*:-mtls-dialect=%(VALUE)}"}, \ #ifdef IN_LIBGCC2 #undef TARGET_64BIT @@ -103,7 +110,8 @@ extern const char *riscv_arch_help (int argc, const char **argv); #define ASM_SPEC "\ %(subtarget_asm_debugging_spec) \ %{" FPIE_OR_FPIC_SPEC ":-fpic} \ -%{march=*} \ +%{march=*:%:riscv_expand_arch_u(%*)} \ +%{!march=*:%{mcpu=*:%:riscv_expand_arch_from_cpu_u(%*)}} \ %{mabi=*} \ %{mno-relax} \ %{mbig-endian} \ @@ -116,8 +124,8 @@ ASM_MISA_SPEC "%{march=help:%:riscv_arch_help()} " \ "%{print-supported-extensions:%:riscv_arch_help()} " \ "%{-print-supported-extensions:%:riscv_arch_help()} " \ -"%{march=*:%:riscv_expand_arch(%*)} " \ -"%{!march=*:%{mcpu=*:%:riscv_expand_arch_from_cpu(%*)}} " +"%{march=*:%:riscv_expand_arch_nu(%*)} " \ +"%{!march=*:%{mcpu=*:%:riscv_expand_arch_from_cpu_nu(%*)}} " #define TARGET_DEFAULT_CMODEL CM_MEDLOW -- 2.34.1