Patchwork [1/2] PowerPC testsuite clean up

login
register
mail settings
Submitter Sebastian Huber
Date Jan. 29, 2013, 2:38 p.m.
Message ID <1359470337-4709-1-git-send-email-sebastian.huber@embedded-brains.de>
Download mbox | patch
Permalink /patch/216554/
State New
Headers show

Comments

Sebastian Huber - Jan. 29, 2013, 2:38 p.m.
2013-01-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* lib/target-supports.exp
	(check_effective_target_powerpc_eabi_ok): New.
	* gcc.target/powerpc/ppc-eabi.c: Use require effective target
	powerpc_eabi_ok.
	* gcc.target/powerpc/ppc-sdata-1.c: Likewise.
	* gcc.target/powerpc/spe-small-data-2.c: Likewise.
	* gcc.target/powerpc/ppc-sdata-2.c: Add powerpc-*-rtems*.
	* gcc.target/powerpc/pr51623.c: Likewise.
	* gcc.target/powerpc/ppc-stackalign-1.c: Likewise.
	* gcc.target/powerpc/ppc-ldstruct.c: Likewise.
	* gcc.target/powerpc/spe-small-data-2.c: Do not run, compile
	only.
---
 gcc/testsuite/gcc.target/powerpc/ppc-eabi.c        |    3 ++-
 gcc/testsuite/gcc.target/powerpc/ppc-ldstruct.c    |    2 +-
 gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c     |    3 ++-
 gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c     |    2 +-
 .../gcc.target/powerpc/ppc-stackalign-1.c          |    2 +-
 gcc/testsuite/gcc.target/powerpc/pr51623.c         |    2 +-
 .../gcc.target/powerpc/spe-small-data-2.c          |    3 ++-
 gcc/testsuite/lib/target-supports.exp              |   12 ++++++++++++
 8 files changed, 22 insertions(+), 7 deletions(-)
Sebastian Huber - Feb. 6, 2013, 9:20 a.m.
Would someone mind having a look at this.

On 01/29/2013 03:38 PM, Sebastian Huber wrote:
> 2013-01-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
>
> 	* lib/target-supports.exp
> 	(check_effective_target_powerpc_eabi_ok): New.
> 	* gcc.target/powerpc/ppc-eabi.c: Use require effective target
> 	powerpc_eabi_ok.
> 	* gcc.target/powerpc/ppc-sdata-1.c: Likewise.
> 	* gcc.target/powerpc/spe-small-data-2.c: Likewise.
> 	* gcc.target/powerpc/ppc-sdata-2.c: Add powerpc-*-rtems*.
> 	* gcc.target/powerpc/pr51623.c: Likewise.
> 	* gcc.target/powerpc/ppc-stackalign-1.c: Likewise.
> 	* gcc.target/powerpc/ppc-ldstruct.c: Likewise.
> 	* gcc.target/powerpc/spe-small-data-2.c: Do not run, compile
> 	only.
Mike Stump - Feb. 6, 2013, 8:44 p.m.
On Feb 6, 2013, at 1:20 AM, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote:
> Would someone mind having a look at this.

GIven where we are in the release cycle, I'd prefer a ppc person to double check (by reviewing and approving).  I don't see reason why it cannot be approved...
Mike Stump - Feb. 6, 2013, 8:52 p.m.
On Feb 6, 2013, at 1:20 AM, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote:
> Would someone mind having a look at this.

GIven where we are in the release cycle, I'd prefer a ppc person to double check (by reviewing and approving).  I don't see reason why it cannot be approved…

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-eabi.c b/gcc/testsuite/gcc.target/powerpc/ppc-eabi.c
index 47ba1a7..cd15586 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-eabi.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-eabi.c
@@ -1,4 +1,5 @@ 
 /* PR target/16952 */
-/* { dg-do compile { target { powerpc*-*-linux* && ilp32 } } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_eabi_ok } */
 /* { dg-options "-meabi -mrelocatable" } */
 char *s = "boo";
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-ldstruct.c b/gcc/testsuite/gcc.target/powerpc/ppc-ldstruct.c
index da6001f..ffb4264 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-ldstruct.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-ldstruct.c
@@ -1,4 +1,4 @@ 
-/* { dg-do run { target powerpc*-*-eabi* powerpc*-*-elf* powerpc*-*-linux* } } */
+/* { dg-do run { target powerpc*-*-eabi* powerpc*-*-elf* powerpc*-*-linux* powerpc*-*-rtems* } } */
 /* { dg-options "-O -mlong-double-128" } */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c
index 5f39d86..efd5a5e 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c
@@ -1,5 +1,6 @@ 
-/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */
+/* { dg-do compile } */
 /* { dg-options "-O2 -fno-common -G 8 -meabi -msdata=eabi" } */
+/* { dg-require-effective-target powerpc_eabi_ok } */
 /* { dg-require-effective-target nonpic } */
 /* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata," } } */
 /* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata2," } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c b/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c
index f102b1d..570c81f 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c
@@ -1,4 +1,4 @@ 
-/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */
+/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* powerpc-*-rtems* } } } } */
 /* { dg-options "-O2 -fno-common -G 8 -msdata=sysv" } */
 /* { dg-require-effective-target nonpic } */
 /* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata," } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-stackalign-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-stackalign-1.c
index 465fc41..59bd39f 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-stackalign-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-stackalign-1.c
@@ -1,4 +1,4 @@ 
-/* { dg-do run { target powerpc*-*-linux* powerpc*-*-eabi* } } */
+/* { dg-do run { target powerpc*-*-linux* powerpc*-*-eabi* powerpc-*-rtems* } } */
 /* { dg-options {} } */
 
 /* Test stack pointer alignment against variable alloca.  */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr51623.c b/gcc/testsuite/gcc.target/powerpc/pr51623.c
index 37b7d65..2ac118c 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr51623.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr51623.c
@@ -1,5 +1,5 @@ 
 /* PR target/51623 */
-/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */
+/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* powerpc-*-rtems* } } } } */
 /* { dg-options "-mrelocatable -ffreestanding" } */
 
 /* This generated an error, since the compiler was calling
diff --git a/gcc/testsuite/gcc.target/powerpc/spe-small-data-2.c b/gcc/testsuite/gcc.target/powerpc/spe-small-data-2.c
index 2a466e3..5354e49 100644
--- a/gcc/testsuite/gcc.target/powerpc/spe-small-data-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/spe-small-data-2.c
@@ -1,5 +1,6 @@ 
 /* Verify that we don't ICE trying to put float data in .sdata2.  */
-/* { dg-do run { target { powerpc*-*-linux* && powerpc_spe } } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_eabi_ok } */
 /* { dg-options "-msdata=eabi -mcall-eabi -G 8" } */
 
 double x;
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 8b2fa29..5c3d9cc 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2605,6 +2605,18 @@  proc check_effective_target_arm_prefer_ldrd_strd { } {
     }  "-O2 -mthumb" ]
 }
 
+# Return 1 if this is a PowerPC target supporting -meabi.
+
+proc check_effective_target_powerpc_eabi_ok { } {
+    if { [istarget powerpc*-*-*] } {
+	return [check_no_compiler_messages powerpc_eabi_ok object {
+	    int dummy;
+	} "-meabi"]
+    } else {
+	return 0
+    }
+}
+
 # Return 1 if this is a PowerPC target with floating-point registers.
 
 proc check_effective_target_powerpc_fprs { } {