⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244783 in webkit


Ignore:
Timestamp:
Apr 30, 2019, 10:57:48 AM (7 years ago)
Author:
keith_miller@apple.com
Message:

Fix failing ARM64E wasm tests
https://bugs.webkit.org/show_bug.cgi?id=197420

Reviewed by Saam Barati.

This patch fixes a bug in the slow path of our JS->Wasm IC bridge
where we wouldn't untag the link register before tail calling.

Additionally, this patch fixes a broken assert when using setting
Options::useTailCalls=false.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitCallForwardArgumentsInTailPosition):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r244764 r244783  
     12019-04-30  Keith Miller  <keith_miller@apple.com>
     2
     3        Fix failing ARM64E wasm tests
     4        https://bugs.webkit.org/show_bug.cgi?id=197420
     5
     6        Reviewed by Saam Barati.
     7
     8        This patch fixes a bug in the slow path of our JS->Wasm IC bridge
     9        where we wouldn't untag the link register before tail calling.
     10
     11        Additionally, this patch fixes a broken assert when using setting
     12        Options::useTailCalls=false.
     13
     14        * bytecompiler/BytecodeGenerator.cpp:
     15        (JSC::BytecodeGenerator::emitCallForwardArgumentsInTailPosition):
     16        * wasm/js/WebAssemblyFunction.cpp:
     17        (JSC::WebAssemblyFunction::jsCallEntrypointSlow):
     18
    1192019-04-29  Saam Barati  <sbarati@apple.com>
    220
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r244088 r244783  
    32863286RegisterID* BytecodeGenerator::emitCallForwardArgumentsInTailPosition(RegisterID* dst, RegisterID* func, RegisterID* thisRegister, RegisterID* firstFreeRegister, int32_t firstVarArgOffset, const JSTextPosition& divot, const JSTextPosition& divotStart, const JSTextPosition& divotEnd, DebuggableCall debuggableCall)
    32873287{
    3288     ASSERT(m_inTailPosition);
     3288    // We must emit a tail call here because we did not allocate an arguments object thus we would otherwise have no way to correctly make this call.
     3289    ASSERT(m_inTailPosition || !Options::useTailCalls());
    32893290    return emitCallVarargs<OpTailCallForwardArguments>(dst, func, thisRegister, nullptr, firstFreeRegister, firstVarArgOffset, divot, divotStart, divotEnd, debuggableCall);
    32903291}
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp

    r243886 r244783  
    471471    jit.move(CCallHelpers::TrustedImmPtr(this), GPRInfo::regT0);
    472472    jit.emitFunctionEpilogue();
     473#if CPU(ARM64E)
     474    jit.untagPtr(MacroAssembler::linkRegister, MacroAssembler::stackPointerRegister);
     475#endif
    473476    auto jumpToHostCallThunk = jit.jump();
    474477
Note: See TracChangeset for help on using the changeset viewer.