Ignore:
Timestamp:
Oct 16, 2018, 12:19:13 AM (7 years ago)
Author:
[email protected]
Message:

Support arm64 CPUs with a 32-bit address space
https://bugs.webkit.org/show_bug.cgi?id=190273

Reviewed by Michael Saboff.

Source/JavaScriptCore:

This patch adds support for arm64_32 in the LLInt. In order to
make this work we needed to add a new type that reflects the size
of a cpu register. This type is called CPURegister or UCPURegister
for the unsigned version. Most places that used void* or intptr_t
to refer to a register have been changed to use this new type.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/ARM64Assembler.h:

(JSC::isInt):
(JSC::is4ByteAligned):
(JSC::PairPostIndex::PairPostIndex):
(JSC::PairPreIndex::PairPreIndex):
(JSC::ARM64Assembler::readPointer):
(JSC::ARM64Assembler::readCallTarget):
(JSC::ARM64Assembler::computeJumpType):
(JSC::ARM64Assembler::linkCompareAndBranch):
(JSC::ARM64Assembler::linkConditionalBranch):
(JSC::ARM64Assembler::linkTestAndBranch):
(JSC::ARM64Assembler::loadRegisterLiteral):
(JSC::ARM64Assembler::loadStoreRegisterPairPostIndex):
(JSC::ARM64Assembler::loadStoreRegisterPairPreIndex):
(JSC::ARM64Assembler::loadStoreRegisterPairOffset):
(JSC::ARM64Assembler::loadStoreRegisterPairNonTemporal):
(JSC::isInt7): Deleted.
(JSC::isInt11): Deleted.

  • assembler/CPU.h:

(JSC::isAddress64Bit):
(JSC::isAddress32Bit):

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::shouldBlind):

  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssemblerARM64::collectCPUFeatures):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::load):
(JSC::MacroAssemblerARM64::store):
(JSC::MacroAssemblerARM64::isInIntRange): Deleted.

  • assembler/Printer.h:
  • assembler/ProbeContext.h:

(JSC::Probe::CPUState::gpr):
(JSC::Probe::CPUState::spr):
(JSC::Probe::Context::gpr):
(JSC::Probe::Context::spr):

  • b3/B3ConstPtrValue.h:
  • b3/B3StackmapSpecial.cpp:

(JSC::B3::StackmapSpecial::isArgValidForRep):

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::stackSlot const):
(JSC::B3::Air::Arg::special const):

  • b3/air/testair.cpp:
  • b3/testb3.cpp:

(JSC::B3::testStoreConstantPtr):
(JSC::B3::testInterpreter):
(JSC::B3::testAddShl32):
(JSC::B3::testLoadBaseIndexShift32):

  • bindings/ScriptFunctionCall.cpp:

(Deprecated::ScriptCallArgumentHandler::appendArgument):

  • bindings/ScriptFunctionCall.h:
  • bytecode/CodeBlock.cpp:

(JSC::roundCalleeSaveSpaceAsVirtualRegisters):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::restoreCalleeSavesFor):
(JSC::DFG::saveCalleeSavesFor):
(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer):
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::reifyInlinedCallFrames):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • disassembler/UDis86Disassembler.cpp:

(JSC::tryToDisassembleWithUDis86):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileWeakMapGet):

  • heap/MachineStackMarker.cpp:

(JSC::copyMemory):

  • interpreter/CallFrame.h:

(JSC::ExecState::returnPC const):
(JSC::ExecState::hasReturnPC const):
(JSC::ExecState::clearReturnPC):
(JSC::ExecState::returnPCOffset):
(JSC::ExecState::isGlobalExec const):
(JSC::ExecState::setReturnPC):

  • interpreter/CalleeBits.h:

(JSC::CalleeBits::boxWasm):
(JSC::CalleeBits::isWasm const):
(JSC::CalleeBits::asWasmCallee const):

  • interpreter/Interpreter.cpp:

(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):

  • interpreter/VMEntryRecord.h:
  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::clearStackFrame):

  • jit/RegisterAtOffset.h:

