]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc-have-sync-compare-and-swap.c: Align the 16 byte variable used for atomic operations.
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>
Fri, 7 Feb 2014 14:21:29 +0000 (14:21 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Fri, 7 Feb 2014 14:21:29 +0000 (14:21 +0000)
2014-02-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* gcc.dg/gcc-have-sync-compare-and-swap.c: Align the 16 byte
variable used for atomic operations.

From-SVN: r207600

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c

index 2e121458198adfaa830fbd7d9294d39eddb5689d..e1ccc2d7547a1a52b8a57659af74c2e2fe0c6cc5 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+       * gcc.dg/gcc-have-sync-compare-and-swap.c: Align the 16 byte
+       variable used for atomic operations.
+
 2014-02-07  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/60092
index faed818d50052501bf67b078ff0dcfbeee479069..5affeba19f23ea88bd3418378227967acf358f58 100644 (file)
@@ -40,10 +40,12 @@ void f8()
 #endif
 }
 
+/* aligned (16): On S/390 16 byte compare and swap operations are only
+   available if the memory operand resides on a 16 byte boundary.  */
 void f16()
 {
 #ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
-  typedef int __attribute__ ((__mode__ (__TI__))) ti_int_type;
+  typedef int __attribute__ ((__mode__ (__TI__), aligned (16))) ti_int_type;
   ti_int_type ti_int;
   __sync_bool_compare_and_swap (&ti_int, (ti_int_type)0, (ti_int_type)1);
 #endif