Hi ports --

So in my attempt to have once again a fully working Webkit for Loongson, I have run into a snag. I have two patches at the bottom of this email that, when applied, will allow webkit-1.6.3 to build and run on loongson.

So far with these patches:
*The SunSpider benchmark runs and completes.
*On webkit-gtk3-1.6.3, the Google search as you type feature works.
*Some JavaScript works.

However, a lot of JavaScript does not work and crashes webkit and the browser. I've discovered that the quickest way to get a crash is to go to gmail.com and attempt to log in.

Here are two gdb backtraces from logging into gmail.com (both with the gtk2 version of webkit), the first compiled normally as per the Makefile, the second compiled with -O0:
http://devio.us/~bcallah/gdb-surf.txt
http://devio.us/~bcallah/gdb-webkit.txt

I was hoping that someone could look through this and see what I've missed, and hopefully get webkit fully working once again. If there's something else you'd like me to include, please let me know.

Everything is being compiled on a Yeeloong, running -current with a GENERIC kernel.

The "ideal" solution to this issue would be to enable the JIT on Loongson, but our assembler is missing the .reloc pseudo-op, which is necessary to compile the JIT for MIPS.

Thanks.

~Brian

Patch 1:
--- patch-Source_JavaScriptCore_wtf_dtoa_utils_h.orig Thu Oct 13 02:52:49 2011
+++ patch-Source_JavaScriptCore_wtf_dtoa_utils_h        Mon Feb 27 19:57:22 2012
@@ -1,12 +1,12 @@
$OpenBSD: patch-Source_JavaScriptCore_wtf_dtoa_utils_h,v 1.1 2011/10/13 06:52:49 jasper Exp $
---- Source/JavaScriptCore/wtf/dtoa/utils.h.orig        Mon Oct 10 10:19:48 2011
-+++ Source/JavaScriptCore/wtf/dtoa/utils.h     Mon Oct 10 10:21:27 2011
+--- Source/JavaScriptCore/wtf/dtoa/utils.h.orig        Sat Sep 17 03:09:25 2011
++++ Source/JavaScriptCore/wtf/dtoa/utils.h     Mon Feb 27 19:55:35 2012
 @@ -49,7 +49,7 @@
  defined(__ARMEL__) || \
  defined(_MIPS_ARCH_MIPS32R2)
  #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
 -#elif CPU(MIPS) || CPU(PPC) || CPU(PPC64) || OS(WINCE) || CPU(SH4)
-+#elif CPU(MIPS) || CPU(PPC) || CPU(PPC64) || OS(WINCE) || CPU(SH4) || CPU(SPARC64) ++#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || OS(WINCE) || CPU(SH4) || CPU(SPARC64)
  #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
  #elif defined(_M_IX86) || defined(__i386__)
  #if defined(_WIN32)

Patch 2:
--- patch-Source_JavaScriptCore_wtf_Platform_h.orig     Thu Oct 13 02:52:49 2011
+++ patch-Source_JavaScriptCore_wtf_Platform_h  Mon Feb 27 19:57:25 2012
@@ -2,8 +2,8 @@

 Allow webkit to build and run on mips64

---- Source/JavaScriptCore/wtf/Platform.h.orig  Mon Sep 26 22:54:57 2011
-+++ Source/JavaScriptCore/wtf/Platform.h       Fri Oct  7 10:03:03 2011
+--- Source/JavaScriptCore/wtf/Platform.h.orig  Sat Oct 15 01:26:50 2011
++++ Source/JavaScriptCore/wtf/Platform.h       Mon Feb 27 19:55:04 2012
 @@ -76,9 +76,14 @@

  /* CPU(MIPS) - MIPS 32-bit */
@@ -21,6 +21,15 @@
  #if defined(__MIPSEB__)
  #define WTF_CPU_BIG_ENDIAN 1
  #endif
+@@ -295,7 +300,7 @@
+
+ #endif /* ARM */
+
+-#if CPU(ARM) || CPU(MIPS) || CPU(SH4)
++#if CPU(ARM) || CPU(MIPS) || CPU(MIPS64) || CPU(SH4)
+ #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
+ #endif
+
 @@ -913,7 +918,8 @@
      || CPU(ALPHA) \
      || CPU(SPARC64) \

Reply via email to