From 294ce24053d0552ea4a1af9a60fe66b1cde56413 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 14 Apr 2024 07:07:38 +0100 Subject: [PATCH] aarch64: Emit +rdm when the platform asm does not support +rdma. Although the two extension names are aliases, they are not supported uniformly across assemblers. This emits +rdm for assemblers that do not support +rdma. TODO: Wrap the change in a conditional and supply that from config.gcc on the basis of configuration. gcc/ChangeLog: * common/config/aarch64/aarch64-common.cc: Always emit +rdm even when the given extension name is rdma. Signed-off-by: Iain Sandoe --- gcc/common/config/aarch64/aarch64-common.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc index eb665ea08ec5..496d0d82e057 100644 --- a/gcc/common/config/aarch64/aarch64-common.cc +++ b/gcc/common/config/aarch64/aarch64-common.cc @@ -333,7 +333,10 @@ aarch64_get_extension_string_for_isa_flags if (added & opt.flag_canonical) { outstr += "+"; - outstr += opt.name; + if (startswith (opt.name, "rdm")) + outstr += "rdm"; + else + outstr += opt.name; } /* Remove the features in current_flags & ~isa_flags. If the feature does @@ -362,7 +365,10 @@ aarch64_get_extension_string_for_isa_flags { current_flags &= ~opt.flags_off; outstr += "+no"; - outstr += opt.name; + if (startswith (opt.name, "rdm")) + outstr += "rdm"; + else + outstr += opt.name; } }