Merge pull request #201 from gordana-cmiljanovic-imgtec/mips-atomic-ops-fix

MIPS: remove immediate constraint within CompareAndSwap.
pull/209/head
Feng Xiao 10 years ago
commit 43beb6268b
  1. 4
      src/google/protobuf/stubs/atomicops_internals_mips_gcc.h

@ -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,
"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;
} }

Loading…
Cancel
Save