Title: [281716] branches/safari-612.1.29.14-branch/Source/_javascript_Core/assembler/AssemblerBuffer.h
Revision
281716
Author
[email protected]
Date
2021-08-27 12:38:30 -0700 (Fri, 27 Aug 2021)

Log Message

Apply patch. rdar://problem/82450034

Modified Paths


Diff

Modified: branches/safari-612.1.29.14-branch/Source/_javascript_Core/assembler/AssemblerBuffer.h (281715 => 281716)


--- branches/safari-612.1.29.14-branch/Source/_javascript_Core/assembler/AssemblerBuffer.h	2021-08-27 19:37:37 UTC (rev 281715)
+++ branches/safari-612.1.29.14-branch/Source/_javascript_Core/assembler/AssemblerBuffer.h	2021-08-27 19:38:30 UTC (rev 281716)
@@ -203,8 +203,29 @@
     };
 
 #if CPU(ARM64E)
+#if PLATFORM(MAC)
     class ARM64EHash {
     public:
+        ARM64EHash(void* initialHash)
+            : m_hash(static_cast<uint32_t>(bitwise_cast<uintptr_t>(initialHash)))
+        {
+        }
+
+        ALWAYS_INLINE uint32_t update(uint32_t value, uint32_t, void*)
+        {
+            uint64_t input = value ^ m_hash;
+            uint64_t a = static_cast<uint32_t>(tagInt(input, static_cast<PtrTag>(0)) >> 39);
+            uint64_t b = tagInt(input, static_cast<PtrTag>(0xb7e151628aed2a6a)) >> 23;
+            m_hash = a ^ b;
+            return m_hash;
+        }
+
+    private:
+        uint32_t m_hash;
+    };
+#else
+    class ARM64EHash {
+    public:
         ARM64EHash(void* diversifier)
         {
             setUpdatedHash(0, 0, diversifier);
@@ -259,7 +280,8 @@
 
         uint64_t m_hash;
     };
-#endif
+#endif // PLATFORM(MAC)
+#endif // CPU(ARM64E)
 
     class AssemblerBuffer {
     public:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to