$OpenBSD: patch-Source_JavaScriptCore_wtf_Platform_h,v 1.4 2012/04/03 15:39:35 landry Exp $

Allow webkit to build and run on mips64

--- Source/JavaScriptCore/wtf/Platform.h.orig	Tue Mar  6 16:44:16 2012
+++ Source/JavaScriptCore/wtf/Platform.h	Sat Mar 31 09:21:30 2012
@@ -76,9 +76,14 @@
 
 /* CPU(MIPS) - MIPS 32-bit */
 /* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now.  */
-#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \
-    && defined(_ABIO32)
+#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_) || defined(__mips64__))
+#if defined(_ABIO32)
 #define WTF_CPU_MIPS 1
+#endif
+#if defined(__mips64__)
+#define	WTF_CPU_MIPS64	1
+#define	USE_SYSTEM_MALLOC 1
+#endif
 #if defined(__MIPSEB__)
 #define WTF_CPU_BIG_ENDIAN 1
 #endif
@@ -295,7 +300,7 @@
 
 #endif /* ARM */
 
-#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC)
+#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC) || CPU(MIPS64) || CPU(SPARC64)
 #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
 #endif
 
@@ -898,7 +903,8 @@
     || CPU(ALPHA) \
     || CPU(SPARC64) \
     || CPU(S390X) \
-    || CPU(PPC64)
+    || CPU(PPC64) \
+    || CPU(MIPS64)
 #define WTF_USE_JSVALUE64 1
 #else
 #define WTF_USE_JSVALUE32_64 1
