On Wed, Oct 09, 2013 at 10:56:33AM +0100, Richard Sandiford wrote:
> gcc/testsuite/
>       * gcc.target/i386/asm-rename-1.c: New file.
> 
> Index: gcc/testsuite/gcc.target/i386/asm-rename-1.c
> ===================================================================
> --- /dev/null 2013-10-09 10:21:20.288269980 +0100
> +++ gcc/testsuite/gcc.target/i386/asm-rename-1.c      2013-10-09 
> 10:49:02.941805955 +0100
> @@ -0,0 +1,8 @@
> +void sync_synchronize (void) __asm ("__sync_synchronize");
> +void sync_synchronize (void)
> +{
> +  __sync_synchronize ();
> +}
> +/* { dg-final { scan-assembler "__sync_synchronize" } } */
> +/* { dg-final { scan-assembler "\t(lock;|mfence)" } } */

AFAIK {%;} doesn't always expand to ;, for -masm=intel or
if HAVE_AS_IX86_REP_LOCK_PREFIX then it will expand without.
So perhaps you should take the ; out.  And I'll leave to Honza
to comment whether he doesn't intend to make the above not to
work soon.

BTW, not sure if the __asm string doesn't need some adjustment if
__USER_LABEL_PREFIX__ is not empty.

> +/* { dg-final { scan-assembler-not "\tcall" } } */

        Jakub

Reply via email to