]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: [multiple changes]
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Fri, 4 Apr 2014 13:56:13 +0000 (13:56 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Fri, 4 Apr 2014 13:56:13 +0000 (13:56 +0000)
2014-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

Backport from mainline
2013-11-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gfortran.dg/nan_7.f90: Disable for little endian PowerPC.

Backport from mainline r205106:

2013-11-20  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

* gcc.target/powerpc/darwin-longlong.c (msw): Make endian-safe.

Backport from mainline r205046:

2013-11-19  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

* gcc.target/powerpc/ppc64-abi-2.c (MAKE_SLOT): New macro to
construct parameter slot value in endian-independent way.
(fcevv, fciievv, fcvevv): Use it.

From-SVN: r209092

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/darwin-longlong.c
gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c
gcc/testsuite/gfortran.dg/nan_7.f90

index 15ba7f8c462c955bbaa77d1975cdda53f2e3119a..313857af14a2acb93166dd143a74807e5292bb38 100644 (file)
@@ -1,3 +1,24 @@
+2014-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       Backport from mainline
+       2013-11-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       * gfortran.dg/nan_7.f90: Disable for little endian PowerPC.
+
+       Backport from mainline r205106:
+
+       2013-11-20  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
+       * gcc.target/powerpc/darwin-longlong.c (msw): Make endian-safe.
+
+       Backport from mainline r205046:
+
+       2013-11-19  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
+       * gcc.target/powerpc/ppc64-abi-2.c (MAKE_SLOT): New macro to
+       construct parameter slot value in endian-independent way.
+       (fcevv, fciievv, fcvevv): Use it.
+
 2014-04-04  Bill Schmidt <wschmidt@linux.vnet.ibm.com>
 
        Power8 HTM Support
index 0692b3d80699895b25ac364b87b5a01777defcfb..14b56d0828bb92259acc4e724ef8ee7cf4e7081c 100644 (file)
@@ -11,7 +11,11 @@ int  msw(long long in)
     int  i[2];
   } ud;
   ud.ll = in;
+#ifdef __LITTLE_ENDIAN__
+  return ud.i[1];
+#else
   return ud.i[0];
+#endif
 }
 
 int main()
index a9883d9e3355ddd57b219829e42ff9cf89e3098d..d13b49eaa25236039d812870e0b97a7d55f1766f 100644 (file)
@@ -119,6 +119,12 @@ typedef union
   vector int v;
 } vector_int_t;
 
+#ifdef __LITTLE_ENDIAN__
+#define MAKE_SLOT(x, y) ((long)x | ((long)y << 32))
+#else
+#define MAKE_SLOT(x, y) ((long)y | ((long)x << 32))
+#endif
+
 /* Paramter passing.
    s : gpr 3
    v : vpr 2
@@ -226,8 +232,8 @@ fcevv (char *s, ...)
   sp = __builtin_frame_address(0);
   sp = sp->backchain;
   
-  if (sp->slot[2].l != 0x100000002ULL
-      || sp->slot[4].l != 0x500000006ULL)
+  if (sp->slot[2].l != MAKE_SLOT (1, 2)
+      || sp->slot[4].l !=  MAKE_SLOT (5, 6))
     abort();
 }
 
@@ -268,8 +274,8 @@ fciievv (char *s, int i, int j, ...)
   sp = __builtin_frame_address(0);
   sp = sp->backchain;
   
-  if (sp->slot[4].l != 0x100000002ULL
-      || sp->slot[6].l != 0x500000006ULL)
+  if (sp->slot[4].l != MAKE_SLOT (1, 2)
+      || sp->slot[6].l !=  MAKE_SLOT (5, 6))
     abort();
 }
 
@@ -296,8 +302,8 @@ fcvevv (char *s, vector int x, ...)
   sp = __builtin_frame_address(0);
   sp = sp->backchain;
   
-  if (sp->slot[4].l != 0x100000002ULL
-      || sp->slot[6].l != 0x500000006ULL)
+  if (sp->slot[4].l != MAKE_SLOT (1, 2)
+      || sp->slot[6].l !=  MAKE_SLOT (5, 6))
     abort();
 }
 
index 12c7b3ce40f59110fdf820c5f060c0889374480a..4c2f62eeaed0002717392e122593bedd76b2a4cb 100644 (file)
@@ -2,6 +2,7 @@
 ! { dg-options "-fno-range-check" }
 ! { dg-require-effective-target fortran_real_16 }
 ! { dg-require-effective-target fortran_integer_16 }
+! { dg-skip-if "" { "powerpc*le-*-*" } { "*" } { "" } }
 ! PR47293 NAN not correctly read
 character(len=200) :: str
 real(16) :: r