This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, rs6000, committed] Change "vector long" to "vector long long" in recently added tests
- 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: Tue, 04 Mar 2014 11:10:51 -0600
- Subject: [PATCH, rs6000, committed] Change "vector long" to "vector long long" in recently added tests
- Authentication-results: sourceware.org; auth=none
Hi,
I have been accidentally not testing -m32 for the last few weeks, so I
missed some compatibility issues with recent tests. "vector long"
produces 2x64 vectors for -m64, but 4x32 vectors for -m32. This caused
some of the tests to fail on the AIX tester. For compatibility across
both, I need to use "vector long long" instead. I've made this change
throughout the recently added vector API tests.
Tested on powerpc64le-unknown-linux-gnu with -m64, on
powerpc64-unknown-linux-gnu with -m32/-m64, and on gcc111.fsffrance.org
running AIX 7.1. The tests now pass in all environments (except for a
handful that are failing on AIX for another reason). Committed as
obvious (in retrospect :).
Thanks,
Bill
2014-03-04 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc.dg/vmx/extract-vsx.c: Replace "vector long" with "vector
long long" throughout.
* gcc.dg/vmx/extract-vsx-be-order.c: Likewise.
* gcc.dg/vmx/insert-vsx.c: Likewise.
* gcc.dg/vmx/insert-vsx-be-order.c: Likewise.
* gcc.dg/vmx/ld-vsx.c: Likewise.
* gcc.dg/vmx/ld-vsx-be-order.c: Likewise.
* gcc.dg/vmx/ldl-vsx.c: Likewise.
* gcc.dg/vmx/ldl-vsx-be-order.c: Likewise.
* gcc.dg/vmx/merge-vsx.c: Likewise.
* gcc.dg/vmx/merge-vsx-be-order.c: Likewise.
* gcc.dg/vmx/st-vsx.c: Likewise.
* gcc.dg/vmx/st-vsx-be-order.c: Likewise.
* gcc.dg/vmx/stl-vsx.c: Likewise.
* gcc.dg/vmx/stl-vsx-be-order.c: Likewise.
Index: gcc/testsuite/gcc.dg/vmx/extract-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/extract-vsx-be-order.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/extract-vsx-be-order.c (working copy)
@@ -6,7 +6,7 @@
static void test()
{
- vector long vl = {0, 1};
+ vector long long vl = {0, 1};
vector double vd = {0.0, 1.0};
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
Index: gcc/testsuite/gcc.dg/vmx/extract-vsx.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/extract-vsx.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/extract-vsx.c (working copy)
@@ -6,7 +6,7 @@
static void test()
{
- vector long vl = {0, 1};
+ vector long long vl = {0, 1};
vector double vd = {0.0, 1.0};
check (vec_extract (vl, 0) == 0, "vec_extract, vl, 0");
Index: gcc/testsuite/gcc.dg/vmx/insert-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/insert-vsx-be-order.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/insert-vsx-be-order.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static int vec_long_eq (vector long x, vector long y)
+static int vec_long_long_eq (vector long long x, vector long long y)
{
return (x[0] == y[0] && x[1] == y[1]);
}
@@ -16,19 +16,19 @@ static int vec_dbl_eq (vector double x, vector dou
static void test()
{
- vector long vl = {0, 1};
+ vector long long vl = {0, 1};
vector double vd = {0.0, 1.0};
- vector long vlr = vec_insert (2, vl, 0);
+ vector long long vlr = vec_insert (2, vl, 0);
vector double vdr = vec_insert (2.0, vd, 1);
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- vector long vler = {0, 2};
+ vector long long vler = {0, 2};
vector double vder = {2.0, 1.0};
#else
- vector long vler = {2, 1};
+ vector long long vler = {2, 1};
vector double vder = {0.0, 2.0};
#endif
- check (vec_long_eq (vlr, vler), "vl");
+ check (vec_long_long_eq (vlr, vler), "vl");
check (vec_dbl_eq (vdr, vder), "vd");
}
Index: gcc/testsuite/gcc.dg/vmx/insert-vsx.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/insert-vsx.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/insert-vsx.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static int vec_long_eq (vector long x, vector long y)
+static int vec_long_long_eq (vector long long x, vector long long y)
{
return (x[0] == y[0] && x[1] == y[1]);
}
@@ -16,13 +16,13 @@ static int vec_dbl_eq (vector double x, vector dou
static void test()
{
- vector long vl = {0, 1};
+ vector long long vl = {0, 1};
vector double vd = {0.0, 1.0};
- vector long vlr = vec_insert (2, vl, 0);
+ vector long long vlr = vec_insert (2, vl, 0);
vector double vdr = vec_insert (2.0, vd, 1);
- vector long vler = {2, 1};
+ vector long long vler = {2, 1};
vector double vder = {0.0, 2.0};
- check (vec_long_eq (vlr, vler), "vl");
+ check (vec_long_long_eq (vlr, vler), "vl");
check (vec_dbl_eq (vdr, vder), "vd");
}
Index: gcc/testsuite/gcc.dg/vmx/ld-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/ld-vsx-be-order.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/ld-vsx-be-order.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static unsigned long svul[2] __attribute__ ((aligned (16)));
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
static double svd[2] __attribute__ ((aligned (16)));
static void init ()
@@ -20,20 +20,20 @@ static void init ()
static void test ()
{
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- vector unsigned long evul = {1,0};
+ vector unsigned long long evul = {1,0};
vector double evd = {1.0,0.0};
#else
- vector unsigned long evul = {0,1};
+ vector unsigned long long evul = {0,1};
vector double evd = {0.0,1.0};
#endif
- vector unsigned long vul;
+ vector unsigned long long vul;
vector double vd;
unsigned i;
init ();
- vul = vec_ld (0, (vector unsigned long *)svul);
+ vul = vec_ld (0, (vector unsigned long long *)svul);
vd = vec_ld (0, (vector double *)svd);
for (i = 0; i < 2; ++i)
Index: gcc/testsuite/gcc.dg/vmx/ld-vsx.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/ld-vsx.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/ld-vsx.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static unsigned long svul[2] __attribute__ ((aligned (16)));
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
static double svd[2] __attribute__ ((aligned (16)));
static void init ()
@@ -19,16 +19,16 @@ static void init ()
static void test ()
{
- vector unsigned long evul = {0,1};
+ vector unsigned long long evul = {0,1};
vector double evd = {0.0,1.0};
- vector unsigned long vul;
+ vector unsigned long long vul;
vector double vd;
unsigned i;
init ();
- vul = vec_ld (0, (vector unsigned long *)svul);
+ vul = vec_ld (0, (vector unsigned long long *)svul);
vd = vec_ld (0, (vector double *)svd);
for (i = 0; i < 2; ++i)
Index: gcc/testsuite/gcc.dg/vmx/ldl-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/ldl-vsx-be-order.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/ldl-vsx-be-order.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static unsigned long svul[2] __attribute__ ((aligned (16)));
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
static double svd[2] __attribute__ ((aligned (16)));
static void init ()
@@ -20,20 +20,20 @@ static void init ()
static void test ()
{
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- vector unsigned long evul = {1,0};
+ vector unsigned long long evul = {1,0};
vector double evd = {1.0,0.0};
#else
- vector unsigned long evul = {0,1};
+ vector unsigned long long evul = {0,1};
vector double evd = {0.0,1.0};
#endif
- vector unsigned long vul;
+ vector unsigned long long vul;
vector double vd;
unsigned i;
init ();
- vul = vec_ldl (0, (vector unsigned long *)svul);
+ vul = vec_ldl (0, (vector unsigned long long *)svul);
vd = vec_ldl (0, (vector double *)svd);
for (i = 0; i < 2; ++i)
Index: gcc/testsuite/gcc.dg/vmx/ldl-vsx.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/ldl-vsx.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/ldl-vsx.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static unsigned long svul[2] __attribute__ ((aligned (16)));
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
static double svd[2] __attribute__ ((aligned (16)));
static void init ()
@@ -19,16 +19,16 @@ static void init ()
static void test ()
{
- vector unsigned long evul = {0,1};
+ vector unsigned long long evul = {0,1};
vector double evd = {0.0,1.0};
- vector unsigned long vul;
+ vector unsigned long long vul;
vector double vd;
unsigned i;
init ();
- vul = vec_ldl (0, (vector unsigned long *)svul);
+ vul = vec_ldl (0, (vector unsigned long long *)svul);
vd = vec_ldl (0, (vector double *)svd);
for (i = 0; i < 2; ++i)
Index: gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static int vec_long_eq (vector long x, vector long y)
+static int vec_long_long_eq (vector long long x, vector long long y)
{
return (x[0] == y[0] && x[1] == y[1]);
}
@@ -17,24 +17,24 @@ static int vec_double_eq (vector double x, vector
static void test()
{
/* Input vectors. */
- vector long vla = {-2,-1};
- vector long vlb = {0,1};
+ vector long long vla = {-2,-1};
+ vector long long vlb = {0,1};
vector double vda = {-2.0,-1.0};
vector double vdb = {0.0,1.0};
/* Result vectors. */
- vector long vlh, vll;
+ vector long long vlh, vll;
vector double vdh, vdl;
/* Expected result vectors. */
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- vector long vlrh = {1,-1};
- vector long vlrl = {0,-2};
+ vector long long vlrh = {1,-1};
+ vector long long vlrl = {0,-2};
vector double vdrh = {1.0,-1.0};
vector double vdrl = {0.0,-2.0};
#else
- vector long vlrh = {-2,0};
- vector long vlrl = {-1,1};
+ vector long long vlrh = {-2,0};
+ vector long long vlrl = {-1,1};
vector double vdrh = {-2.0,0.0};
vector double vdrl = {-1.0,1.0};
#endif
@@ -44,8 +44,8 @@ static void test()
vdh = vec_mergeh (vda, vdb);
vdl = vec_mergel (vda, vdb);
- check (vec_long_eq (vlh, vlrh), "vlh");
- check (vec_long_eq (vll, vlrl), "vll");
+ check (vec_long_long_eq (vlh, vlrh), "vlh");
+ check (vec_long_long_eq (vll, vlrl), "vll");
check (vec_double_eq (vdh, vdrh), "vdh" );
check (vec_double_eq (vdl, vdrl), "vdl" );
}
Index: gcc/testsuite/gcc.dg/vmx/merge-vsx.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/merge-vsx.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/merge-vsx.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static int vec_long_eq (vector long x, vector long y)
+static int vec_long_long_eq (vector long long x, vector long long y)
{
return (x[0] == y[0] && x[1] == y[1]);
}
@@ -17,18 +17,18 @@ static int vec_double_eq (vector double x, vector
static void test()
{
/* Input vectors. */
- vector long vla = {-2,-1};
- vector long vlb = {0,1};
+ vector long long vla = {-2,-1};
+ vector long long vlb = {0,1};
vector double vda = {-2.0,-1.0};
vector double vdb = {0.0,1.0};
/* Result vectors. */
- vector long vlh, vll;
+ vector long long vlh, vll;
vector double vdh, vdl;
/* Expected result vectors. */
- vector long vlrh = {-2,0};
- vector long vlrl = {-1,1};
+ vector long long vlrh = {-2,0};
+ vector long long vlrl = {-1,1};
vector double vdrh = {-2.0,0.0};
vector double vdrl = {-1.0,1.0};
@@ -37,8 +37,8 @@ static void test()
vdh = vec_mergeh (vda, vdb);
vdl = vec_mergel (vda, vdb);
- check (vec_long_eq (vlh, vlrh), "vlh");
- check (vec_long_eq (vll, vlrl), "vll");
+ check (vec_long_long_eq (vlh, vlrh), "vlh");
+ check (vec_long_long_eq (vll, vlrl), "vll");
check (vec_double_eq (vdh, vdrh), "vdh" );
check (vec_double_eq (vdl, vdrl), "vdl" );
}
Index: gcc/testsuite/gcc.dg/vmx/st-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/st-vsx-be-order.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/st-vsx-be-order.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static unsigned long svul[2] __attribute__ ((aligned (16)));
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
static double svd[2] __attribute__ ((aligned (16)));
static void check_arrays ()
@@ -20,14 +20,14 @@ static void check_arrays ()
static void test ()
{
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- vector unsigned long vul = {1,0};
+ vector unsigned long long vul = {1,0};
vector double vd = {1.0,0.0};
#else
- vector unsigned long vul = {0,1};
+ vector unsigned long long vul = {0,1};
vector double vd = {0.0,1.0};
#endif
- vec_st (vul, 0, (vector unsigned long *)svul);
+ vec_st (vul, 0, (vector unsigned long long *)svul);
vec_st (vd, 0, (vector double *)svd);
check_arrays ();
Index: gcc/testsuite/gcc.dg/vmx/st-vsx.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/st-vsx.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/st-vsx.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static unsigned long svul[2] __attribute__ ((aligned (16)));
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
static double svd[2] __attribute__ ((aligned (16)));
static void check_arrays ()
@@ -19,10 +19,10 @@ static void check_arrays ()
static void test ()
{
- vector unsigned long vul = {0,1};
+ vector unsigned long long vul = {0,1};
vector double vd = {0.0,1.0};
- vec_st (vul, 0, (vector unsigned long *)svul);
+ vec_st (vul, 0, (vector unsigned long long *)svul);
vec_st (vd, 0, (vector double *)svd);
check_arrays ();
Index: gcc/testsuite/gcc.dg/vmx/stl-vsx-be-order.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/stl-vsx-be-order.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/stl-vsx-be-order.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static unsigned long svul[2] __attribute__ ((aligned (16)));
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
static double svd[2] __attribute__ ((aligned (16)));
static void check_arrays ()
@@ -20,14 +20,14 @@ static void check_arrays ()
static void test ()
{
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- vector unsigned long vul = {1,0};
+ vector unsigned long long vul = {1,0};
vector double vd = {1.0,0.0};
#else
- vector unsigned long vul = {0,1};
+ vector unsigned long long vul = {0,1};
vector double vd = {0.0,1.0};
#endif
- vec_stl (vul, 0, (vector unsigned long *)svul);
+ vec_stl (vul, 0, (vector unsigned long long *)svul);
vec_stl (vd, 0, (vector double *)svd);
check_arrays ();
Index: gcc/testsuite/gcc.dg/vmx/stl-vsx.c
===================================================================
--- gcc/testsuite/gcc.dg/vmx/stl-vsx.c (revision 208287)
+++ gcc/testsuite/gcc.dg/vmx/stl-vsx.c (working copy)
@@ -4,7 +4,7 @@
#include "harness.h"
-static unsigned long svul[2] __attribute__ ((aligned (16)));
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
static double svd[2] __attribute__ ((aligned (16)));
static void check_arrays ()
@@ -19,10 +19,10 @@ static void check_arrays ()
static void test ()
{
- vector unsigned long vul = {0,1};
+ vector unsigned long long vul = {0,1};
vector double vd = {0.0,1.0};
- vec_stl (vul, 0, (vector unsigned long *)svul);
+ vec_stl (vul, 0, (vector unsigned long long *)svul);
vec_stl (vd, 0, (vector double *)svd);
check_arrays ();