]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ppc64-abi-2.c (MAKE_SLOT): New macro to construct parameter slot value in endian...
authorUlrich Weigand <uweigand@de.ibm.com>
Tue, 19 Nov 2013 17:12:14 +0000 (17:12 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Tue, 19 Nov 2013 17:12:14 +0000 (17:12 +0000)
* 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: r205047

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c

index ab2433139dce76ef801a891eb563b75d9092ac13..7235aaf8a31b290688900e082f63749a06f28dbe 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2013-11-19  Jan Hubicka  <jh@suse.cz>
 
        * ipa/devirt9.C: Fix prevoius change.
index fdb781554c688e8e6cf18701690010940df49567..e4825973b113909f94c42b227fc45536e78de831 100644 (file)
@@ -121,6 +121,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
@@ -228,8 +234,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();
 }
 
@@ -270,8 +276,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();
 }
 
@@ -298,8 +304,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();
 }