$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.3 2014/11/13 08:33:06 ajacoutot Exp $

https://bugs.webkit.org/show_bug.cgi?id=129839
https://bugs.webkit.org/show_bug.cgi?id=129963

--- Source/WTF/wtf/Platform.h.orig	Tue Nov 11 14:07:54 2014
+++ Source/WTF/wtf/Platform.h	Wed Nov 12 18:43:31 2014
@@ -150,6 +150,12 @@
 #define WTF_CPU_BIG_ENDIAN 1
 #endif
 
+/* CPU(SPARC64) - SPARC V9 */
+#if defined(__sparc64__)
+#define WTF_CPU_SPARC64 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
 /* CPU(X86) - i386 / x86 32-bit */
 #if   defined(__i386__) \
     || defined(i386)     \
@@ -333,7 +339,7 @@
 
 #endif /* ARM */
 
-#if CPU(ARM) || CPU(MIPS) || CPU(SH4)
+#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC64)
 #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
 #endif
 
@@ -645,7 +651,8 @@
     || CPU(ARM64) \
     || CPU(S390X) \
     || CPU(PPC64) \
-    || CPU(PPC64LE)
+    || CPU(PPC64LE) \
+    || CPU(SPARC64)
 #define WTF_USE_JSVALUE64 1
 #else
 #define WTF_USE_JSVALUE32_64 1
@@ -713,7 +720,7 @@
 
 #if !defined(ENABLE_DFG_JIT) && ENABLE(JIT)
 /* Enable the DFG JIT on X86 and X86_64. */
-#if (CPU(X86) || CPU(X86_64)) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(WINDOWS) || OS(HURD))
+#if (CPU(X86) || CPU(X86_64)) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(OPENBSD) || OS(WINDOWS) || OS(HURD))
 #define ENABLE_DFG_JIT 1
 #endif
 /* Enable the DFG JIT on ARMv7.  Only tested on iOS and Qt/GTK+ Linux. */
@@ -816,7 +823,7 @@
 #define ENABLE_REGEXP_TRACING 0
 
 /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
-#if !defined(ENABLE_YARR_JIT)
+#if !defined(ENABLE_YARR_JIT) && ENABLE(JIT)
 #define ENABLE_YARR_JIT 1
 
 /* Setting this flag compares JIT results with interpreter results. */
