+2014-09-28 Robert Suchanek <robert.suchanek@imgtec.com>
+
+ * gcc.target/mips/20140928.c: New test.
+
2014-09-27 Andi Kleen <ak@linux.intel.com>
* gcc.target/i386/nop-mcount.c: Only run on Linux.
--- /dev/null
+/* { dg-do compile } */
+
+NOMIPS16 int NoBarrier_AtomicIncrement(volatile int* ptr, int increment) {
+ int temp, temp2;
+ __asm__ __volatile__(".set push\n"
+ ".set noreorder\n"
+ "1:\n"
+ "ll %0, 0(%3)\n"
+ "addu %1, %0, %2\n"
+ "sc %1, 0(%3)\n"
+ "beqz %1, 1b\n"
+ "nop\n"
+ "addu %1, %0, %2\n"
+ ".set pop\n"
+ : "=&r" (temp), "=&r" (temp2)
+ : "Ir" (increment), "r" (ptr)
+ : "memory");
+
+ return temp2;
+}