Title: [236606] trunk/Source/_javascript_Core
Revision
236606
Author
[email protected]
Date
2018-09-28 11:46:52 -0700 (Fri, 28 Sep 2018)

Log Message

Gardening: speculative build fix.
<rdar://problem/44869924>

Not reviewed.

* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (236605 => 236606)


--- trunk/Source/_javascript_Core/ChangeLog	2018-09-28 18:39:51 UTC (rev 236605)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-09-28 18:46:52 UTC (rev 236606)
@@ -1,3 +1,13 @@
+2018-09-28  Mark Lam  <[email protected]>
+
+        Gardening: speculative build fix.
+        <rdar://problem/44869924>
+
+        Not reviewed.
+
+        * assembler/LinkBuffer.cpp:
+        (JSC::LinkBuffer::copyCompactAndLinkCode):
+
 2018-09-28  Guillaume Emont  <[email protected]>
 
         [JSC] [Armv7] Add a copy function argument to MacroAssemblerARMv7::link() and pass it down to the assembler's linking functions.

Modified: trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp (236605 => 236606)


--- trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp	2018-09-28 18:39:51 UTC (rev 236605)
+++ trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp	2018-09-28 18:46:52 UTC (rev 236606)
@@ -110,7 +110,7 @@
     uint8_t* inData = reinterpret_cast<uint8_t*>(m_assemblerStorage.buffer());
 
     uint8_t* codeOutData = m_code.dataLocation<uint8_t*>();
-#if CPU(ARM64E)
+#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
     const ARM64EHash assemblerBufferHash = macroAssembler.m_assembler.buffer().hash();
     ARM64EHash verifyUncompactedHash(assemblerBufferHash.randomSeed());
     uint8_t* outData = codeOutData;
@@ -127,7 +127,7 @@
     int writePtr = 0;
     unsigned jumpCount = jumpsToLink.size();
 
-#if CPU(ARM64E)
+#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
     os_thread_self_restrict_rwx_to_rw();
 #endif
 
@@ -144,12 +144,12 @@
             ASSERT(!(regionSize % 2));
             ASSERT(!(readPtr % 2));
             ASSERT(!(writePtr % 2));
-#if CPU(ARM64E)
+#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
             unsigned index = readPtr;
 #endif
             while (copySource != copyEnd) {
                 InstructionType insn = *copySource++;
-#if CPU(ARM64E)
+#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
                 static_assert(sizeof(InstructionType) == 4, "");
                 verifyUncompactedHash.update(insn, index);
                 index += sizeof(InstructionType);
@@ -197,13 +197,13 @@
         RELEASE_ASSERT(bitwise_cast<uintptr_t>(src) % sizeof(InstructionType) == 0);
         RELEASE_ASSERT(bytes % sizeof(InstructionType) == 0);
 
-#if CPU(ARM64E)
+#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
         unsigned index = readPtr;
 #endif
 
         for (size_t i = 0; i < bytes; i += sizeof(InstructionType)) {
             InstructionType insn = *src++;
-#if CPU(ARM64E)
+#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
             verifyUncompactedHash.update(insn, index);
             index += sizeof(InstructionType);
 #endif
@@ -211,7 +211,7 @@
         }
     }
 
-#if CPU(ARM64E)
+#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
     if (verifyUncompactedHash.hash() != assemblerBufferHash.hash()) {
         dataLogLn("Hashes don't match: ", RawPointer(bitwise_cast<void*>(verifyUncompactedHash.hash())), " ", RawPointer(bitwise_cast<void*>(assemblerBufferHash.hash())));
         dataLogLn("Crashing!");
@@ -222,7 +222,7 @@
     recordLinkOffsets(m_assemblerStorage, readPtr, initialSize, readPtr - writePtr);
         
     for (unsigned i = 0; i < jumpCount; ++i) {
-#if CPU(ARM64E)
+#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
         auto memcpyFunction = memcpy;
 #else
         auto memcpyFunction = performJITMemcpy;
@@ -239,7 +239,7 @@
         MacroAssembler::AssemblerType_T::fillNops(outData + compactSize, nopSizeInBytes, memcpy);
     }
 
-#if CPU(ARM64E)
+#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
     os_thread_self_restrict_rwx_to_rx();
 #endif
 
@@ -248,7 +248,7 @@
         m_executableMemory->shrink(m_size);
     }
 
-#if !CPU(ARM64E)
+#if !CPU(ARM64E) || !ENABLE(FAST_JIT_PERMISSIONS)
     ASSERT(codeOutData != outData);
     performJITMemcpy(codeOutData, outData, m_size);
 #else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to