This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] sync builtin testcase: Add alignment attribute on TImode variable
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 7 Feb 2014 14:32:53 +0100
- Subject: Re: [PATCH] sync builtin testcase: Add alignment attribute on TImode variable
- Authentication-results: sourceware.org; auth=none
- References: <20140207131244 dot GA1098 at bart>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Feb 07, 2014 at 02:12:44PM +0100, Andreas Krebbel wrote:
> 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.
Ok.
> --- a/gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c
> +++ b/gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c
> @@ -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
Jakub