public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][AArch64] LINK_SPEC changes for Cortex-A53 erratum 835769 workaround
@ 2014-10-22 14:20 Kyrill Tkachov
  2014-10-24 11:05 ` Marcus Shawcroft
  0 siblings, 1 reply; 3+ messages in thread
From: Kyrill Tkachov @ 2014-10-22 14:20 UTC (permalink / raw)
  To: GCC Patches; +Cc: Marcus Shawcroft, Tejas Belagod

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

Hi all,

This patch contains the LINK_SPEC changes required to pass on the linker 
option --fix-cortex-a53-835769 when compiling with 
-mfix-cortex-a53-835769 (or by default when configured with 
--enable-fix-cortex-a53-835769).

This requires a binutils installation with the patch posted at 
https://sourceware.org/ml/binutils/2014-10/msg00198.html applied.


Bootstrapped and tested on aarch64-none-linux-gnu and built various 
benchmarks.
This patch applies to 4.9 (4.8 version will be posted separately) and 
has been tested there as well.

Ok for trunk and 4.9?

Thanks,
Kyrill



2014-10-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
     (LINK_SPEC): Include CA53_ERR_835769_SPEC.
     * config/aarch64/aarch64-linux.h (CA53_ERR_835769_SPEC): Define.
     (LINK_SPEC): Include CA53_ERR_835769_SPEC.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: a53-spec-config.patch --]
[-- Type: text/x-patch; name=a53-spec-config.patch, Size: 1660 bytes --]

diff --git a/gcc/config/aarch64/aarch64-elf-raw.h b/gcc/config/aarch64/aarch64-elf-raw.h
index b9d4e8d..16ad5c8 100644
--- a/gcc/config/aarch64/aarch64-elf-raw.h
+++ b/gcc/config/aarch64/aarch64-elf-raw.h
@@ -27,9 +27,18 @@
   " crtend%O%s crtn%O%s " \
   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
 
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
+#define CA53_ERR_835769_SPEC \
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#else
+#define CA53_ERR_835769_SPEC \
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#endif
+
 #ifndef LINK_SPEC
 #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X \
-  -maarch64elf%{mabi=ilp32*:32}%{mbig-endian:b}"
+  -maarch64elf%{mabi=ilp32*:32}%{mbig-endian:b}" \
+  CA53_ERR_835769_SPEC
 #endif
 
 #endif /* GCC_AARCH64_ELF_RAW_H */
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
index 3fbde93..d375624 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -41,7 +41,16 @@
    %{mbig-endian:-EB} %{mlittle-endian:-EL}     \
    -maarch64linux%{mabi=ilp32:32}%{mbig-endian:b}"
 
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
+#define CA53_ERR_835769_SPEC \
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#else
+#define CA53_ERR_835769_SPEC \
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#endif
+
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
+                  CA53_ERR_835769_SPEC
 
 #define GNU_USER_TARGET_MATHFILE_SPEC \
   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-24 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-22 14:20 [PATCH][AArch64] LINK_SPEC changes for Cortex-A53 erratum 835769 workaround Kyrill Tkachov
2014-10-24 11:05 ` Marcus Shawcroft
2014-10-24 11:10   ` Jakub Jelinek

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).