IBM Z: Fix 5 tests in 31-bit mode

Message ID 20210723124744.106949-1-iii@linux.ibm.com
State New
Headers show
Series
  • IBM Z: Fix 5 tests in 31-bit mode
Related show

Commit Message

Richard Biener via Gcc-patches July 23, 2021, 12:47 p.m.
Bootstrapped and regtested on s390x-redhat-linux.  Ok for master?



gcc/testsuite/ChangeLog:

	* gcc.target/s390/global-array-element-pic2.c: Add -mzarch, add
	an expectation for 31-bit mode.
	* gcc.target/s390/load-imm64-1.c: Use unsigned long long.
	* gcc.target/s390/load-imm64-2.c: Likewise.
	* gcc.target/s390/vector/long-double-vx-macro-off-on.c: Use
	-mzarch.
	* gcc.target/s390/vector/long-double-vx-macro-on-off.c:
	Likewise.
---
 gcc/testsuite/gcc.target/s390/global-array-element-pic2.c    | 5 +++--
 gcc/testsuite/gcc.target/s390/load-imm64-1.c                 | 4 ++--
 gcc/testsuite/gcc.target/s390/load-imm64-2.c                 | 4 ++--
 .../gcc.target/s390/vector/long-double-vx-macro-off-on.c     | 2 +-
 .../gcc.target/s390/vector/long-double-vx-macro-on-off.c     | 2 +-
 5 files changed, 9 insertions(+), 8 deletions(-)

-- 
2.31.1

Comments

Richard Biener via Gcc-patches July 28, 2021, 3:58 p.m. | #1
On 7/23/21 2:47 PM, Ilya Leoshkevich wrote:
> Bootstrapped and regtested on s390x-redhat-linux.  Ok for master?

> 

> 

> 

> gcc/testsuite/ChangeLog:

> 

> 	* gcc.target/s390/global-array-element-pic2.c: Add -mzarch, add

> 	an expectation for 31-bit mode.

> 	* gcc.target/s390/load-imm64-1.c: Use unsigned long long.

> 	* gcc.target/s390/load-imm64-2.c: Likewise.

> 	* gcc.target/s390/vector/long-double-vx-macro-off-on.c: Use

> 	-mzarch.

> 	* gcc.target/s390/vector/long-double-vx-macro-on-off.c:

> 	Likewise.


Ok. Thanks!

Andreas

Patch

diff --git a/gcc/testsuite/gcc.target/s390/global-array-element-pic2.c b/gcc/testsuite/gcc.target/s390/global-array-element-pic2.c
index 72b87d40b85..0ee10841cac 100644
--- a/gcc/testsuite/gcc.target/s390/global-array-element-pic2.c
+++ b/gcc/testsuite/gcc.target/s390/global-array-element-pic2.c
@@ -1,6 +1,6 @@ 
 /* Test accesses to global array elements in PIC code.  */
 /* { dg-do compile } */
-/* { dg-options "-O1 -march=z10 -fPIC" } */
+/* { dg-options "-O1 -march=z10 -mzarch -fPIC" } */
 
 extern char a[] __attribute__ ((aligned (2)));
 extern char *b;
@@ -8,6 +8,7 @@  extern char *b;
 void c()
 {
   b = a + 4;
-  /* { dg-final { scan-assembler "(?n)\n\tlgrl\t%r\\d+,a@GOTENT\n" } } */
+  /* { dg-final { scan-assembler "(?n)\n\tlgrl\t%r\\d+,a@GOTENT\n" { target lp64 } } } */
+  /* { dg-final { scan-assembler "(?n)\n\tlrl\t%r\\d+,a@GOTENT\n" { target { ! lp64 } } } } */
   /* { dg-final { scan-assembler-not "(?n)\n\tlarl\t%r\\d+,a\[^@\]" } } */
 }
diff --git a/gcc/testsuite/gcc.target/s390/load-imm64-1.c b/gcc/testsuite/gcc.target/s390/load-imm64-1.c
index 03d17f59096..8e812f2f01d 100644
--- a/gcc/testsuite/gcc.target/s390/load-imm64-1.c
+++ b/gcc/testsuite/gcc.target/s390/load-imm64-1.c
@@ -4,10 +4,10 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -march=z9-109" } */
 
-unsigned long
+unsigned long long
 magic (void)
 {
-  return 0x3f08c5392f756cd;
+  return 0x3f08c5392f756cdULL;
 }
 
 /* { dg-final { scan-assembler-times {\n\tllihf\t} 1 { target lp64 } } } */
diff --git a/gcc/testsuite/gcc.target/s390/load-imm64-2.c b/gcc/testsuite/gcc.target/s390/load-imm64-2.c
index ee0ff3b0a91..c3536b4d031 100644
--- a/gcc/testsuite/gcc.target/s390/load-imm64-2.c
+++ b/gcc/testsuite/gcc.target/s390/load-imm64-2.c
@@ -4,10 +4,10 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -march=z10" } */
 
-unsigned long
+unsigned long long
 magic (void)
 {
-  return 0x3f08c5392f756cd;
+  return 0x3f08c5392f756cdULL;
 }
 
 /* { dg-final { scan-assembler-times {\n\tllihf\t} 1 { target lp64 } } } */
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-vx-macro-off-on.c b/gcc/testsuite/gcc.target/s390/vector/long-double-vx-macro-off-on.c
index 2d67679bb11..513912e669d 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-vx-macro-off-on.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-vx-macro-off-on.c
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target target_attribute } */
-/* { dg-options "-march=z14" } */
+/* { dg-options "-march=z14 -mzarch" } */
 #if !defined(__LONG_DOUBLE_VX__)
 #error
 #endif
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-vx-macro-on-off.c b/gcc/testsuite/gcc.target/s390/vector/long-double-vx-macro-on-off.c
index 6f264313408..6b3cb321338 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-vx-macro-on-off.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-vx-macro-on-off.c
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target target_attribute } */
-/* { dg-options "-march=z13" } */
+/* { dg-options "-march=z13 -mzarch" } */
 #if defined(__LONG_DOUBLE_VX__)
 #error
 #endif