Ignore:
Timestamp:
Oct 26, 2009, 3:49:23 PM (16 years ago)
Author:
[email protected]
Message:

2009-10-26 Gabor Loki <[email protected]>

Reviewed by Gavin Barraclough.

The thunkReturnAddress is on JITStackFrame on ARM JIT as well
https://bugs.webkit.org/show_bug.cgi?id=30782

Move the thunkReturnAddress from top of the stack into the JITStackFrame
structure. This is a requirement for JSValue32_64 support on ARM.

  • assembler/MacroAssemblerARM.h: (JSC::MacroAssemblerARM::ret): Return with link register (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register
  • jit/JIT.h: Remove unused ctiReturnRegister
  • jit/JITInlineMethods.h: Same as ARMv7 (JSC::JIT::restoreArgumentReference): Ditto. (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto.
  • jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction
  • jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use small trampoline functions which handle return addresses for each CTI_STUB_FUNCTION.
  • jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress
  • yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r49734 r50109  
    536536    "stmdb sp!, {r1-r3}" "\n"
    537537    "stmdb sp!, {r4-r8, lr}" "\n"
    538     "mov r6, pc" "\n"
    539     "add r6, r6, #40" "\n"
    540     "sub sp, sp, #32" "\n"
    541     "ldr r4, [sp, #60]" "\n"
     538    "sub sp, sp, #36" "\n"
     539    "mov r4, r2" "\n"
    542540    "mov r5, #512" "\n"
    543     // r0 contains the code
    544     "add r8, pc, #4" "\n"
    545     "str r8, [sp, #-4]!" "\n"
     541    "mov lr, pc" "\n"
    546542    "mov pc, r0" "\n"
    547     "add sp, sp, #32" "\n"
     543    "add sp, sp, #36" "\n"
    548544    "ldmia sp!, {r4-r8, lr}" "\n"
    549545    "add sp, sp, #12" "\n"
    550546    "mov pc, lr" "\n"
    551 
    552     // the return instruction
    553     "ldr pc, [sp], #4" "\n"
    554547);
    555548
     
    558551SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
    559552    "mov r0, sp" "\n"
    560     "mov lr, r6" "\n"
    561     "add r8, pc, #4" "\n"
    562     "str r8, [sp, #-4]!" "\n"
    563     "b " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n"
     553    "bl " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n"
    564554
    565555// Both has the same return sequence
    566556".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
    567557SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
    568     "add sp, sp, #32" "\n"
     558    "add sp, sp, #36" "\n"
    569559    "ldmia sp!, {r4-r8, lr}" "\n"
    570560    "add sp, sp, #12" "\n"
     
    908898        ); \
    909899    rtype JITStubThunked_##op(STUB_ARGS_DECLARATION) \
     900
     901#elif PLATFORM(ARM_TRADITIONAL) && COMPILER(GCC)
     902
     903#define DEFINE_STUB_FUNCTION(rtype, op) \
     904    extern "C" { \
     905        rtype JITStubThunked_##op(STUB_ARGS_DECLARATION); \
     906    }; \
     907    asm volatile ( \
     908        ".globl " SYMBOL_STRING(cti_##op) "\n" \
     909        SYMBOL_STRING(cti_##op) ":" "\n" \
     910        "str lr, [sp, #32]" "\n" \
     911        "bl " SYMBOL_STRING(JITStubThunked_##op) "\n" \
     912        "ldr lr, [sp, #32]" "\n" \
     913        "mov pc, lr" "\n" \
     914        ); \
     915    rtype JITStubThunked_##op(STUB_ARGS_DECLARATION)
    910916
    911917#else
Note: See TracChangeset for help on using the changeset viewer.