[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

laszlo.1.gombos at nokia.com laszlo.1.gombos at nokia.com
Thu Apr 8 00:58:12 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 32fb4aef66adb5b81ee798a936446ab039c27ec3
Author: laszlo.1.gombos at nokia.com <laszlo.1.gombos at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 8 05:47:21 2010 +0000

    2010-01-07  Laszlo Gombos  <laszlo.1.gombos at nokia.com>
    
            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):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index d3af473..0d90f16 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,29 @@
+2010-01-07  Laszlo Gombos  <laszlo.1.gombos at nokia.com>
+
+        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):
+
 2010-01-07  Geoffrey Garen  <ggaren at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/JavaScriptCore/JavaScriptCore.pri b/JavaScriptCore/JavaScriptCore.pri
index af32ab1..bb9cffe 100644
--- a/JavaScriptCore/JavaScriptCore.pri
+++ b/JavaScriptCore/JavaScriptCore.pri
@@ -84,6 +84,9 @@ KEYWORDLUT_FILES += \
 JSCBISON += \
     parser/Grammar.y
 
+RVCT_STUB_FILES += \
+    jit/JITStubs.cpp
+
 SOURCES += \
     API/JSBase.cpp \
     API/JSCallbackConstructor.cpp \
@@ -263,3 +266,10 @@ jscbison.dependency_type = TYPE_C
 jscbison.CONFIG = target_predeps
 addExtraCompilerWithHeader(jscbison)
 
+# GENERATOR 3: JIT Stub functions for RVCT
+rvctstubs.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Generated${QMAKE_FILE_BASE}_RVCT.h
+rvctstubs.commands = perl $$PWD/create_rvct_stubs ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
+rvctstubs.depend = ${QMAKE_FILE_NAME}
+rvctstubs.input = RVCT_STUB_FILES
+rvctstubs.CONFIG += no_link
+addExtraCompiler(rvctstubs)
diff --git a/JavaScriptCore/create_rvct_stubs b/JavaScriptCore/create_rvct_stubs
new file mode 100644
index 0000000..0c49c4f
--- /dev/null
+++ b/JavaScriptCore/create_rvct_stubs
@@ -0,0 +1,52 @@
+#! /usr/bin/perl -w
+#
+# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+use strict;
+
+my $file = $ARGV[0];
+shift;
+
+my $stub_template = "";
+my $stub = "";
+
+my $rtype = "";
+my $op = "";
+
+my $rtype_template = quotemeta("#rtype#");
+my $op_template = quotemeta("#op#");
+
+print STDERR "Creating RVCT stubs for $file \n";
+open(IN, $file) or die "No such file $file";
+
+while ( $_ = <IN> ) {
+    if ( /^RVCT\((.*)\)/ ) {
+        $stub_template .= $1 . "\n";
+    }
+    if ( /^DEFINE_STUB_FUNCTION\((.*), (.*)\)/ ) {
+        $stub = $stub_template;
+        $rtype = quotemeta($1);
+        $op = quotemeta($2);
+        $stub =~ s/$rtype_template/$rtype/g;
+        $stub =~ s/$op_template/$op/g;
+        $stub =~ s/\\\*/\*/g;
+        print $stub;
+    }
+}
+
+close(IN);
diff --git a/JavaScriptCore/jit/JITStubs.cpp b/JavaScriptCore/jit/JITStubs.cpp
index 21eeb67..351c70c 100644
--- a/JavaScriptCore/jit/JITStubs.cpp
+++ b/JavaScriptCore/jit/JITStubs.cpp
@@ -641,6 +641,46 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
     "mov pc, lr" "\n"
 );
 
+#elif COMPILER(RVCT) && CPU(ARM_TRADITIONAL)
+
+__asm EncodedJSValue ctiTrampoline(void*, RegisterFile*, CallFrame*, JSValue*, Profiler**, JSGlobalData*)
+{
+    ARM
+    stmdb sp!, {r1-r3}
+    stmdb sp!, {r4-r8, lr}
+    sub sp, sp, #36
+    mov r4, r2
+    mov r5, #512
+    mov lr, pc
+    bx r0
+    add sp, sp, #36
+    ldmia sp!, {r4-r8, lr}
+    add sp, sp, #12
+    bx lr
+}
+
+__asm void ctiVMThrowTrampoline()
+{
+    ARM
+    PRESERVE8
+    IMPORT cti_vm_throw
+    mov r0, sp
+    bl cti_vm_throw
+    add sp, sp, #36
+    ldmia sp!, {r4-r8, lr}
+    add sp, sp, #12
+    bx lr
+}
+
+__asm void ctiOpThrowNotCaught()
+{
+    ARM
+    add sp, sp, #36
+    ldmia sp!, {r4-r8, lr}
+    add sp, sp, #12
+    bx lr
+}
+
 #elif COMPILER(MSVC) && CPU(X86)
 
 #if USE(JIT_STUB_ARGUMENT_VA_LIST)
@@ -1012,6 +1052,32 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, thunkReturnAddress) == THUNK_RETUR
         ); \
     rtype JITStubThunked_##op(STUB_ARGS_DECLARATION)
 
+#elif CPU(ARM_TRADITIONAL) && COMPILER(RVCT)
+
+#define DEFINE_STUB_FUNCTION(rtype, op) rtype JITStubThunked_##op(STUB_ARGS_DECLARATION)
+
+/* The following is a workaround for RVCT toolchain; precompiler macros are not expanded before the code is passed to the assembler */
+
+/* The following section is a template to generate code for GeneratedJITStubs_RVCT.h */
+/* The pattern "#xxx#" will be replaced with "xxx" */
+
+/*
+RVCT(extern "C" #rtype# JITStubThunked_#op#(STUB_ARGS_DECLARATION);)
+RVCT(__asm #rtype# cti_#op#(STUB_ARGS_DECLARATION))
+RVCT({)
+RVCT(    ARM)
+RVCT(    IMPORT JITStubThunked_#op#)
+RVCT(    str lr, [sp, #32])
+RVCT(    bl JITStubThunked_#op#)
+RVCT(    ldr lr, [sp, #32])
+RVCT(    bx lr))
+RVCT(})
+RVCT()
+*/
+
+/* Include the generated file */
+#include "GeneratedJITStubs_RVCT.h"
+
 #else
 #define DEFINE_STUB_FUNCTION(rtype, op) rtype JIT_STUB cti_##op(STUB_ARGS_DECLARATION)
 #endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list