[iOS] Upstream JavaScriptCore support for ARM64
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Oct 2013 22:16:39 +0000 (22:16 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Oct 2013 22:16:39 +0000 (22:16 +0000)
commit9de4da9490496d530e41f061d7f7dc7ed8244f2c
treeb389d1ffbb908205c9755b0f1a82e1ed4c73c570
parent4118c3c8b26b4359af81ae7883f09adc96fdf1c3
[iOS] Upstream JavaScriptCore support for ARM64
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: https://svn.webkit.org/repository/webkit/trunk@157474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
59 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/Base.xcconfig
Source/JavaScriptCore/Configurations/DebugRelease.xcconfig
Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig
Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/assembler/ARM64Assembler.h [new file with mode: 0644]
Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
Source/JavaScriptCore/assembler/LinkBuffer.cpp
Source/JavaScriptCore/assembler/LinkBuffer.h
Source/JavaScriptCore/assembler/MacroAssembler.h
Source/JavaScriptCore/assembler/MacroAssemblerARM64.h [new file with mode: 0644]
Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h
Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
Source/JavaScriptCore/dfg/DFGOSRExitCompiler32_64.cpp
Source/JavaScriptCore/dfg/DFGOSRExitCompiler64.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.cpp [new file with mode: 0644]
Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h [new file with mode: 0644]
Source/JavaScriptCore/disassembler/ARM64Disassembler.cpp [new file with mode: 0644]
Source/JavaScriptCore/heap/MachineStackMarker.cpp
Source/JavaScriptCore/heap/Region.h
Source/JavaScriptCore/jit/AssemblyHelpers.h
Source/JavaScriptCore/jit/CCallHelpers.h
Source/JavaScriptCore/jit/ExecutableAllocator.h
Source/JavaScriptCore/jit/FPRInfo.h
Source/JavaScriptCore/jit/GPRInfo.h
Source/JavaScriptCore/jit/JITInlines.h
Source/JavaScriptCore/jit/JITOperationWrappers.h
Source/JavaScriptCore/jit/JITOperations.cpp
Source/JavaScriptCore/jit/JITStubs.cpp
Source/JavaScriptCore/jit/JITStubs.h
Source/JavaScriptCore/jit/JITStubsARM64.h [new file with mode: 0644]
Source/JavaScriptCore/jit/JSInterfaceJIT.h
Source/JavaScriptCore/jit/Repatch.cpp
Source/JavaScriptCore/jit/ScratchRegisterAllocator.h
Source/JavaScriptCore/jit/ThunkGenerators.cpp
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
Source/JavaScriptCore/llint/LowLevelInterpreter.asm
Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
Source/JavaScriptCore/offlineasm/arm.rb
Source/JavaScriptCore/offlineasm/arm64.rb [new file with mode: 0644]
Source/JavaScriptCore/offlineasm/backends.rb
Source/JavaScriptCore/offlineasm/instructions.rb
Source/JavaScriptCore/offlineasm/risc.rb
Source/JavaScriptCore/offlineasm/transform.rb
Source/JavaScriptCore/yarr/YarrJIT.cpp
Source/JavaScriptCore/yarr/YarrJIT.h
Source/WTF/ChangeLog
Source/WTF/Configurations/Base.xcconfig
Source/WTF/wtf/Atomics.h
Source/WTF/wtf/FastMalloc.cpp
Source/WTF/wtf/Platform.h
Source/WTF/wtf/dtoa.cpp
Source/WTF/wtf/dtoa/utils.h
Source/WTF/wtf/text/ASCIIFastPath.h
Source/WTF/wtf/text/StringImpl.h