Ignore:
Timestamp:
Mar 28, 2022, 5:23:58 PM (3 years ago)
Author:
[email protected]
Message:

[JSC] Clean up some 32bit load/store with 64bit load/store
https://bugs.webkit.org/show_bug.cgi?id=238440

Reviewed by Mark Lam.

  1. On OSR entry, we should copy values from scratch to stack via loadValue / storeValue instead of 32bit load/store.
  2. We should initialize tail-call's argumentCountIncludingThis slot via store64.
  • dfg/DFGThunks.cpp:

(JSC::DFG::osrEntryThunkGenerator):

  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::prepareAny):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/CallFrameShuffler.cpp

    r287311 r292014  
    740740    if (verbose)
    741741        dataLog("   * Storing the argument count into ", VirtualRegister { CallFrameSlot::argumentCountIncludingThis }, "\n");
    742     m_jit.store32(MacroAssembler::TrustedImm32(0),
    743         addressForNew(VirtualRegister { CallFrameSlot::argumentCountIncludingThis }).withOffset(TagOffset));
    744742    RELEASE_ASSERT(m_numPassedArgs != UINT_MAX);
    745     m_jit.store32(MacroAssembler::TrustedImm32(m_numPassedArgs),
    746         addressForNew(VirtualRegister { CallFrameSlot::argumentCountIncludingThis }).withOffset(PayloadOffset));
     743#if USE(JSVALUE64)
     744    // Initialize CallFrameSlot::argumentCountIncludingThis's TagOffset and PayloadOffset with 0 and m_numPassedArgs.
     745    m_jit.store64(MacroAssembler::TrustedImm32(m_numPassedArgs), addressForNew(VirtualRegister { CallFrameSlot::argumentCountIncludingThis }));
     746#else
     747    m_jit.store32(MacroAssembler::TrustedImm32(0), addressForNew(VirtualRegister { CallFrameSlot::argumentCountIncludingThis }).withOffset(TagOffset));
     748    m_jit.store32(MacroAssembler::TrustedImm32(m_numPassedArgs), addressForNew(VirtualRegister { CallFrameSlot::argumentCountIncludingThis }).withOffset(PayloadOffset));
     749#endif
    747750
    748751    if (!isSlowPath()) {
Note: See TracChangeset for help on using the changeset viewer.