Bug 1210399 - IonMonkey: MIPS: Safe for races. r=lth
authorHeiher <r@hev.cc>
Fri, 02 Oct 2015 06:33:31 +0800
changeset 265621 86d816333f8f38e21c134ca7e55bcedd2aba2314
parent 265620 4f43cdaedec3f184d54699078ed245b16027770d
child 265622 95fb2b552c0da3cd3264d45be56bcab2fedfe424
push id15472
push usercbook@mozilla.com
push dateFri, 02 Oct 2015 11:51:34 +0000
treeherderfx-team@2c33ef6b27e0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1210399
milestone44.0a1
Bug 1210399 - IonMonkey: MIPS: Safe for races. r=lth --- .../jit/mips-shared/AtomicOperations-mips-shared.h | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+)
js/src/jit/mips-shared/AtomicOperations-mips-shared.h
--- a/js/src/jit/mips-shared/AtomicOperations-mips-shared.h
+++ b/js/src/jit/mips-shared/AtomicOperations-mips-shared.h
@@ -151,16 +151,42 @@ js::jit::AtomicOperations::fetchXorSeqCs
     return __sync_fetch_and_xor(addr, val);
 # else
     return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST);
 # endif
 }
 
 template<typename T>
 inline T
+js::jit::AtomicOperations::loadSafeWhenRacy(T* addr)
+{
+    return *addr;               // FIXME (1208663): not yet safe
+}
+
+template<typename T>
+inline void
+js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val)
+{
+    *addr = val;                // FIXME (1208663): not yet safe
+}
+
+inline void
+js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src, size_t nbytes)
+{
+    ::memcpy(dest, src, nbytes); // FIXME (1208663): not yet safe
+}
+
+inline void
+js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
+{
+    ::memmove(dest, src, nbytes); // FIXME (1208663): not yet safe
+}
+
+template<typename T>
+inline T
 js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val)
 {
     MOZ_ASSERT(sizeof(T) < 8 || isLockfree8());
 # ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
     T v;
     __sync_synchronize();
     do {
 	v = *addr;