Ignore:
Timestamp:
Jun 8, 2009, 6:40:59 PM (16 years ago)
Author:
[email protected]
Message:

2009-06-08 Gavin Barraclough <[email protected]>

Reviewed by Geoff Garen.

Add (incomplete) support to YARR for running with the jit enabled
on Arm thumb2 platforms. Adds new Assembler/MacroAssembler classes,
along with cache flushing support, tweaks to MacroAssemblerCodePtr
to support decorated thumb code pointers, and new enter/exit code
to YARR jit for the platform.

Support for this platform is still under development - the assembler
currrently only supports planting and linking jumps with a 16Mb range.
As such, initially commiting in a disabled state.

Add new assembler files.

  • assembler/ARMv7Assembler.h: Added.

Add new Assembler.

  • assembler/AbstractMacroAssembler.h:

Tweaks to ensure sizes of pointer values planted in JIT code do not change.

  • assembler/MacroAssembler.h:

On ARMv7 platforms use MacroAssemblerARMv7.

  • assembler/MacroAssemblerARMv7.h: Added.

Add new MacroAssembler.

  • assembler/MacroAssemblerCodeRef.h: (JSC::FunctionPtr::FunctionPtr):

Add better ASSERT.

(JSC::ReturnAddressPtr::ReturnAddressPtr):

Add better ASSERT.

(JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):

On ARMv7, MacroAssemblerCodePtr's mush be 'decorated' with a low bit set,
to indicate to the processor that the code is thumb code, not traditional
32-bit ARM.

(JSC::MacroAssemblerCodePtr::dataLocation):

On ARMv7, decoration must be removed.

  • jit/ExecutableAllocator.h: (JSC::ExecutableAllocator::makeWritable):

Reformatted, no change.

(JSC::ExecutableAllocator::makeExecutable):

When marking code executable also cache flush it, where necessary.

(JSC::ExecutableAllocator::MakeWritable::MakeWritable):

Only use the null implementation of this class if both !ASSEMBLER_WX_EXCLUSIVE
and running on x86(_64) - on other platforms we may also need ensure that
makeExecutable is called at the end to flush caches.

(JSC::ExecutableAllocator::reprotectRegion):

Reformatted, no change.

(JSC::ExecutableAllocator::cacheFlush):

Cache flush a region of memory, or platforms where this is necessary.

  • wtf/Platform.h:

Add changes necessary to allow YARR jit to build on this platform, disabled.

  • yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::generateEnter): (JSC::Yarr::RegexGenerator::generateReturn):

Add support to these methods for ARMv7.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r44508 r44514  
    129129                869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */ = {isa = PBXBuildFile; fileRef = 869EBCB60E8C6D4A008722CC /* ResultType.h */; settings = {ATTRIBUTES = (Private, ); }; };
    130130                86A90ED00EE7D51F00AB350D /* JITArithmetic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */; };
     131                86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */; };
     132                86ADD1460FDDEA980006EEC2 /* MacroAssemblerARMv7.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ADD1440FDDEA980006EEC2 /* MacroAssemblerARMv7.h */; };
    131133                86C36EEA0EE1289D00B3DF59 /* MacroAssembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86C36EE90EE1289D00B3DF59 /* MacroAssembler.h */; };
    132134                86CC85A10EE79A4700288682 /* JITInlineMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = 86CC85A00EE79A4700288682 /* JITInlineMethods.h */; };
     
    628630                869EBCB60E8C6D4A008722CC /* ResultType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultType.h; sourceTree = "<group>"; };
    629631                86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITArithmetic.cpp; sourceTree = "<group>"; };
     632                86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMv7Assembler.h; sourceTree = "<group>"; };
     633                86ADD1440FDDEA980006EEC2 /* MacroAssemblerARMv7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerARMv7.h; sourceTree = "<group>"; };
    630634                86C36EE90EE1289D00B3DF59 /* MacroAssembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssembler.h; sourceTree = "<group>"; };
    631635                86CC85A00EE79A4700288682 /* JITInlineMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITInlineMethods.h; sourceTree = "<group>"; };
     
    15321536                        children = (
    15331537                                860161DF0F3A83C100F84710 /* AbstractMacroAssembler.h */,
     1538                                86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */,
    15341539                                9688CB130ED12B4E001D649F /* AssemblerBuffer.h */,
    15351540                                863B23DF0FC60E6200703AA4 /* MacroAssemblerCodeRef.h */,
     1541                                86ADD1440FDDEA980006EEC2 /* MacroAssemblerARMv7.h */,
    15361542                                860161E00F3A83C100F84710 /* MacroAssemblerX86.h */,
    15371543                                860161E10F3A83C100F84710 /* MacroAssemblerX86_64.h */,
     
    18411847                                0BDFFAE00FC6192900D69EF4 /* CrossThreadRefCounted.h in Headers */,
    18421848                                0BDFFAE10FC6193100D69EF4 /* OwnFastMallocPtr.h in Headers */,
     1849                                86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */,
     1850                                86ADD1460FDDEA980006EEC2 /* MacroAssemblerARMv7.h in Headers */,
    18431851                        );
    18441852                        runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset for help on using the changeset viewer.