public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] aarch64: Make assembler bug workaround configurable.
@ 2023-10-26 19:31 Iain Sandoe
  0 siblings, 0 replies; only message in thread
From: Iain Sandoe @ 2023-10-26 19:31 UTC (permalink / raw)
  To: gcc-patches; +Cc: richard.sandiford

This is an enablement patch (the initial use comes with the Darwin aarch64
port).  Tested on aarch64-linux-gnu, aarch64-apple-darwin and x86_64-darwin
just for good measure, OK for trunk?
thanks
Iain.

--- 8< ---

Some assmblers have a bug that requires +crc to be emitted even
though the base architecture supports it.  However, that also
triggers a different bug in another assembler.  So make the fix
configurable.

gcc/ChangeLog:

	* common/config/aarch64/aarch64-common.cc: Make the asm
	crc bug workaround configurable.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
---
 gcc/common/config/aarch64/aarch64-common.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc
index 20bc4e1291b..4922a6b235c 100644
--- a/gcc/common/config/aarch64/aarch64-common.cc
+++ b/gcc/common/config/aarch64/aarch64-common.cc
@@ -301,8 +301,12 @@ aarch64_get_extension_string_for_isa_flags
 
      However, assemblers with Armv8-R AArch64 support should not have this
      issue, so we don't need this fix when targeting Armv8-R.  */
-  auto explicit_flags = (!(current_flags & AARCH64_FL_V8R)
-			 ? AARCH64_FL_CRC : 0);
+  aarch64_feature_flags explicit_flags =
+#ifndef DISABLE_AARCH64_AS_CRC_BUGFIX
+     (!(current_flags & AARCH64_ISA_V8R) ? AARCH64_FL_CRC : 0);
+#else
+     0;
+#endif
 
   /* Add the features in isa_flags & ~current_flags using the smallest
      possible number of extensions.  We can do this by iterating over the
-- 
2.39.2 (Apple Git-143)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-26 19:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-26 19:31 [PATCH] aarch64: Make assembler bug workaround configurable Iain Sandoe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).