Changeset 52970 in webkit


Ignore:
Timestamp:
Jan 7, 2010 9:47:21 PM (14 years ago)
Author:
Laszlo Gombos
Message:

2010-01-07 Laszlo Gombos <Laszlo Gombos>

Reviewed by Gavin Barraclough.

[Symbian] Port ARM traditional JIT Trampolines to RVCT
https://bugs.webkit.org/show_bug.cgi?id=30552

Take the GCC implementation and mechanically convert
it to RVCT syntax.

Use 'bx rX' instead of 'mov pc, rX' when it is available.

Developed in cooperation with Iain Campbell and Gabor Loki.

  • JavaScriptCore.pri: Extra step to generate RVCT stubs. The script generation intentionally executed all the time not just for RVCT targets.
  • create_rvct_stubs: Added. Perl script to expand precompiler macros for RVCT assembler - the template is defined in JITStubs.cpp.
  • jit/JITStubs.cpp: (JSC::ctiTrampoline): (JSC::ctiVMThrowTrampoline): (JSC::ctiOpThrowNotCaught):
Location:
trunk/JavaScriptCore
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r52962 r52970  
     12010-01-07  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        [Symbian] Port ARM traditional JIT Trampolines to RVCT
     6        https://bugs.webkit.org/show_bug.cgi?id=30552
     7
     8        Take the GCC implementation and mechanically convert
     9        it to RVCT syntax.
     10
     11        Use 'bx rX' instead of 'mov pc, rX' when it is available.
     12
     13        Developed in cooperation with Iain Campbell and Gabor Loki.
     14
     15        * JavaScriptCore.pri: Extra step to generate RVCT stubs. The
     16        script generation intentionally executed all the time not just
     17        for RVCT targets.
     18
     19        * create_rvct_stubs: Added. Perl script to expand precompiler macros
     20        for RVCT assembler - the template is defined in JITStubs.cpp.
     21
     22        * jit/JITStubs.cpp:
     23        (JSC::ctiTrampoline):
     24        (JSC::ctiVMThrowTrampoline):
     25        (JSC::ctiOpThrowNotCaught):
     26
    1272010-01-07  Geoffrey Garen  <ggaren@apple.com>
    228
  • trunk/JavaScriptCore/JavaScriptCore.pri

    r52924 r52970  
    8484JSCBISON += \
    8585    parser/Grammar.y
     86
     87RVCT_STUB_FILES += \
     88    jit/JITStubs.cpp
    8689
    8790SOURCES += \
     
    264267addExtraCompilerWithHeader(jscbison)
    265268
     269# GENERATOR 3: JIT Stub functions for RVCT
     270rvctstubs.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Generated${QMAKE_FILE_BASE}_RVCT.h
     271rvctstubs.commands = perl $$PWD/create_rvct_stubs ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
     272rvctstubs.depend = ${QMAKE_FILE_NAME}
     273rvctstubs.input = RVCT_STUB_FILES
     274rvctstubs.CONFIG += no_link
     275addExtraCompiler(rvctstubs)
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r52806 r52970  
    642642);
    643643
     644#elif COMPILER(RVCT) && CPU(ARM_TRADITIONAL)
     645
     646__asm EncodedJSValue ctiTrampoline(void*, RegisterFile*, CallFrame*, JSValue*, Profiler**, JSGlobalData*)
     647{
     648    ARM
     649    stmdb sp!, {r1-r3}
     650    stmdb sp!, {r4-r8, lr}
     651    sub sp, sp, #36
     652    mov r4, r2
     653    mov r5, #512
     654    mov lr, pc
     655    bx r0
     656    add sp, sp, #36
     657    ldmia sp!, {r4-r8, lr}
     658    add sp, sp, #12
     659    bx lr
     660}
     661
     662__asm void ctiVMThrowTrampoline()
     663{
     664    ARM
     665    PRESERVE8
     666    IMPORT cti_vm_throw
     667    mov r0, sp
     668    bl cti_vm_throw
     669    add sp, sp, #36
     670    ldmia sp!, {r4-r8, lr}
     671    add sp, sp, #12
     672    bx lr
     673}
     674
     675__asm void ctiOpThrowNotCaught()
     676{
     677    ARM
     678    add sp, sp, #36
     679    ldmia sp!, {r4-r8, lr}
     680    add sp, sp, #12
     681    bx lr
     682}
     683
    644684#elif COMPILER(MSVC) && CPU(X86)
    645685
     
    10121052        ); \
    10131053    rtype JITStubThunked_##op(STUB_ARGS_DECLARATION)
     1054
     1055#elif CPU(ARM_TRADITIONAL) && COMPILER(RVCT)
     1056
     1057#define DEFINE_STUB_FUNCTION(rtype, op) rtype JITStubThunked_##op(STUB_ARGS_DECLARATION)
     1058
     1059/* The following is a workaround for RVCT toolchain; precompiler macros are not expanded before the code is passed to the assembler */
     1060
     1061/* The following section is a template to generate code for GeneratedJITStubs_RVCT.h */
     1062/* The pattern "#xxx#" will be replaced with "xxx" */
     1063
     1064/*
     1065RVCT(extern "C" #rtype# JITStubThunked_#op#(STUB_ARGS_DECLARATION);)
     1066RVCT(__asm #rtype# cti_#op#(STUB_ARGS_DECLARATION))
     1067RVCT({)
     1068RVCT(    ARM)
     1069RVCT(    IMPORT JITStubThunked_#op#)
     1070RVCT(    str lr, [sp, #32])
     1071RVCT(    bl JITStubThunked_#op#)
     1072RVCT(    ldr lr, [sp, #32])
     1073RVCT(    bx lr))
     1074RVCT(})
     1075RVCT()
     1076*/
     1077
     1078/* Include the generated file */
     1079#include "GeneratedJITStubs_RVCT.h"
    10141080
    10151081#else
Note: See TracChangeset for help on using the changeset viewer.