Ignore:
Timestamp:
Apr 3, 2014, 11:25:26 AM (11 years ago)
Author:
[email protected]
Message:

Fix bit rot in ARMv7 JIT probe mechanism.
<https://webkit.org/b/131167>

Reviewed by Geoffrey Garen.

  1. The macro assembler does not support pushing the SP register. Worked around this by pushing the LR register as a placeholder, and then writing the original SP value to that slot.
  2. The CPUState field in the ProbeContext needs to be aligned on a 4 byte boundary, not an 8 byte boundary.
  • assembler/MacroAssemblerARMv7.cpp:

(JSC::MacroAssemblerARMv7::probe):

  • jit/JITStubsARMv7.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.cpp

    r157571 r166732  
    8383void MacroAssemblerARMv7::probe(MacroAssemblerARMv7::ProbeFunction function, void* arg1, void* arg2)
    8484{
    85     push(RegisterID::sp);
    8685    push(RegisterID::lr);
     86    push(RegisterID::lr);
     87    add32(TrustedImm32(8), RegisterID::sp, RegisterID::lr);
     88    store32(RegisterID::lr, ArmAddress(RegisterID::sp, 4));
    8789    push(RegisterID::ip);
    8890    push(RegisterID::r0);
Note: See TracChangeset for help on using the changeset viewer.