Changeset 240370 in webkit


Ignore:
Timestamp:
Jan 23, 2019 5:17:46 PM (5 years ago)
Author:
mark.lam@apple.com
Message:

ARM64E should not ENABLE(SEPARATED_WX_HEAP).
https://bugs.webkit.org/show_bug.cgi?id=193744
<rdar://problem/46262952>

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::copyCompactAndLinkCode):

Source/WTF:

  • wtf/Platform.h:
Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r240364 r240370  
     12019-01-23  Mark Lam  <mark.lam@apple.com>
     2
     3        ARM64E should not ENABLE(SEPARATED_WX_HEAP).
     4        https://bugs.webkit.org/show_bug.cgi?id=193744
     5        <rdar://problem/46262952>
     6
     7        Reviewed by Saam Barati.
     8
     9        * assembler/LinkBuffer.cpp:
     10        (JSC::LinkBuffer::copyCompactAndLinkCode):
     11
    1122019-01-23  Yusuke Suzuki  <ysuzuki@apple.com>
    213
  • trunk/Source/JavaScriptCore/assembler/LinkBuffer.cpp

    r239364 r240370  
    11/*
    2  * Copyright (C) 2012-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4242namespace JSC {
    4343
    44 #if ENABLE(SEPARATED_WX_HEAP)
    45 extern JS_EXPORT_PRIVATE bool useFastPermisionsJITCopy;
    46 #endif // ENABLE(SEPARATED_WX_HEAP)
    47 
    4844bool shouldDumpDisassemblyFor(CodeBlock* codeBlock)
    4945{
     
    121117void LinkBuffer::copyCompactAndLinkCode(MacroAssembler& macroAssembler, void* ownerUID, JITCompilationEffort effort)
    122118{
    123 #if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
    124 #if ENABLE(SEPARATED_WX_HEAP)
    125     const bool isUsingFastPermissionsJITCopy = useFastPermisionsJITCopy;
    126 #else
    127     const bool isUsingFastPermissionsJITCopy = true;
    128 #endif
    129 #endif
    130 
    131119    allocate(macroAssembler, ownerUID, effort);
    132120    const size_t initialSize = macroAssembler.m_assembler.codeSize();
     
    143131    ARM64EHash verifyUncompactedHash;
    144132    uint8_t* outData = codeOutData;
    145 #if ENABLE(SEPARATED_WX_HEAP)
    146     AssemblerData outBuffer(m_size);
    147     if (!isUsingFastPermissionsJITCopy)
    148         outData = reinterpret_cast<uint8_t*>(outBuffer.buffer());
    149 #endif // ENABLE(SEPARATED_WX_HEAP)
    150133#else
    151134    AssemblerData outBuffer(m_size);
     
    162145
    163146#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
    164     if (isUsingFastPermissionsJITCopy)
    165         os_thread_self_restrict_rwx_to_rw();
     147    os_thread_self_restrict_rwx_to_rw();
    166148#endif
    167149
     
    250232#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
    251233        auto memcpyFunction = memcpy;
    252         if (!isUsingFastPermissionsJITCopy)
    253             memcpyFunction = performJITMemcpy;
    254234#else
    255235        auto memcpyFunction = performJITMemcpy;
     
    268248
    269249#if CPU(ARM64E) && ENABLE(FAST_JIT_PERMISSIONS)
    270     if (isUsingFastPermissionsJITCopy)
    271         os_thread_self_restrict_rwx_to_rx();
     250    os_thread_self_restrict_rwx_to_rx();
    272251#endif
    273252
     
    281260    performJITMemcpy(codeOutData, outData, m_size);
    282261#else
    283     if (isUsingFastPermissionsJITCopy)
    284         ASSERT(codeOutData == outData);
    285     else {
    286         ASSERT(codeOutData != outData);
    287         performJITMemcpy(codeOutData, outData, m_size);
    288     }
     262    ASSERT(codeOutData == outData);
    289263#endif
    290264
  • trunk/Source/WTF/ChangeLog

    r240332 r240370  
     12019-01-23  Mark Lam  <mark.lam@apple.com>
     2
     3        ARM64E should not ENABLE(SEPARATED_WX_HEAP).
     4        https://bugs.webkit.org/show_bug.cgi?id=193744
     5        <rdar://problem/46262952>
     6
     7        Reviewed by Saam Barati.
     8
     9        * wtf/Platform.h:
     10
    1112019-01-23  David Kilzer  <ddkilzer@apple.com>
    212
  • trunk/Source/WTF/wtf/Platform.h

    r240181 r240370  
    11/*
    2  * Copyright (C) 2006-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
    33 * Copyright (C) 2007-2009 Torch Mobile, Inc.
    44 * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
     
    959959#endif
    960960
    961 #ifndef ENABLE_SEPARATED_WX_HEAP
    962 #if (!ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E)) && PLATFORM(IOS_FAMILY) && CPU(ARM64)
     961#if PLATFORM(IOS_FAMILY) && CPU(ARM64) && (!ENABLE(FAST_JIT_PERMISSIONS) || !CPU(ARM64E))
    963962#define ENABLE_SEPARATED_WX_HEAP 1
    964963#else
    965964#define ENABLE_SEPARATED_WX_HEAP 0
    966 #endif
    967965#endif
    968966
Note: See TracChangeset for help on using the changeset viewer.