Ignore:
Timestamp:
Apr 16, 2020, 3:35:23 PM (5 years ago)
Author:
[email protected]
Message:

[Re-landing] Use more PAC diversity for JIT probe code.
https://bugs.webkit.org/show_bug.cgi?id=210252
<rdar://problem/54490367>

Reviewed by Keith Miller.

Introducing new PtrTags:

JITProbePtrTag - for the client probe function.
JITProbeTrampolinePtrTag - for calling the ctiMasmProbeTrampoline.
JITProbeExecutorPtrTag - for calling the probe executor.

Currently, this is only the Probe::executeProbe().

JITProbeStackInitializationFunctionPtrTag - for calling the optional stack

initialization function that the client probe function may set.

We'll now use these in the JIT probe mechanism instead of adopting the default
CFunctionPtrTag.

Fixed an assert in MacroAssemblerARM64.cpp which does not apply to non ARM64E
builds.

  • assembler/MacroAssembler.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerPrinter.h:

(JSC::MacroAssembler::print):

  • assembler/ProbeContext.h:
  • runtime/JSCPtrTag.h:
  • tools/JSDollarVM.cpp:

(JSC::callWithStackSizeProbeFunction):

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):

File:
1 edited

Legend:

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

    r260222 r260223  
    2929#if ENABLE(ASSEMBLER)
    3030
     31#include "JSCPtrTag.h"
    3132#include "Options.h"
    3233#include "ProbeContext.h"
     
    5657void MacroAssembler::probe(Function<void(Probe::Context&)> func)
    5758{
    58     probe(stdFunctionCallback, new Function<void(Probe::Context&)>(WTFMove(func)));
     59    probe(tagCFunction<JITProbePtrTag>(stdFunctionCallback), new Function<void(Probe::Context&)>(WTFMove(func)));
    5960}
     61
    6062#endif // ENABLE(MASM_PROBE)
    6163
Note: See TracChangeset for help on using the changeset viewer.