(JSC::RegisterAtOffset::offsetAsIndex const):

  • jit/RegisterAtOffsetList.cpp:

(JSC::RegisterAtOffsetList::RegisterAtOffsetList):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LLIntOfflineAsmConfig.h:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/arm64.rb:
  • offlineasm/asm.rb:
  • offlineasm/ast.rb:
  • offlineasm/backends.rb:
  • offlineasm/parser.rb:
  • offlineasm/x86.rb:
  • runtime/BasicBlockLocation.cpp:

(JSC::BasicBlockLocation::dumpData const):
(JSC::BasicBlockLocation::emitExecuteCode const):

  • runtime/BasicBlockLocation.h:
  • runtime/HasOwnPropertyCache.h:
  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::inplaceMultiplyAdd):
(JSC::JSBigInt::digitDiv):

  • runtime/JSBigInt.h:
  • runtime/JSObject.h:
  • runtime/Options.cpp:

(JSC::jitEnabledByDefault):

  • runtime/Options.h:
  • runtime/RegExp.cpp:

(JSC::RegExp::printTraceData):

  • runtime/SamplingProfiler.cpp:

(JSC::CFrameWalker::walk):

  • runtime/SlowPathReturnType.h:

(JSC::encodeResult):
(JSC::decodeResult):

  • tools/SigillCrashAnalyzer.cpp:

(JSC::SigillCrashAnalyzer::dumpCodeBlock):

Source/WebCore:

Fix missing namespace annotation.

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelation):

Source/WTF:

Use WTF_CPU_ADDRESS64/32 to decide if the system is running on arm64_32.

  • wtf/MathExtras.h:

(getLSBSet):

  • wtf/Platform.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/parser.rb

    r236499 r237173  
    364364        result
    365365    end
     366
     367    def parseConstExpr
     368        if @tokens[@idx] == "constexpr"
     369            @idx += 1
     370            skipNewLine
     371            if @tokens[@idx] == "("
     372                codeOrigin, text = parseTextInParens
     373                text = text.join
     374            else
     375                codeOrigin, text = parseColonColon
     376                text = text.join("::")
     377            end
     378            ConstExpr.forName(codeOrigin, text)
     379        else
     380            parseError
     381        end
     382    end
    366383   
    367384    def parseAddress(offset)
     
    388405            b = parseVariable
    389406            if @tokens[@idx] == "]"
    390                 result = BaseIndex.new(codeOrigin, a, b, 1, offset)
     407                result = BaseIndex.new(codeOrigin, a, b, Immediate.new(codeOrigin, 1), offset)
    391408            else
    392409                parseError unless @tokens[@idx] == ","
    393410                @idx += 1
    394                 parseError unless ["1", "2", "4", "8"].member? @tokens[@idx].string
    395                 c = @tokens[@idx].string.to_i
    396                 @idx += 1
     411                if ["1", "2", "4", "8"].member? @tokens[@idx].string
     412                    c = Immediate.new(codeOrigin, @tokens[@idx].string.to_i)
     413                    @idx += 1
     414                elsif @tokens[@idx] == "constexpr"
     415                    c = parseConstExpr
     416                else
     417                    c = parseVariable
     418                end
    397419                parseError unless @tokens[@idx] == "]"
    398420                result = BaseIndex.new(codeOrigin, a, b, c, offset)
     
    479501            Sizeof.forName(codeOrigin, names.join('::'))
    480502        elsif @tokens[@idx] == "constexpr"
    481             @idx += 1
    482             skipNewLine
    483             if @tokens[@idx] == "("
    484                 codeOrigin, text = parseTextInParens
    485                 text = text.join
    486             else
    487                 codeOrigin, text = parseColonColon
    488                 text = text.join("::")
    489             end
    490             ConstExpr.forName(codeOrigin, text)
     503            parseConstExpr
    491504        elsif isLabel @tokens[@idx]
    492505            result = LabelReference.new(@tokens[@idx].codeOrigin, Label.forName(@tokens[@idx].codeOrigin, @tokens[@idx].string))
Note: See TracChangeset for help on using the changeset viewer.