Commit b61b0c33 authored by Gordana Cmiljanovic's avatar Gordana Cmiljanovic

MIPS: remove immediate constraint within CompareAndSwap.

Improper use of immediate constraint is slightly non-optimal with gcc/gnu-as
but may cause breakage with clang.
parent 2e5123a3
...@@ -65,7 +65,7 @@ inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, ...@@ -65,7 +65,7 @@ inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
"2:\n" "2:\n"
".set pop\n" ".set pop\n"
: "=&r" (prev), "=m" (*ptr), "=&r" (tmp) : "=&r" (prev), "=m" (*ptr), "=&r" (tmp)
: "Ir" (old_value), "r" (new_value), "m" (*ptr) : "r" (old_value), "r" (new_value), "m" (*ptr)
: "memory"); : "memory");
return prev; return prev;
} }
...@@ -197,7 +197,7 @@ inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr, ...@@ -197,7 +197,7 @@ inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
"2:\n" "2:\n"
".set pop\n" ".set pop\n"
: "=&r" (prev), "=m" (*ptr), "=&r" (tmp) : "=&r" (prev), "=m" (*ptr), "=&r" (tmp)
: "Ir" (old_value), "r" (new_value), "m" (*ptr) : "r" (old_value), "r" (new_value), "m" (*ptr)
: "memory"); : "memory");
return prev; return prev;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment