Ignore:
Timestamp:
Nov 13, 2009, 4:44:42 PM (16 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=31050

Patch by Zoltan Herczeg <[email protected]> on 2009-11-14
Reviewed by Gavin Barraclough.

Adding JSVALUE32_64 support for ARM (but not turning it
on by default). All optimizations must be disabled, since
this patch is only the first of a series of patches.

During the work, a lot of x86 specific code revealed and
made platform independent.
See revisions: 50531 50541 50593 50594 50595

  • assembler/ARMAssembler.h:

(JSC::ARMAssembler::):
(JSC::ARMAssembler::fdivd_r):

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::lshift32):
(JSC::MacroAssemblerARM::neg32):
(JSC::MacroAssemblerARM::rshift32):
(JSC::MacroAssemblerARM::branchOr32):
(JSC::MacroAssemblerARM::set8):
(JSC::MacroAssemblerARM::setTest8):
(JSC::MacroAssemblerARM::loadDouble):
(JSC::MacroAssemblerARM::divDouble):
(JSC::MacroAssemblerARM::convertInt32ToDouble):
(JSC::MacroAssemblerARM::zeroDouble):

  • jit/JIT.cpp:
  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • jit/JITStubs.cpp:
  • wtf/StdLibExtras.h:
File:
1 edited

Legend:

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

    r50874 r50981  
    5757#include "Register.h"
    5858#include "SamplingTool.h"
     59#include <wtf/StdLibExtras.h>
    5960#include <stdarg.h>
    6061#include <stdio.h>
     
    269270    "add sp, sp, #0x3c" "\n"
    270271    "bx lr" "\n"
     272);
     273
     274#elif COMPILER(GCC) && PLATFORM(ARM_TRADITIONAL)
     275
     276asm volatile (
     277".globl " SYMBOL_STRING(ctiTrampoline) "\n"
     278SYMBOL_STRING(ctiTrampoline) ":" "\n"
     279    "stmdb sp!, {r1-r3}" "\n"
     280    "stmdb sp!, {r4-r8, lr}" "\n"
     281    "sub sp, sp, #68" "\n"
     282    "mov r4, r2" "\n"
     283    "mov r5, #512" "\n"
     284    // r0 contains the code
     285    "mov lr, pc" "\n"
     286    "mov pc, r0" "\n"
     287    "add sp, sp, #68" "\n"
     288    "ldmia sp!, {r4-r8, lr}" "\n"
     289    "add sp, sp, #12" "\n"
     290    "mov pc, lr" "\n"
     291);
     292
     293asm volatile (
     294".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
     295SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
     296    "mov r0, sp" "\n"
     297    "bl " SYMBOL_STRING(cti_vm_throw) "\n"
     298
     299// Both has the same return sequence
     300".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
     301SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
     302    "add sp, sp, #68" "\n"
     303    "ldmia sp!, {r4-r8, lr}" "\n"
     304    "add sp, sp, #12" "\n"
     305    "mov pc, lr" "\n"
    271306);
    272307
     
    907942#elif PLATFORM(ARM_TRADITIONAL) && COMPILER(GCC)
    908943
     944#if USE(JSVALUE32_64)
     945#define THUNK_RETURN_ADDRESS_OFFSET 64
     946#else
     947#define THUNK_RETURN_ADDRESS_OFFSET 32
     948#endif
     949
     950COMPILE_ASSERT(offsetof(struct JITStackFrame, thunkReturnAddress) == THUNK_RETURN_ADDRESS_OFFSET, JITStackFrame_thunkReturnAddress_offset_mismatch);
     951
    909952#define DEFINE_STUB_FUNCTION(rtype, op) \
    910953    extern "C" { \
     
    914957        ".globl " SYMBOL_STRING(cti_##op) "\n" \
    915958        SYMBOL_STRING(cti_##op) ":" "\n" \
    916         "str lr, [sp, #32]" "\n" \
     959        "str lr, [sp, #" STRINGIZE_VALUE_OF(THUNK_RETURN_ADDRESS_OFFSET) "]" "\n" \
    917960        "bl " SYMBOL_STRING(JITStubThunked_##op) "\n" \
    918         "ldr lr, [sp, #32]" "\n" \
     961        "ldr lr, [sp, #" STRINGIZE_VALUE_OF(THUNK_RETURN_ADDRESS_OFFSET) "]" "\n" \
    919962        "mov pc, lr" "\n" \
    920963        ); \
Note: See TracChangeset for help on using the changeset viewer.