Message ID | 1395257527.17148.14.camel@gnopaine |
---|---|
State | New |
Headers | show |
On Wed, Mar 19, 2014 at 3:32 PM, Bill Schmidt <wschmidt@linux.vnet.ibm.com> wrote: > 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. Okay. Thanks, David
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)"