aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arc/mno-lock.c
blob: 62ac885ba995065472a09d0cec3bb4e856596e27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-mno-lock" } */
/* Would also like to assemble and check that we get the expected
   "Error: bad instruction" assembler messages, but at the moment our
   testharness can't do that.  */

int f (void *p)
{
  int i;

  __asm__("llock %0, [%1]\n\t"
	  "scond %0, [%1]" : "=&r"(i) : "r"(p));
  return i;
}