[tbb-commits] [tor-browser] 07/36: Bug 1786619 - Use fallback atomic operations on ARM < v7. r=jandem, a=RyanVM

gitolite role git at cupani.torproject.org
Thu Oct 13 07:50:55 UTC 2022


This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to annotated tag FIREFOX_102_4_0esr_BUILD1
in repository tor-browser.

commit d36b48c834ebaac8643c5fea9027545458ea4198
Author: Mike Hommey <mh+mozilla at glandium.org>
AuthorDate: Mon Sep 19 22:21:24 2022 +0000

    Bug 1786619 - Use fallback atomic operations on ARM < v7. r=jandem, a=RyanVM
    
    Differential Revision: https://phabricator.services.mozilla.com/D157612
---
 js/src/jit/GenerateAtomicOperations.py                 | 4 +++-
 js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h | 7 ++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/js/src/jit/GenerateAtomicOperations.py b/js/src/jit/GenerateAtomicOperations.py
index d8a38a0bbbce..dd37c3b8e720 100644
--- a/js/src/jit/GenerateAtomicOperations.py
+++ b/js/src/jit/GenerateAtomicOperations.py
@@ -721,7 +721,9 @@ namespace jit {
 
 def generate_atomics_header(c_out):
     contents = ""
-    if cpu_arch in ("x86", "x86_64", "arm", "aarch64"):
+    if cpu_arch in ("x86", "x86_64", "aarch64") or (
+        cpu_arch == "arm" and int(buildconfig.substs["ARM_ARCH"]) >= 7
+    ):
         contents += "#define JS_HAVE_GENERATED_ATOMIC_OPS 1"
 
         # `fence` performs a full memory barrier.
diff --git a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
index 2e384337a312..8f700aaab34a 100644
--- a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
+++ b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
@@ -31,7 +31,8 @@
 // Explicitly exclude tier-1 platforms.
 
 #if (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \
-     defined(_M_IX86) || defined(__arm__) || defined(__aarch64__))
+     defined(_M_IX86) || (defined(__arm__) && __ARM_ARCH >= 7) ||   \
+     defined(__aarch64__))
 #  error "Do not use on a tier-1 platform where inline assembly is available"
 #endif
 
@@ -56,6 +57,10 @@
 #  define HAS_64BIT_LOCKFREE
 #endif
 
+#if defined(__arm__)
+#  define HAS_64BIT_ATOMICS
+#endif
+
 #if defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
     defined(__PPC64LE__)
 #  define HAS_64BIT_ATOMICS

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list