• dbates@webkit.org's avatar
    [iOS] Upstream JavaScriptCore support for ARM64 · 98f0de07
    dbates@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=122762
    
    Source/JavaScriptCore:
    
    Reviewed by Oliver Hunt and Filip Pizlo.
    
    * Configurations/Base.xcconfig:
    * Configurations/DebugRelease.xcconfig:
    * Configurations/JavaScriptCore.xcconfig:
    * Configurations/ToolExecutable.xcconfig:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    * assembler/ARM64Assembler.h: Added.
    * assembler/AbstractMacroAssembler.h:
    (JSC::isARM64):
    (JSC::AbstractMacroAssembler::Label::Label):
    (JSC::AbstractMacroAssembler::Jump::Jump):
    (JSC::AbstractMacroAssembler::Jump::link):
    (JSC::AbstractMacroAssembler::Jump::linkTo):
    (JSC::AbstractMacroAssembler::CachedTempRegister::CachedTempRegister):
    (JSC::AbstractMacroAssembler::CachedTempRegister::registerIDInvalidate):
    (JSC::AbstractMacroAssembler::CachedTempRegister::registerIDNoInvalidate):
    (JSC::AbstractMacroAssembler::CachedTempRegister::value):
    (JSC::AbstractMacroAssembler::CachedTempRegister::setValue):
    (JSC::AbstractMacroAssembler::CachedTempRegister::invalidate):
    (JSC::AbstractMacroAssembler::invalidateAllTempRegisters):
    (JSC::AbstractMacroAssembler::isTempRegisterValid):
    (JSC::AbstractMacroAssembler::clearTempRegisterValid):
    (JSC::AbstractMacroAssembler::setTempRegisterValid):
    * assembler/LinkBuffer.cpp:
    (JSC::LinkBuffer::copyCompactAndLinkCode):
    (JSC::LinkBuffer::linkCode):
    * assembler/LinkBuffer.h:
    * assembler/MacroAssembler.h:
    (JSC::MacroAssembler::isPtrAlignedAddressOffset):
    (JSC::MacroAssembler::pushToSave):
    (JSC::MacroAssembler::popToRestore):
    (JSC::MacroAssembler::patchableBranchTest32):
    * assembler/MacroAssemblerARM64.h: Added.
    * assembler/MacroAssemblerARMv7.h:
    * dfg/DFGFixupPhase.cpp:
    (JSC::DFG::FixupPhase::fixupNode):
    * dfg/DFGOSRExitCompiler32_64.cpp:
    (JSC::DFG::OSRExitCompiler::compileExit):
    * dfg/DFGOSRExitCompiler64.cpp:
    (JSC::DFG::OSRExitCompiler::compileExit):
    * dfg/DFGSpeculativeJIT.cpp:
    (JSC::DFG::SpeculativeJIT::compileArithDiv):
    (JSC::DFG::SpeculativeJIT::compileArithMod):
    * disassembler/ARM64/A64DOpcode.cpp: Added.
    * disassembler/ARM64/A64DOpcode.h: Added.
    * disassembler/ARM64Disassembler.cpp: Added.
    * heap/MachineStackMarker.cpp:
    (JSC::getPlatformThreadRegisters):
    (JSC::otherThreadStackPointer):
    * heap/Region.h:
    * jit/AssemblyHelpers.h:
    (JSC::AssemblyHelpers::debugCall):
    * jit/CCallHelpers.h:
    * jit/ExecutableAllocator.h:
    * jit/FPRInfo.h:
    (JSC::FPRInfo::toRegister):
    (JSC::FPRInfo::toIndex):
    (JSC::FPRInfo::debugName):
    * jit/GPRInfo.h:
    (JSC::GPRInfo::toRegister):
    (JSC::GPRInfo::toIndex):
    (JSC::GPRInfo::debugName):
    * jit/JITInlines.h:
    (JSC::JIT::restoreArgumentReferenceForTrampoline):
    * jit/JITOperationWrappers.h:
    * jit/JITOperations.cpp:
    * jit/JITStubs.cpp:
    (JSC::performPlatformSpecificJITAssertions):
    (JSC::tryCachePutByID):
    * jit/JITStubs.h:
    (JSC::JITStackFrame::returnAddressSlot):
    * jit/JITStubsARM64.h: Added.
    * jit/JSInterfaceJIT.h:
    * jit/Repatch.cpp:
    (JSC::emitRestoreScratch):
    (JSC::generateProtoChainAccessStub):
    (JSC::tryCacheGetByID):
    (JSC::emitPutReplaceStub):
    (JSC::tryCachePutByID):
    (JSC::tryRepatchIn):
    * jit/ScratchRegisterAllocator.h:
    (JSC::ScratchRegisterAllocator::preserveReusedRegistersByPushing):
    (JSC::ScratchRegisterAllocator::restoreReusedRegistersByPopping):
    * jit/ThunkGenerators.cpp:
    (JSC::nativeForGenerator):
    (JSC::floorThunkGenerator):
    (JSC::ceilThunkGenerator):
    * jsc.cpp:
    (main):
    * llint/LLIntOfflineAsmConfig.h:
    * llint/LLIntSlowPaths.cpp:
    (JSC::LLInt::handleHostCall):
    * llint/LowLevelInterpreter.asm:
    * llint/LowLevelInterpreter64.asm:
    * offlineasm/arm.rb:
    * offlineasm/arm64.rb: Added.
    * offlineasm/backends.rb:
    * offlineasm/instructions.rb:
    * offlineasm/risc.rb:
    * offlineasm/transform.rb:
    * yarr/YarrJIT.cpp:
    (JSC::Yarr::YarrGenerator::alignCallFrameSizeInBytes):
    (JSC::Yarr::YarrGenerator::initCallFrame):
    (JSC::Yarr::YarrGenerator::removeCallFrame):
    (JSC::Yarr::YarrGenerator::generateEnter):
    * yarr/YarrJIT.h:
    
    Source/WTF:
    
    Reviewed by Oliver Hunt.
    
    * Configurations/Base.xcconfig:
    * wtf/Atomics.h:
    (WTF::weakCompareAndSwap):
    (WTF::armV7_dmb):
    * wtf/FastMalloc.cpp:
    * wtf/Platform.h:
    * wtf/dtoa.cpp:
    * wtf/dtoa/utils.h:
    * wtf/text/ASCIIFastPath.h:
    (WTF::copyLCharsFromUCharSource):
    * wtf/text/StringImpl.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    98f0de07