Changeset 44523 in webkit for trunk/JavaScriptCore/jit/JIT.h


Ignore:
Timestamp:
Jun 8, 2009, 11:52:25 PM (16 years ago)
Author:
[email protected]
Message:

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

Reviewed by Geoff Garen.

Enable JS language JIT for ARM thumb2 platforms. Add ARMv7 specific
asm & constants, add appropriate configuration switches to Platform.h.

Landing this disabled until jump linking is completed (see YARR jit patch).

  • assembler/MacroAssemblerARMv7.h: (JSC::MacroAssemblerARMv7::load32):

Fix: should load pointer with ImmPtr not Imm32.

(JSC::MacroAssemblerARMv7::store32):

Fix: should load pointer with ImmPtr not Imm32.

(JSC::MacroAssemblerARMv7::move):

Fix: When moving an Imm32 that is actually a pointer, should call movT3()
not mov(), to ensure code generation is repeatable (for exception handling).

  • jit/JIT.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines):

Disable JIT_OPTIMIZE_NATIVE_CALL specific code generation if the optimization is not enabled.

  • jit/JIT.h:

Add ARMv7 specific values of constants & register names.

  • jit/JITInlineMethods.h: (JSC::JIT::preverveReturnAddressAfterCall): (JSC::JIT::restoreReturnAddressBeforeReturn): (JSC::JIT::restoreArgumentReferenceForTrampoline):

Implement for ARMv7 (move value to/from lr).

  • jit/JITStubs.cpp:

Add JIT entry/thow trampolines, add macro to add thunk wrapper around stub routines.

  • jit/JITStubs.h: (JSC::JITStackFrame::returnAddressSlot):

Add ARMv7 stack frame object.

  • wtf/Platform.h:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JIT.h

    r44476 r44523  
    229229        static const FPRegisterID fpRegT1 = X86::xmm1;
    230230        static const FPRegisterID fpRegT2 = X86::xmm2;
     231#elif PLATFORM(ARM_V7)
     232        static const RegisterID returnValueRegister = ARM::r0;
     233        static const RegisterID cachedResultRegister = ARM::r0;
     234        static const RegisterID firstArgumentRegister = ARM::r0;
     235
     236        static const RegisterID regT0 = ARM::r0;
     237        static const RegisterID regT1 = ARM::r1;
     238        static const RegisterID regT2 = ARM::r2;
     239        static const RegisterID regT3 = ARM::r4;
     240
     241        static const RegisterID callFrameRegister = ARM::r5;
     242        static const RegisterID timeoutCheckRegister = ARM::r6;
     243
     244        static const FPRegisterID fpRegT0 = ARM::d0;
     245        static const FPRegisterID fpRegT1 = ARM::d1;
     246        static const FPRegisterID fpRegT2 = ARM::d2;
    231247#else
    232248    #error "JIT not supported on this platform."
     
    261277        static const int patchOffsetMethodCheckProtoStruct = 30;
    262278        static const int patchOffsetMethodCheckPutFunction = 50;
    263 #else
     279#elif PLATFORM(X86)
    264280        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
    265281        static const int patchOffsetPutByIdStructure = 7;
     
    288304        static const int patchOffsetMethodCheckProtoStruct = 18;
    289305        static const int patchOffsetMethodCheckPutFunction = 29;
     306#elif PLATFORM(ARM_V7)
     307        // These architecture specific value are used to enable patching - see comment on op_put_by_id.
     308        static const int patchOffsetPutByIdStructure = 10;
     309        static const int patchOffsetPutByIdExternalLoad = 20;
     310        static const int patchLengthPutByIdExternalLoad = 12;
     311        static const int patchOffsetPutByIdPropertyMapOffset = 40;
     312        // These architecture specific value are used to enable patching - see comment on op_get_by_id.
     313        static const int patchOffsetGetByIdStructure = 10;
     314        static const int patchOffsetGetByIdBranchToSlowCase = 20;
     315        static const int patchOffsetGetByIdExternalLoad = 20;
     316        static const int patchLengthGetByIdExternalLoad = 12;
     317        static const int patchOffsetGetByIdPropertyMapOffset = 40;
     318        static const int patchOffsetGetByIdPutResult = 44;
     319#if ENABLE(OPCODE_SAMPLING)
     320        static const int patchOffsetGetByIdSlowCaseCall = 0; // FIMXE
     321#else
     322        static const int patchOffsetGetByIdSlowCaseCall = 28;
     323#endif
     324        static const int patchOffsetOpCallCompareToJump = 10;
     325
     326        static const int patchOffsetMethodCheckProtoObj = 18;
     327        static const int patchOffsetMethodCheckProtoStruct = 28;
     328        static const int patchOffsetMethodCheckPutFunction = 46;
    290329#endif
    291330
Note: See TracChangeset for help on using the changeset viewer.