Permalink
Browse files

2011-01-20 Patrick Gansterer <paroga@webkit.org>

        Reviewed by Oliver Hunt.

        [WINCE] Remove obsolete JSVALUE32 code
        https://bugs.webkit.org/show_bug.cgi?id=52450

        Remove the "offset hack" in create_jit_stubs, since we
        only support JSVALUE32_64 in the meantime.

        * create_jit_stubs: Removed offset argument
        * jit/JITStubs.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information...
1 parent 7c9ff4d commit 7d853f58029dfa5bd8f23023115441d59be06d5a paroga@webkit.org committed Jan 21, 2011
Showing with 23 additions and 30 deletions.
  1. +13 −0 Source/JavaScriptCore/ChangeLog
  2. +2 −12 Source/JavaScriptCore/create_jit_stubs
  3. +8 −18 Source/JavaScriptCore/jit/JITStubs.cpp
@@ -1,3 +1,16 @@
+2011-01-20 Patrick Gansterer <paroga@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ [WINCE] Remove obsolete JSVALUE32 code
+ https://bugs.webkit.org/show_bug.cgi?id=52450
+
+ Remove the "offset hack" in create_jit_stubs, since we
+ only support JSVALUE32_64 in the meantime.
+
+ * create_jit_stubs: Removed offset argument
+ * jit/JITStubs.cpp:
+
2011-01-20 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
@@ -22,20 +22,16 @@ use strict;
use File::Basename;
use Getopt::Long;
-my $usage = basename($0) . " --prefix prefix [--offset offset] file";
+my $usage = basename($0) . " --prefix prefix file";
my $rtype_template = quotemeta("#rtype#");
-my $offset_template = quotemeta(" THUNK_RETURN_ADDRESS_OFFSET");
my $op_template = quotemeta("#op#");
my $prefix;
-my $offset_is_set = 0;
-my $offset = 32;
my $file;
my $getOptionsResult = GetOptions(
- 'prefix=s' => \$prefix,
- 'offset=i' => sub { $offset_is_set = 1; $offset = $_[1]; }
+ 'prefix=s' => \$prefix
);
$file = $ARGV[0];
@@ -55,9 +51,6 @@ open(IN, $file) or die "No such file $file";
while ( $_ = <IN> ) {
if ( /^$prefix\_BEGIN\((.*)\)/ ) {
$stub = $1;
- if ($offset_is_set) {
- $stub =~ s/$offset_template/$offset/g;
- }
print $stub . "\n";
}
if ( /^$prefix\((.*)\)/ ) {
@@ -70,9 +63,6 @@ while ( $_ = <IN> ) {
$stub = $stub_template;
$rtype = quotemeta($1);
$op = quotemeta($2);
- if ($offset_is_set) {
- $stub =~ s/$offset_template/$offset/g;
- }
$stub =~ s/$rtype_template/$rtype/g;
$stub =~ s/$op_template/$op/g;
$stub =~ s/\\\*/\*/g;
@@ -233,8 +233,10 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#define EXCEPTION_OFFSET 0x54
#define ENABLE_PROFILER_REFERENCE_OFFSET 0x58
-#elif (COMPILER(GCC) || COMPILER(RVCT)) && CPU(ARM_TRADITIONAL)
+#elif (COMPILER(GCC) || COMPILER(MSVC) || COMPILER(RVCT)) && CPU(ARM_TRADITIONAL)
+// Also update the MSVC section (defined at DEFINE_STUB_FUNCTION)
+// when changing one of the following values.
#define THUNK_RETURN_ADDRESS_OFFSET 64
#define PRESERVEDR4_OFFSET 68
@@ -298,12 +300,6 @@ extern "C" {
}
}
-#elif COMPILER(MSVC) && CPU(ARM_TRADITIONAL)
-
-#define THUNK_RETURN_ADDRESS_OFFSET 64
-#define PRESERVEDR4_OFFSET 68
-// See DEFINE_STUB_FUNCTION for more information.
-
#elif CPU(MIPS)
#define PRESERVED_GP_OFFSET 60
@@ -533,12 +529,6 @@ extern "C" {
}
}
-#elif COMPILER(MSVC) && CPU(ARM_TRADITIONAL)
-
-#define THUNK_RETURN_ADDRESS_OFFSET 32
-#define PRESERVEDR4_OFFSET 36
-// See DEFINE_STUB_FUNCTION for more information.
-
#else
#error "JIT not supported on this platform."
#endif
@@ -1270,13 +1260,13 @@ MSVC_BEGIN()
MSVC_BEGIN(ctiTrampoline PROC)
MSVC_BEGIN( stmdb sp!, {r1-r3})
MSVC_BEGIN( stmdb sp!, {r4-r8, lr})
-MSVC_BEGIN( sub sp, sp, # THUNK_RETURN_ADDRESS_OFFSET + 4)
+MSVC_BEGIN( sub sp, sp, #68 ; sync with PRESERVEDR4_OFFSET)
MSVC_BEGIN( mov r4, r2)
MSVC_BEGIN( mov r5, #512)
MSVC_BEGIN( ; r0 contains the code)
MSVC_BEGIN( mov lr, pc)
MSVC_BEGIN( bx r0)
-MSVC_BEGIN( add sp, sp, # THUNK_RETURN_ADDRESS_OFFSET + 4)
+MSVC_BEGIN( add sp, sp, #68 ; sync with PRESERVEDR4_OFFSET)
MSVC_BEGIN( ldmia sp!, {r4-r8, lr})
MSVC_BEGIN( add sp, sp, #12)
MSVC_BEGIN( bx lr)
@@ -1287,7 +1277,7 @@ MSVC_BEGIN( mov r0, sp)
MSVC_BEGIN( mov lr, pc)
MSVC_BEGIN( bl cti_vm_throw)
MSVC_BEGIN(ctiOpThrowNotCaught)
-MSVC_BEGIN( add sp, sp, # THUNK_RETURN_ADDRESS_OFFSET + 4)
+MSVC_BEGIN( add sp, sp, #68 ; sync with PRESERVEDR4_OFFSET)
MSVC_BEGIN( ldmia sp!, {r4-r8, lr})
MSVC_BEGIN( add sp, sp, #12)
MSVC_BEGIN( bx lr)
@@ -1297,9 +1287,9 @@ MSVC_BEGIN()
MSVC( EXPORT cti_#op#)
MSVC( IMPORT JITStubThunked_#op#)
MSVC(cti_#op# PROC)
-MSVC( str lr, [sp, # THUNK_RETURN_ADDRESS_OFFSET])
+MSVC( str lr, [sp, #64] ; sync with THUNK_RETURN_ADDRESS_OFFSET)
MSVC( bl JITStubThunked_#op#)
-MSVC( ldr lr, [sp, # THUNK_RETURN_ADDRESS_OFFSET])
+MSVC( ldr lr, [sp, #64] ; sync with THUNK_RETURN_ADDRESS_OFFSET)
MSVC( bx lr)
MSVC(cti_#op# ENDP)
MSVC()

0 comments on commit 7d853f5

Please sign in to comment.