diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/atomic-memory-2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/mips/atomic-memory-2.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/atomic-memory-2.c b/gcc/testsuite/gcc.target/mips/atomic-memory-2.c new file mode 100644 index 000000000..bc597ab2d --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/atomic-memory-2.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 isa>=2 -mabi=32" } */ +/* { dg-final { scan-assembler "addiu" } } */ +/* { dg-final { scan-assembler-not "subu" } } */ + +NOMIPS16 unsigned long +f(unsigned long *p) +{ + return __sync_fetch_and_sub (p, 5); +} |