This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[4.8, PATCH 27/26] Backport Power8 and LE support: Fixes for AIX test failures


Hi,

This patch (diff-aix) adds to the 4.8 PowerPC backport patch series with
a few backported fixes from trunk that repair test failures on AIX.

Thanks,
Bill


[gcc]

2014-04-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	Backport from mainline r205308
	2013-11-23  David Edelsohn  <dje.gcc@gmail.com>

	* config/rs6000/rs6000.c (IN_NAMED_SECTION): New macro.
	(rs6000_xcoff_select_section): Place decls with stricter alignment
	into named sections.
	(rs6000_xcoff_unique_section): Allow unique sections for
	uninitialized data with strict alignment.

[gcc/testsuite]

2014-04-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	Backport from mainline
	2013-04-05  David Edelsohn  <dje.gcc@gmail.com>

	* gcc.target/powerpc/sd-vsx.c: Skip on AIX.
	* gcc.target/powerpc/sd-pwr6.c: Same.


Index: gcc-4_8-test2/gcc/config/rs6000/rs6000.c
===================================================================
--- gcc-4_8-test2.orig/gcc/config/rs6000/rs6000.c
+++ gcc-4_8-test2/gcc/config/rs6000/rs6000.c
@@ -29165,10 +29165,23 @@ rs6000_xcoff_asm_named_section (const ch
 	   name, suffix[smclass], flags & SECTION_ENTSIZE);
 }
 
+#define IN_NAMED_SECTION(DECL) \
+  ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL) \
+   && DECL_SECTION_NAME (DECL) != NULL_TREE)
+
 static section *
 rs6000_xcoff_select_section (tree decl, int reloc,
-			     unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
+			     unsigned HOST_WIDE_INT align)
 {
+  /* Place variables with alignment stricter than BIGGEST_ALIGNMENT into
+     named section.  */
+  if (align > BIGGEST_ALIGNMENT)
+    {
+      resolve_unique_section (decl, reloc, true);
+      if (IN_NAMED_SECTION (decl))
+	return get_named_section (decl, NULL, reloc);
+    }
+
   if (decl_readonly_section (decl, reloc))
     {
       if (TREE_PUBLIC (decl))
@@ -29206,10 +29219,12 @@ rs6000_xcoff_unique_section (tree decl,
 {
   const char *name;
 
-  /* Use select_section for private and uninitialized data.  */
+  /* Use select_section for private data and uninitialized data with
+     alignment <= BIGGEST_ALIGNMENT.  */
   if (!TREE_PUBLIC (decl)
       || DECL_COMMON (decl)
-      || DECL_INITIAL (decl) == NULL_TREE
+      || (DECL_INITIAL (decl) == NULL_TREE
+	  && DECL_ALIGN (decl) <= BIGGEST_ALIGNMENT)
       || DECL_INITIAL (decl) == error_mark_node
       || (flag_zero_initialized_in_bss
 	  && initializer_zerop (DECL_INITIAL (decl))))
Index: gcc-4_8-test2/gcc/testsuite/gcc.target/powerpc/sd-pwr6.c
===================================================================
--- gcc-4_8-test2.orig/gcc/testsuite/gcc.target/powerpc/sd-pwr6.c
+++ gcc-4_8-test2/gcc/testsuite/gcc.target/powerpc/sd-pwr6.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
 /* { dg-options "-O2 -mcpu=power6 -mhard-dfp" } */
 /* { dg-final { scan-assembler-not   "lfiwzx"   } } */
Index: gcc-4_8-test2/gcc/testsuite/gcc.target/powerpc/sd-vsx.c
===================================================================
--- gcc-4_8-test2.orig/gcc/testsuite/gcc.target/powerpc/sd-vsx.c
+++ gcc-4_8-test2/gcc/testsuite/gcc.target/powerpc/sd-vsx.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
 /* { dg-options "-O2 -mcpu=power7 -mhard-dfp" } */
 /* { dg-final { scan-assembler-times "lfiwzx" 2 } } */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]