Ignore:
Timestamp:
Apr 10, 2020, 1:27:31 PM (5 years ago)
Author:
[email protected]
Message:

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.

  • 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

    r258063 r259897  
    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.