MIPS: remove immediate constraint within CompareAndSwap.
Improper use of immediate constraint is slightly non-optimal with gcc/gnu-as but causes breakage with clang. BUG= Review URL: https://codereview.chromium.org/841263002 Cr-Commit-Position: refs/heads/master@{#26016}
This commit is contained in:
parent
77e3e48ee2
commit
eb68d6fe13
@ -59,7 +59,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;
|
||||||
}
|
}
|
||||||
@ -196,7 +196,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;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
|
|||||||
"2:\n"
|
"2:\n"
|
||||||
".set pop\n"
|
".set pop\n"
|
||||||
: "=&r" (prev), "=&r" (tmp)
|
: "=&r" (prev), "=&r" (tmp)
|
||||||
: "Ir" (old_value), "r" (new_value), "r" (ptr)
|
: "r" (old_value), "r" (new_value), "r" (ptr)
|
||||||
: "memory");
|
: "memory");
|
||||||
return prev;
|
return prev;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user