diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/arc/mno-lock.c')
-rw-r--r-- | gcc/testsuite/gcc.target/arc/mno-lock.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arc/mno-lock.c b/gcc/testsuite/gcc.target/arc/mno-lock.c new file mode 100644 index 00000000000..62ac885ba99 --- /dev/null +++ b/gcc/testsuite/gcc.target/arc/mno-lock.c @@ -0,0 +1,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; +} |