This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[4.8, PATCH 12/26] Backport Power8 and LE support: Defaults
- From: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dje dot gcc at gmail dot com
- Date: Wed, 19 Mar 2014 14:32:07 -0500
- Subject: [4.8, PATCH 12/26] Backport Power8 and LE support: Defaults
- Authentication-results: sourceware.org; auth=none
Hi,
This patch (diff-le-align) sets some miscellaneous defaults for little
endian support.
Thanks,
Bill
2014-03-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Apply mainline r205060.
2013-11-20 Alan Modra <amodra@gmail.com>
* config/rs6000/sysv4.h (CC1_ENDIAN_LITTLE_SPEC): Define as empty.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Default
to strict alignment on older processors when little-endian.
* config/rs6000/linux64.h (PROCESSOR_DEFAULT64): Default to power8
for ELFv2.
Index: gcc-4_8-branch/gcc/config/rs6000/linux64.h
===================================================================
--- gcc-4_8-branch.orig/gcc/config/rs6000/linux64.h 2013-12-28 17:50:44.252360594 +0100
+++ gcc-4_8-branch/gcc/config/rs6000/linux64.h 2013-12-28 17:50:46.356371060 +0100
@@ -71,7 +71,11 @@ extern int dot_symbols;
#undef PROCESSOR_DEFAULT
#define PROCESSOR_DEFAULT PROCESSOR_POWER7
#undef PROCESSOR_DEFAULT64
+#ifdef LINUX64_DEFAULT_ABI_ELFv2
+#define PROCESSOR_DEFAULT64 PROCESSOR_POWER8
+#else
#define PROCESSOR_DEFAULT64 PROCESSOR_POWER7
+#endif
/* We don't need to generate entries in .fixup, except when
-mrelocatable or -mrelocatable-lib is given. */
Index: gcc-4_8-branch/gcc/config/rs6000/rs6000.c
===================================================================
--- gcc-4_8-branch.orig/gcc/config/rs6000/rs6000.c 2013-12-28 17:50:44.219360429 +0100
+++ gcc-4_8-branch/gcc/config/rs6000/rs6000.c 2013-12-28 17:50:46.369371125 +0100
@@ -3206,6 +3206,12 @@ rs6000_option_override_internal (bool gl
}
}
+ /* If little-endian, default to -mstrict-align on older processors.
+ Testing for htm matches power8 and later. */
+ if (!BYTES_BIG_ENDIAN
+ && !(processor_target_table[tune_index].target_enable & OPTION_MASK_HTM))
+ rs6000_isa_flags |= ~rs6000_isa_flags_explicit & OPTION_MASK_STRICT_ALIGN;
+
/* Add some warnings for VSX. */
if (TARGET_VSX)
{
Index: gcc-4_8-branch/gcc/config/rs6000/sysv4.h
===================================================================
--- gcc-4_8-branch.orig/gcc/config/rs6000/sysv4.h 2013-12-28 17:50:44.243360549 +0100
+++ gcc-4_8-branch/gcc/config/rs6000/sysv4.h 2013-12-28 17:50:46.374371150 +0100
@@ -538,12 +538,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
#define CC1_ENDIAN_BIG_SPEC ""
-#define CC1_ENDIAN_LITTLE_SPEC "\
-%{!mstrict-align: %{!mno-strict-align: \
- %{!mcall-i960-old: \
- -mstrict-align \
- } \
-}}"
+#define CC1_ENDIAN_LITTLE_SPEC ""
#define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big)"