Bug 1546169 - Enable 64-bit atomics for more platforms in AtomicOperations-feeling-lucky-gcc.h. r=lth
authorRobin Templeton <robin@igalia.com>
Fri, 26 Apr 2019 21:03:37 +0000
changeset 471612 0e3eef30f66b0c5fe6886f46011f7e7210cbfab2
parent 471611 b86894409b1b4481691a82b33f3107254511591c
child 471613 013a4420b53c6697abb8609b6d576b1cc07991e2
push id84190
push usercsabou@mozilla.com
push dateFri, 26 Apr 2019 21:37:38 +0000
treeherderautoland@0e3eef30f66b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1546169
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1546169 - Enable 64-bit atomics for more platforms in AtomicOperations-feeling-lucky-gcc.h. r=lth Differential Revision: https://phabricator.services.mozilla.com/D28394
js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
--- a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
+++ b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
@@ -37,17 +37,18 @@
 #  error "Do not use this code on a tier-1 platform when a JIT is available"
 #endif
 
 #if !(defined(__clang__) || defined(__GNUC__))
 #  error "This file only for gcc/Clang"
 #endif
 
 // 64-bit atomics are not required by the JS spec, and you can compile
-// SpiderMonkey without them.
+// SpiderMonkey without them. 64-bit atomics are required for BigInt
+// support.
 //
 // 64-bit lock-free atomics are required for WebAssembly, but gating in the
 // WebAssembly subsystem ensures that no WebAssembly-supporting platforms need
 // code in this file.
 
 #if defined(JS_SIMULATOR_ARM64) || defined(JS_SIMULATOR_ARM)
 // On some x86 (32-bit) systems this will not work because the compiler does not
 // open-code 64-bit atomics.  If so, try linking with -latomic.  If that doesn't
@@ -64,16 +65,23 @@
 
 #ifdef __sparc__
 #  ifdef __LP64__
 #    define HAS_64BIT_ATOMICS
 #    define HAS_64BIT_LOCKFREE
 #  endif
 #endif
 
+#ifdef JS_CODEGEN_NONE
+#  ifdef JS_64BIT
+#    define HAS_64BIT_ATOMICS
+#    define HAS_64BIT_LOCKFREE
+#  endif
+#endif
+
 // The default implementation tactic for gcc/clang is to use the newer __atomic
 // intrinsics added for use in C++11 <atomic>.  Where that isn't available, we
 // use GCC's older __sync functions instead.
 //
 // ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS is kept as a backward compatible
 // option for older compilers: enable this to use GCC's old __sync functions
 // instead of the newer __atomic functions.  This will be required for GCC 4.6.x
 // and earlier, and probably for Clang 3.1, should we need to use those