Hi, This patch (diff-le-tests) backports adjustments to a few tests for powerpc64le and the ELFv2 ABI.
Thanks, Bill 2014-03-29 Bill Schmidt <wschm...@linux.vnet.ibm.com> Backport from mainline 2013-11-27 Bill Schmidt <wschm...@linux.vnet.ibm.com> * gfortran.dg/nan_7.f90: Disable for little endian PowerPC. Backport from mainline r205106: 2013-11-20 Ulrich Weigand <ulrich.weig...@de.ibm.com> * gcc.target/powerpc/darwin-longlong.c (msw): Make endian-safe. Backport from mainline r205046: 2013-11-19 Ulrich Weigand <ulrich.weig...@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. Index: gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c =================================================================== --- gcc-4_8-branch.orig/gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c 2013-12-28 17:41:32.430628909 +0100 +++ gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c 2013-12-28 17:50:39.655337721 +0100 @@ -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: gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/darwin-longlong.c =================================================================== --- gcc-4_8-branch.orig/gcc/testsuite/gcc.target/powerpc/darwin-longlong.c 2013-12-28 17:41:32.430628909 +0100 +++ gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/darwin-longlong.c 2013-12-28 17:50:39.659337741 +0100 @@ -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: gcc-4_8-branch/gcc/testsuite/gfortran.dg/nan_7.f90 =================================================================== --- gcc-4_8-branch.orig/gcc/testsuite/gfortran.dg/nan_7.f90 2013-12-28 17:41:32.430628909 +0100 +++ gcc-4_8-branch/gcc/testsuite/gfortran.dg/nan_7.f90 2013-12-28 17:50:39.662337756 +0100 @@ -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