Ignore:
Timestamp:
Oct 1, 2020, 11:14:25 PM (5 years ago)
Author:
[email protected]
Message:

[JSC] Masm probe should invoke JIT operation function
https://bugs.webkit.org/show_bug.cgi?id=217199

Reviewed by Mark Lam.

Masm probe function should be invoked via OperationPtrTag since it is invoked from JIT code, and it is native code.
And we should register probe trampoline as JIT operation.

  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerARMv7.cpp:
  • assembler/MacroAssemblerMIPS.cpp:
  • assembler/MacroAssemblerX86Common.cpp:
  • runtime/JSCPtrTag.h:
File:
1 edited

Legend:

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

    r260223 r267867  
    4242#if ENABLE(MASM_PROBE)
    4343
    44 extern "C" void ctiMasmProbeTrampoline();
     44extern "C" JSC_DECLARE_JIT_OPERATION(ctiMasmProbeTrampoline, void, ());
     45JSC_ANNOTATE_JIT_OPERATION(ctiMasmProbeTrampoline, ctiMasmProbeTrampoline);
    4546
    4647using namespace ARM64Registers;
     
    542543    storePair64(x26, x27, sp, TrustedImm32(offsetof(IncomingProbeRecord, x26)));
    543544    storePair64(x28, x30, sp, TrustedImm32(offsetof(IncomingProbeRecord, x28))); // Note: x30 is lr.
    544     move(TrustedImmPtr(tagCFunction<JITProbeTrampolinePtrTag>(ctiMasmProbeTrampoline)), x26);
     545    move(TrustedImmPtr(tagCFunction<OperationPtrTag>(ctiMasmProbeTrampoline)), x26);
    545546    move(TrustedImmPtr(tagCFunction<JITProbeExecutorPtrTag>(Probe::executeProbe)), x28);
    546547#if CPU(ARM64E)
     
    549550    move(TrustedImmPtr(reinterpret_cast<void*>(function)), x24);
    550551    move(TrustedImmPtr(arg), x25);
    551     call(x26, JITProbeTrampolinePtrTag);
     552    call(x26, OperationPtrTag);
    552553
    553554    // ctiMasmProbeTrampoline should have restored every register except for lr and the sp.
Note: See TracChangeset for help on using the changeset viewer.