[committed] ft32 doesn't support trampolines.
[official-gcc.git] / gcc / testsuite / gcc.target / mips / 20140928.c
blob1b55bdd357cd4fc233acccb743136215a1497f67
1 /* { dg-do compile } */
3 NOMIPS16 int NoBarrier_AtomicIncrement(volatile int* ptr, int increment) {
4 int temp, temp2;
5 __asm__ __volatile__(".set push\n"
6 ".set noreorder\n"
7 "1:\n"
8 "ll %0, 0(%3)\n"
9 "addu %1, %0, %2\n"
10 "sc %1, 0(%3)\n"
11 "beqz %1, 1b\n"
12 "nop\n"
13 "addu %1, %0, %2\n"
14 ".set pop\n"
15 : "=&r" (temp), "=&r" (temp2)
16 : "Ir" (increment), "r" (ptr)
17 : "memory");
19 return temp2;