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.
changes/61/215561/1
Gordana Cmiljanovic 10 years ago
parent 2e5123a399
commit b61b0c3304
  1. 4
      src/google/protobuf/stubs/atomicops_internals_mips_gcc.h

@ -65,7 +65,7 @@ inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
"2:\n"
".set pop\n"
: "=&r" (prev), "=m" (*ptr), "=&r" (tmp)
: "Ir" (old_value), "r" (new_value), "m" (*ptr)
: "r" (old_value), "r" (new_value), "m" (*ptr)
: "memory");
return prev;
}
@ -197,7 +197,7 @@ inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
"2:\n"
".set pop\n"
: "=&r" (prev), "=m" (*ptr), "=&r" (tmp)
: "Ir" (old_value), "r" (new_value), "m" (*ptr)
: "r" (old_value), "r" (new_value), "m" (*ptr)
: "memory");
return prev;
}

Loading…
Cancel
Save