summaryrefslogtreecommitdiff
path: root/www/webkit24-gtk/patches/patch-Source_WTF_wtf_Platform.h
blob: d1ae57c2881dd623d96a4cba6aa286357ac5e53e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
$NetBSD: patch-Source_WTF_wtf_Platform.h,v 1.2 2016/12/03 16:30:05 martin Exp $

Add support for sparc and sparc64, disable ASSEMBLER and YARR_JIT for now

--- Source/WTF/wtf/Platform.h.orig	2016-04-10 08:48:36.000000000 +0200
+++ Source/WTF/wtf/Platform.h	2016-12-02 18:12:33.703875988 +0100
@@ -153,6 +153,18 @@
 #define WTF_CPU_BIG_ENDIAN 1
 #endif
 
+/* CPU(SPARC) - SPARC 32-bit */
+#if defined(__sparc__) && !defined(_LP64)
+#define WTF_CPU_SPARC 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
+/* CPU(SPARC64) - SPARC 64-bit */
+#if defined(__sparc__) && defined(_LP64)
+#define WTF_CPU_SPARC64 1
+#define WTF_CPU_BIG_ENDIAN 1
+#endif
+
 /* CPU(X86) - i386 / x86 32-bit */
 #if   defined(__i386__) \
     || defined(i386)     \
@@ -656,6 +668,7 @@
     || CPU(ALPHA) \
     || CPU(ARM64) \
     || CPU(S390X) \
+    || CPU(SPARC64) \
     || CPU(MIPS64) \
     || CPU(PPC64) \
     || CPU(PPC64LE)
@@ -824,7 +837,7 @@
 #define ENABLE_REGEXP_TRACING 0
 
 /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
-#if !defined(ENABLE_YARR_JIT) && (ENABLE(JIT) || ENABLE(LLINT_C_LOOP))
+#if !defined(ENABLE_YARR_JIT) && (ENABLE(JIT) || ENABLE(LLINT_C_LOOP)) && !CPU(SPARC64) && !CPU(SPARC)
 #define ENABLE_YARR_JIT 1
 
 /* Setting this flag compares JIT results with interpreter results. */
@@ -837,10 +850,12 @@
 #if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
 #error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
 #else
+#if !CPU(SPARC) && !CPU(SPARC64)
 #undef ENABLE_ASSEMBLER
 #define ENABLE_ASSEMBLER 1
 #endif
 #endif
+#endif
 
 /* If the Disassembler is enabled, then the Assembler must be enabled as well: */
 #if ENABLE(DISASSEMBLER)