haikuwebkit/Source/WTF/wtf/PlatformRegisters.cpp

74 lines
2.7 KiB
C++
Raw Permalink Normal View History

Open source arm64e code. https://bugs.webkit.org/show_bug.cgi?id=196012 <rdar://problem/49066237> Reviewed by Keith Miller. Source/JavaScriptCore: * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * assembler/ARM64EAssembler.h: Added. (JSC::ARM64EAssembler::encodeGroup1): (JSC::ARM64EAssembler::encodeGroup2): (JSC::ARM64EAssembler::encodeGroup4): (JSC::ARM64EAssembler::pacia1716): (JSC::ARM64EAssembler::pacib1716): (JSC::ARM64EAssembler::autia1716): (JSC::ARM64EAssembler::autib1716): (JSC::ARM64EAssembler::paciaz): (JSC::ARM64EAssembler::paciasp): (JSC::ARM64EAssembler::pacibz): (JSC::ARM64EAssembler::pacibsp): (JSC::ARM64EAssembler::autiaz): (JSC::ARM64EAssembler::autiasp): (JSC::ARM64EAssembler::autibz): (JSC::ARM64EAssembler::autibsp): (JSC::ARM64EAssembler::xpaclri): (JSC::ARM64EAssembler::pacia): (JSC::ARM64EAssembler::pacib): (JSC::ARM64EAssembler::pacda): (JSC::ARM64EAssembler::pacdb): (JSC::ARM64EAssembler::autia): (JSC::ARM64EAssembler::autib): (JSC::ARM64EAssembler::autda): (JSC::ARM64EAssembler::autdb): (JSC::ARM64EAssembler::paciza): (JSC::ARM64EAssembler::pacizb): (JSC::ARM64EAssembler::pacdza): (JSC::ARM64EAssembler::pacdzb): (JSC::ARM64EAssembler::autiza): (JSC::ARM64EAssembler::autizb): (JSC::ARM64EAssembler::autdza): (JSC::ARM64EAssembler::autdzb): (JSC::ARM64EAssembler::xpaci): (JSC::ARM64EAssembler::xpacd): (JSC::ARM64EAssembler::pacga): (JSC::ARM64EAssembler::braa): (JSC::ARM64EAssembler::brab): (JSC::ARM64EAssembler::blraa): (JSC::ARM64EAssembler::blrab): (JSC::ARM64EAssembler::braaz): (JSC::ARM64EAssembler::brabz): (JSC::ARM64EAssembler::blraaz): (JSC::ARM64EAssembler::blrabz): (JSC::ARM64EAssembler::retaa): (JSC::ARM64EAssembler::retab): (JSC::ARM64EAssembler::eretaa): (JSC::ARM64EAssembler::eretab): (JSC::ARM64EAssembler::linkPointer): (JSC::ARM64EAssembler::repatchPointer): (JSC::ARM64EAssembler::setPointer): (JSC::ARM64EAssembler::readPointer): (JSC::ARM64EAssembler::readCallTarget): (JSC::ARM64EAssembler::ret): * assembler/MacroAssembler.cpp: * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.cpp: * assembler/MacroAssemblerARM64E.h: Added. (JSC::MacroAssemblerARM64E::tagReturnAddress): (JSC::MacroAssemblerARM64E::untagReturnAddress): (JSC::MacroAssemblerARM64E::tagPtr): (JSC::MacroAssemblerARM64E::untagPtr): (JSC::MacroAssemblerARM64E::removePtrTag): (JSC::MacroAssemblerARM64E::callTrustedPtr): (JSC::MacroAssemblerARM64E::call): (JSC::MacroAssemblerARM64E::callRegister): (JSC::MacroAssemblerARM64E::jump): * dfg/DFGOSRExit.cpp: (JSC::DFG::reifyInlinedCallFrames): * dfg/DFGOSRExitCompilerCommon.cpp: (JSC::DFG::reifyInlinedCallFrames): * ftl/FTLThunks.cpp: (JSC::FTL::genericGenerationThunkGenerator): * jit/CCallHelpers.h: (JSC::CCallHelpers::prepareForTailCallSlow): * jit/CallFrameShuffler.cpp: (JSC::CallFrameShuffler::prepareForTailCall): * jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::allocate): * jit/ThunkGenerators.cpp: (JSC::arityFixupGenerator): * llint/LLIntOfflineAsmConfig.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter64.asm: * runtime/ClassInfo.h: * runtime/InitializeThreading.cpp: (JSC::initializeThreading): * runtime/JSCPtrTag.cpp: Added. (JSC::tagForPtr): (JSC::ptrTagName): (JSC::initializePtrTagLookup): * runtime/JSCPtrTag.h: (JSC::initializePtrTagLookup): * runtime/Options.cpp: (JSC::recomputeDependentOptions): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/BlockPtr.h: * wtf/Platform.h: * wtf/PlatformRegisters.cpp: Added. (WTF::threadStateLRInternal): (WTF::threadStatePCInternal): * wtf/PlatformRegisters.h: * wtf/PointerPreparations.h: * wtf/PtrTag.cpp: Added. (WTF::tagForPtr): (WTF::ptrTagName): (WTF::registerPtrTagLookup): (WTF::reportBadTag): * wtf/PtrTag.h: (WTF::removeCodePtrTag): (WTF::tagCodePtrImpl): (WTF::tagCodePtr): (WTF::untagCodePtrImplHelper): (WTF::untagCodePtrImpl): (WTF::untagCodePtr): (WTF::retagCodePtrImplHelper): (WTF::retagCodePtrImpl): (WTF::retagCodePtr): (WTF::tagCFunctionPtrImpl): (WTF::tagCFunctionPtr): (WTF::untagCFunctionPtrImpl): (WTF::untagCFunctionPtr): (WTF::tagInt): (WTF::assertIsCFunctionPtr): (WTF::assertIsNullOrCFunctionPtr): (WTF::assertIsNotTagged): (WTF::assertIsTagged): (WTF::assertIsNullOrTagged): (WTF::isTaggedWith): (WTF::assertIsTaggedWith): (WTF::assertIsNullOrTaggedWith): (WTF::usesPointerTagging): (WTF::registerPtrTagLookup): (WTF::reportBadTag): (WTF::tagForPtr): Deleted. Canonical link: https://commits.webkit.org/210319@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-20 23:32:26 +00:00
/*
* Copyright (C) 2018-2019 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include <wtf/PlatformRegisters.h>
#include <wtf/PtrTag.h>
namespace WTF {
#if USE(PLATFORM_REGISTERS_WITH_PROFILE) && CPU(ARM64E)
#define USE_UNTAGGED_THREAD_STATE_PTR 1
void* threadStateLRInternal(PlatformRegisters& regs)
{
void* candidateLR = arm_thread_state64_get_lr_fptr(regs);
#if USE(UNTAGGED_THREAD_STATE_PTR)
Unreviewed, reland r268170 https://bugs.webkit.org/show_bug.cgi?id=217460 Source/JavaScriptCore: Fixed missing wrong OperationPtrTag use in Repatch.cpp. * assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::getLinkerAddress): * assembler/AssemblerBuffer.h: (JSC::ARM64EHash::update): (JSC::ARM64EHash::finalHash const): * assembler/JITOperationList.cpp: (JSC::addPointers): * assembler/MacroAssemblerARM64.cpp: (JSC::MacroAssembler::probe): * assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): (JSC::MacroAssemblerCodePtr::createFromExecutableAddress): * assembler/testmasm.cpp: (JSC::testProbeModifiesProgramCounter): * b3/air/testair.cpp: * ftl/FTLOutput.h: (JSC::FTL::Output::callWithoutSideEffects): (JSC::FTL::Output::operation): * ftl/FTLSlowPathCall.cpp: (JSC::FTL::SlowPathCallContext::makeCall): * jit/JITCode.cpp: (JSC::JITCodeWithCodeRef::executableAddressAtOffset): * jit/JITExceptions.cpp: (JSC::genericUnwind): * jit/JITOperations.cpp: * jit/Repatch.cpp: (JSC::readPutICCallTarget): (JSC::ftlThunkAwareRepatchCall): (JSC::tryCacheGetBy): (JSC::tryCachePutByID): * llint/LLIntData.cpp: (JSC::LLInt::initialize): * llint/LLIntPCRanges.h: (JSC::LLInt::isLLIntPC): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::setUpCall): * llint/LLIntThunks.cpp: (JSC::LLInt::generateThunkWithJumpTo): * runtime/JSCPtrTag.h: * runtime/MachineContext.h: (JSC::MachineContext::instructionPointer): * runtime/NativeExecutable.cpp: (JSC::NativeExecutable::finishCreation): * runtime/PutPropertySlot.h: (JSC::PutPropertySlot::setCustomValue): (JSC::PutPropertySlot::setCustomAccessor): (JSC::PutPropertySlot::customSetter const): * wasm/WasmAirIRGenerator.cpp: (JSC::Wasm::AirIRGenerator::emitCCall): * wasm/WasmSlowPaths.cpp: Source/WTF: * wtf/PlatformRegisters.cpp: (WTF::threadStateLRInternal): (WTF::threadStatePCInternal): * wtf/PtrTag.h: (WTF::tagCodePtr): (WTF::untagCodePtr): (WTF::assertIsCFunctionPtr): (WTF::assertIsNullOrCFunctionPtr): (WTF::assertIsNotTagged): (WTF::assertIsTagged): (WTF::assertIsNullOrTagged): (WTF::isTaggedWith): (WTF::assertIsTaggedWith): (WTF::assertIsNullOrTaggedWith): (WTF::tagCFunctionPtr): (WTF::tagCFunction): (WTF::untagCFunctionPtr): (WTF::tagInt): Canonical link: https://commits.webkit.org/230280@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-09 05:08:11 +00:00
if (candidateLR && isTaggedWith<CFunctionPtrTag>(candidateLR))
Open source arm64e code. https://bugs.webkit.org/show_bug.cgi?id=196012 <rdar://problem/49066237> Reviewed by Keith Miller. Source/JavaScriptCore: * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * assembler/ARM64EAssembler.h: Added. (JSC::ARM64EAssembler::encodeGroup1): (JSC::ARM64EAssembler::encodeGroup2): (JSC::ARM64EAssembler::encodeGroup4): (JSC::ARM64EAssembler::pacia1716): (JSC::ARM64EAssembler::pacib1716): (JSC::ARM64EAssembler::autia1716): (JSC::ARM64EAssembler::autib1716): (JSC::ARM64EAssembler::paciaz): (JSC::ARM64EAssembler::paciasp): (JSC::ARM64EAssembler::pacibz): (JSC::ARM64EAssembler::pacibsp): (JSC::ARM64EAssembler::autiaz): (JSC::ARM64EAssembler::autiasp): (JSC::ARM64EAssembler::autibz): (JSC::ARM64EAssembler::autibsp): (JSC::ARM64EAssembler::xpaclri): (JSC::ARM64EAssembler::pacia): (JSC::ARM64EAssembler::pacib): (JSC::ARM64EAssembler::pacda): (JSC::ARM64EAssembler::pacdb): (JSC::ARM64EAssembler::autia): (JSC::ARM64EAssembler::autib): (JSC::ARM64EAssembler::autda): (JSC::ARM64EAssembler::autdb): (JSC::ARM64EAssembler::paciza): (JSC::ARM64EAssembler::pacizb): (JSC::ARM64EAssembler::pacdza): (JSC::ARM64EAssembler::pacdzb): (JSC::ARM64EAssembler::autiza): (JSC::ARM64EAssembler::autizb): (JSC::ARM64EAssembler::autdza): (JSC::ARM64EAssembler::autdzb): (JSC::ARM64EAssembler::xpaci): (JSC::ARM64EAssembler::xpacd): (JSC::ARM64EAssembler::pacga): (JSC::ARM64EAssembler::braa): (JSC::ARM64EAssembler::brab): (JSC::ARM64EAssembler::blraa): (JSC::ARM64EAssembler::blrab): (JSC::ARM64EAssembler::braaz): (JSC::ARM64EAssembler::brabz): (JSC::ARM64EAssembler::blraaz): (JSC::ARM64EAssembler::blrabz): (JSC::ARM64EAssembler::retaa): (JSC::ARM64EAssembler::retab): (JSC::ARM64EAssembler::eretaa): (JSC::ARM64EAssembler::eretab): (JSC::ARM64EAssembler::linkPointer): (JSC::ARM64EAssembler::repatchPointer): (JSC::ARM64EAssembler::setPointer): (JSC::ARM64EAssembler::readPointer): (JSC::ARM64EAssembler::readCallTarget): (JSC::ARM64EAssembler::ret): * assembler/MacroAssembler.cpp: * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.cpp: * assembler/MacroAssemblerARM64E.h: Added. (JSC::MacroAssemblerARM64E::tagReturnAddress): (JSC::MacroAssemblerARM64E::untagReturnAddress): (JSC::MacroAssemblerARM64E::tagPtr): (JSC::MacroAssemblerARM64E::untagPtr): (JSC::MacroAssemblerARM64E::removePtrTag): (JSC::MacroAssemblerARM64E::callTrustedPtr): (JSC::MacroAssemblerARM64E::call): (JSC::MacroAssemblerARM64E::callRegister): (JSC::MacroAssemblerARM64E::jump): * dfg/DFGOSRExit.cpp: (JSC::DFG::reifyInlinedCallFrames): * dfg/DFGOSRExitCompilerCommon.cpp: (JSC::DFG::reifyInlinedCallFrames): * ftl/FTLThunks.cpp: (JSC::FTL::genericGenerationThunkGenerator): * jit/CCallHelpers.h: (JSC::CCallHelpers::prepareForTailCallSlow): * jit/CallFrameShuffler.cpp: (JSC::CallFrameShuffler::prepareForTailCall): * jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::allocate): * jit/ThunkGenerators.cpp: (JSC::arityFixupGenerator): * llint/LLIntOfflineAsmConfig.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter64.asm: * runtime/ClassInfo.h: * runtime/InitializeThreading.cpp: (JSC::initializeThreading): * runtime/JSCPtrTag.cpp: Added. (JSC::tagForPtr): (JSC::ptrTagName): (JSC::initializePtrTagLookup): * runtime/JSCPtrTag.h: (JSC::initializePtrTagLookup): * runtime/Options.cpp: (JSC::recomputeDependentOptions): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/BlockPtr.h: * wtf/Platform.h: * wtf/PlatformRegisters.cpp: Added. (WTF::threadStateLRInternal): (WTF::threadStatePCInternal): * wtf/PlatformRegisters.h: * wtf/PointerPreparations.h: * wtf/PtrTag.cpp: Added. (WTF::tagForPtr): (WTF::ptrTagName): (WTF::registerPtrTagLookup): (WTF::reportBadTag): * wtf/PtrTag.h: (WTF::removeCodePtrTag): (WTF::tagCodePtrImpl): (WTF::tagCodePtr): (WTF::untagCodePtrImplHelper): (WTF::untagCodePtrImpl): (WTF::untagCodePtr): (WTF::retagCodePtrImplHelper): (WTF::retagCodePtrImpl): (WTF::retagCodePtr): (WTF::tagCFunctionPtrImpl): (WTF::tagCFunctionPtr): (WTF::untagCFunctionPtrImpl): (WTF::untagCFunctionPtr): (WTF::tagInt): (WTF::assertIsCFunctionPtr): (WTF::assertIsNullOrCFunctionPtr): (WTF::assertIsNotTagged): (WTF::assertIsTagged): (WTF::assertIsNullOrTagged): (WTF::isTaggedWith): (WTF::assertIsTaggedWith): (WTF::assertIsNullOrTaggedWith): (WTF::usesPointerTagging): (WTF::registerPtrTagLookup): (WTF::reportBadTag): (WTF::tagForPtr): Deleted. Canonical link: https://commits.webkit.org/210319@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-20 23:32:26 +00:00
return retagCodePtr<CFunctionPtrTag, PlatformRegistersLRPtrTag>(candidateLR);
candidateLR = bitwise_cast<void*>(arm_thread_state64_get_lr(regs));
if (!candidateLR)
return candidateLR;
return tagCodePtr<PlatformRegistersLRPtrTag>(candidateLR);
#else
return retagCodePtr<CFunctionPtrTag, PlatformRegistersLRPtrTag>(candidateLR);
#endif
}
void* threadStatePCInternal(PlatformRegisters& regs)
{
void* candidatePC = arm_thread_state64_get_pc_fptr(regs);
#if USE(UNTAGGED_THREAD_STATE_PTR)
Unreviewed, reland r268170 https://bugs.webkit.org/show_bug.cgi?id=217460 Source/JavaScriptCore: Fixed missing wrong OperationPtrTag use in Repatch.cpp. * assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::getLinkerAddress): * assembler/AssemblerBuffer.h: (JSC::ARM64EHash::update): (JSC::ARM64EHash::finalHash const): * assembler/JITOperationList.cpp: (JSC::addPointers): * assembler/MacroAssemblerARM64.cpp: (JSC::MacroAssembler::probe): * assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): (JSC::MacroAssemblerCodePtr::createFromExecutableAddress): * assembler/testmasm.cpp: (JSC::testProbeModifiesProgramCounter): * b3/air/testair.cpp: * ftl/FTLOutput.h: (JSC::FTL::Output::callWithoutSideEffects): (JSC::FTL::Output::operation): * ftl/FTLSlowPathCall.cpp: (JSC::FTL::SlowPathCallContext::makeCall): * jit/JITCode.cpp: (JSC::JITCodeWithCodeRef::executableAddressAtOffset): * jit/JITExceptions.cpp: (JSC::genericUnwind): * jit/JITOperations.cpp: * jit/Repatch.cpp: (JSC::readPutICCallTarget): (JSC::ftlThunkAwareRepatchCall): (JSC::tryCacheGetBy): (JSC::tryCachePutByID): * llint/LLIntData.cpp: (JSC::LLInt::initialize): * llint/LLIntPCRanges.h: (JSC::LLInt::isLLIntPC): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::setUpCall): * llint/LLIntThunks.cpp: (JSC::LLInt::generateThunkWithJumpTo): * runtime/JSCPtrTag.h: * runtime/MachineContext.h: (JSC::MachineContext::instructionPointer): * runtime/NativeExecutable.cpp: (JSC::NativeExecutable::finishCreation): * runtime/PutPropertySlot.h: (JSC::PutPropertySlot::setCustomValue): (JSC::PutPropertySlot::setCustomAccessor): (JSC::PutPropertySlot::customSetter const): * wasm/WasmAirIRGenerator.cpp: (JSC::Wasm::AirIRGenerator::emitCCall): * wasm/WasmSlowPaths.cpp: Source/WTF: * wtf/PlatformRegisters.cpp: (WTF::threadStateLRInternal): (WTF::threadStatePCInternal): * wtf/PtrTag.h: (WTF::tagCodePtr): (WTF::untagCodePtr): (WTF::assertIsCFunctionPtr): (WTF::assertIsNullOrCFunctionPtr): (WTF::assertIsNotTagged): (WTF::assertIsTagged): (WTF::assertIsNullOrTagged): (WTF::isTaggedWith): (WTF::assertIsTaggedWith): (WTF::assertIsNullOrTaggedWith): (WTF::tagCFunctionPtr): (WTF::tagCFunction): (WTF::untagCFunctionPtr): (WTF::tagInt): Canonical link: https://commits.webkit.org/230280@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-09 05:08:11 +00:00
if (candidatePC && isTaggedWith<CFunctionPtrTag>(candidatePC))
Open source arm64e code. https://bugs.webkit.org/show_bug.cgi?id=196012 <rdar://problem/49066237> Reviewed by Keith Miller. Source/JavaScriptCore: * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * assembler/ARM64EAssembler.h: Added. (JSC::ARM64EAssembler::encodeGroup1): (JSC::ARM64EAssembler::encodeGroup2): (JSC::ARM64EAssembler::encodeGroup4): (JSC::ARM64EAssembler::pacia1716): (JSC::ARM64EAssembler::pacib1716): (JSC::ARM64EAssembler::autia1716): (JSC::ARM64EAssembler::autib1716): (JSC::ARM64EAssembler::paciaz): (JSC::ARM64EAssembler::paciasp): (JSC::ARM64EAssembler::pacibz): (JSC::ARM64EAssembler::pacibsp): (JSC::ARM64EAssembler::autiaz): (JSC::ARM64EAssembler::autiasp): (JSC::ARM64EAssembler::autibz): (JSC::ARM64EAssembler::autibsp): (JSC::ARM64EAssembler::xpaclri): (JSC::ARM64EAssembler::pacia): (JSC::ARM64EAssembler::pacib): (JSC::ARM64EAssembler::pacda): (JSC::ARM64EAssembler::pacdb): (JSC::ARM64EAssembler::autia): (JSC::ARM64EAssembler::autib): (JSC::ARM64EAssembler::autda): (JSC::ARM64EAssembler::autdb): (JSC::ARM64EAssembler::paciza): (JSC::ARM64EAssembler::pacizb): (JSC::ARM64EAssembler::pacdza): (JSC::ARM64EAssembler::pacdzb): (JSC::ARM64EAssembler::autiza): (JSC::ARM64EAssembler::autizb): (JSC::ARM64EAssembler::autdza): (JSC::ARM64EAssembler::autdzb): (JSC::ARM64EAssembler::xpaci): (JSC::ARM64EAssembler::xpacd): (JSC::ARM64EAssembler::pacga): (JSC::ARM64EAssembler::braa): (JSC::ARM64EAssembler::brab): (JSC::ARM64EAssembler::blraa): (JSC::ARM64EAssembler::blrab): (JSC::ARM64EAssembler::braaz): (JSC::ARM64EAssembler::brabz): (JSC::ARM64EAssembler::blraaz): (JSC::ARM64EAssembler::blrabz): (JSC::ARM64EAssembler::retaa): (JSC::ARM64EAssembler::retab): (JSC::ARM64EAssembler::eretaa): (JSC::ARM64EAssembler::eretab): (JSC::ARM64EAssembler::linkPointer): (JSC::ARM64EAssembler::repatchPointer): (JSC::ARM64EAssembler::setPointer): (JSC::ARM64EAssembler::readPointer): (JSC::ARM64EAssembler::readCallTarget): (JSC::ARM64EAssembler::ret): * assembler/MacroAssembler.cpp: * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.cpp: * assembler/MacroAssemblerARM64E.h: Added. (JSC::MacroAssemblerARM64E::tagReturnAddress): (JSC::MacroAssemblerARM64E::untagReturnAddress): (JSC::MacroAssemblerARM64E::tagPtr): (JSC::MacroAssemblerARM64E::untagPtr): (JSC::MacroAssemblerARM64E::removePtrTag): (JSC::MacroAssemblerARM64E::callTrustedPtr): (JSC::MacroAssemblerARM64E::call): (JSC::MacroAssemblerARM64E::callRegister): (JSC::MacroAssemblerARM64E::jump): * dfg/DFGOSRExit.cpp: (JSC::DFG::reifyInlinedCallFrames): * dfg/DFGOSRExitCompilerCommon.cpp: (JSC::DFG::reifyInlinedCallFrames): * ftl/FTLThunks.cpp: (JSC::FTL::genericGenerationThunkGenerator): * jit/CCallHelpers.h: (JSC::CCallHelpers::prepareForTailCallSlow): * jit/CallFrameShuffler.cpp: (JSC::CallFrameShuffler::prepareForTailCall): * jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::allocate): * jit/ThunkGenerators.cpp: (JSC::arityFixupGenerator): * llint/LLIntOfflineAsmConfig.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter64.asm: * runtime/ClassInfo.h: * runtime/InitializeThreading.cpp: (JSC::initializeThreading): * runtime/JSCPtrTag.cpp: Added. (JSC::tagForPtr): (JSC::ptrTagName): (JSC::initializePtrTagLookup): * runtime/JSCPtrTag.h: (JSC::initializePtrTagLookup): * runtime/Options.cpp: (JSC::recomputeDependentOptions): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/BlockPtr.h: * wtf/Platform.h: * wtf/PlatformRegisters.cpp: Added. (WTF::threadStateLRInternal): (WTF::threadStatePCInternal): * wtf/PlatformRegisters.h: * wtf/PointerPreparations.h: * wtf/PtrTag.cpp: Added. (WTF::tagForPtr): (WTF::ptrTagName): (WTF::registerPtrTagLookup): (WTF::reportBadTag): * wtf/PtrTag.h: (WTF::removeCodePtrTag): (WTF::tagCodePtrImpl): (WTF::tagCodePtr): (WTF::untagCodePtrImplHelper): (WTF::untagCodePtrImpl): (WTF::untagCodePtr): (WTF::retagCodePtrImplHelper): (WTF::retagCodePtrImpl): (WTF::retagCodePtr): (WTF::tagCFunctionPtrImpl): (WTF::tagCFunctionPtr): (WTF::untagCFunctionPtrImpl): (WTF::untagCFunctionPtr): (WTF::tagInt): (WTF::assertIsCFunctionPtr): (WTF::assertIsNullOrCFunctionPtr): (WTF::assertIsNotTagged): (WTF::assertIsTagged): (WTF::assertIsNullOrTagged): (WTF::isTaggedWith): (WTF::assertIsTaggedWith): (WTF::assertIsNullOrTaggedWith): (WTF::usesPointerTagging): (WTF::registerPtrTagLookup): (WTF::reportBadTag): (WTF::tagForPtr): Deleted. Canonical link: https://commits.webkit.org/210319@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-20 23:32:26 +00:00
return retagCodePtr<CFunctionPtrTag, PlatformRegistersPCPtrTag>(candidatePC);
candidatePC = bitwise_cast<void*>(arm_thread_state64_get_pc(regs));
if (!candidatePC)
return candidatePC;
return tagCodePtr<PlatformRegistersPCPtrTag>(candidatePC);
#else
return retagCodePtr<CFunctionPtrTag, PlatformRegistersPCPtrTag>(candidatePC);
#endif
}
#endif // USE(PLATFORM_REGISTERS_WITH_PROFILE) && CPU(ARM64E)
} // namespace WTF