Ignore:
Timestamp:
Mar 28, 2018, 1:05:43 PM (7 years ago)
Author:
[email protected]
Message:

Enhance ARM64 probe to support pointer profiling.
https://bugs.webkit.org/show_bug.cgi?id=184069
<rdar://problem/38939879>

Reviewed by JF Bastien.

  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::popPair):
(JSC::MacroAssemblerX86Common::pushPair):

  • assembler/testmasm.cpp:

(JSC::testProbeReadsArgumentRegisters):
(JSC::testProbeWritesArgumentRegisters):

  • runtime/PtrTag.h:

(JSC::tagForPtr):

File:
1 edited

Legend:

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

    r221002 r230040  
    11/*
    2  * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    372372    // the caller of the probe (which is what we want in order to play nice with debuggers e.g. lldb).
    373373    "mov       x0, sp" "\n" // Set the Probe::State* arg.
    374     "blr       x28" "\n" // Call the probe handler.
     374    CALL_WITH_PTRTAG("blr", "x28", CFunctionPtrTag) // Call the probe handler.
    375375
    376376    // Make sure the Probe::State is entirely below the result stack pointer so
     
    408408
    409409    "mov       x0, x27" "\n" // Set the Probe::State* arg.
    410     "blr       x2" "\n" // Call the initializeStackFunction (loaded into x2 above).
     410    CALL_WITH_PTRTAG("blr", "x2", CFunctionPtrTag) // Call the initializeStackFunction (loaded into x2 above).
    411411
    412412    LOCAL_LABEL_STRING(ctiMasmProbeTrampolineRestoreRegisters) ":" "\n"
     
    518518    move(TrustedImmPtr(reinterpret_cast<void*>(function)), x24);
    519519    move(TrustedImmPtr(arg), x25);
    520     m_assembler.blr(x26);
     520    call(x26, CFunctionPtrTag);
    521521
    522522    // ctiMasmProbeTrampoline should have restored every register except for lr and the sp.
Note: See TracChangeset for help on using the changeset viewer.