View | Details | Raw Unified | Return to bug 197058 | Differences between
and this patch

Collapse All | Expand All

(-)lang/spidermonkey24/files/patch-bug919968 (+65 lines)
Line 0 Link Here
1
--- jit/AsmJSSignalHandlers.cpp~
2
+++ jit/AsmJSSignalHandlers.cpp
3
@@ -64,7 +64,6 @@ using JS::GenericNaN;
4
 #  define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_PC])
5
 # endif
6
 # define RIP_sig(p) ((p)->uc_mcontext.gregs[REG_RIP])
7
-# define PC_sig(p) ((p)->uc_mcontext.arm_pc)
8
 # define RAX_sig(p) ((p)->uc_mcontext.gregs[REG_RAX])
9
 # define RCX_sig(p) ((p)->uc_mcontext.gregs[REG_RCX])
10
 # define RDX_sig(p) ((p)->uc_mcontext.gregs[REG_RDX])
11
@@ -80,7 +79,11 @@ using JS::GenericNaN;
12
 # define R12_sig(p) ((p)->uc_mcontext.gregs[REG_R12])
13
 # define R13_sig(p) ((p)->uc_mcontext.gregs[REG_R13])
14
 # define R14_sig(p) ((p)->uc_mcontext.gregs[REG_R14])
15
-# define R15_sig(p) ((p)->uc_mcontext.gregs[REG_R15])
16
+# if defined(__linux__) && defined(__arm__)
17
+#  define R15_sig(p) ((p)->uc_mcontext.arm_pc)
18
+# else
19
+#  define R15_sig(p) ((p)->uc_mcontext.gregs[REG_R15])
20
+# endif
21
 #elif defined(__NetBSD__)
22
 # define XMM_sig(p,i) (((struct fxsave64 *)(p)->uc_mcontext.__fpregs)->fx_xmm[i])
23
 # define EIP_sig(p) ((p)->uc_mcontext.__gregs[_REG_EIP])
24
@@ -124,7 +127,11 @@ using JS::GenericNaN;
25
 # define R12_sig(p) ((p)->uc_mcontext.mc_r12)
26
 # define R13_sig(p) ((p)->uc_mcontext.mc_r13)
27
 # define R14_sig(p) ((p)->uc_mcontext.mc_r14)
28
-# define R15_sig(p) ((p)->uc_mcontext.mc_r15)
29
+# if defined(__FreeBSD__) && defined(__arm__)
30
+#  define R15_sig(p) ((p)->uc_mcontext.__gregs[_REG_R15])
31
+# else
32
+#  define R15_sig(p) ((p)->uc_mcontext.mc_r15)
33
+# endif
34
 #elif defined(XP_MACOSX)
35
 // Mach requires special treatment.
36
 #else
37
@@ -325,20 +332,20 @@ enum { REG_EIP = 14 };
38
 #  define CONTEXT ucontext_t
39
 # endif
40
 
41
+# if defined(JS_CPU_X64)
42
+#  define PC_sig(p) RIP_sig(p)
43
+# elif defined(JS_CPU_X86)
44
+#  define PC_sig(p) EIP_sig(p)
45
+# elif defined(JS_CPU_ARM)
46
+#  define PC_sig(p) R15_sig(p)
47
+# endif
48
+
49
 # if !defined(XP_MACOSX)
50
 static uint8_t **
51
 ContextToPC(CONTEXT *context)
52
 {
53
-#  if defined(JS_CPU_X64)
54
-    JS_STATIC_ASSERT(sizeof(RIP_sig(context)) == sizeof(void*));
55
-    return reinterpret_cast<uint8_t**>(&RIP_sig(context));
56
-#  elif defined(JS_CPU_X86)
57
-    JS_STATIC_ASSERT(sizeof(EIP_sig(context)) == sizeof(void*));
58
-    return reinterpret_cast<uint8_t**>(&EIP_sig(context));
59
-#  elif defined(JS_CPU_ARM)
60
     JS_STATIC_ASSERT(sizeof(PC_sig(context)) == sizeof(void*));
61
     return reinterpret_cast<uint8_t**>(&PC_sig(context));
62
-#  endif
63
 }
64
 
65
 #  if defined(JS_CPU_X64)
(-)lang/spidermonkey24/files/patch-bug1125579 (+14 lines)
Line 0 Link Here
1
--- assembler/jit/ExecutableAllocator.h~
2
+++ assembler/jit/ExecutableAllocator.h
3
@@ -454,6 +454,11 @@ public:
4
     {
5
         User::IMB_Range(code, static_cast<char*>(code) + size);
6
     }
7
+#elif WTF_CPU_ARM_TRADITIONAL && (WTF_OS_FREEBSD || WTF_OS_NETBSD)
8
+    static void cacheFlush(void* code, size_t size)
9
+    {
10
+	__clear_cache(code, reinterpret_cast<char*>(code) + size);
11
+    }
12
 #elif WTF_CPU_ARM_TRADITIONAL && WTF_OS_LINUX && WTF_COMPILER_RVCT
13
     static __asm void cacheFlush(void* code, size_t size);
14
 #elif WTF_CPU_ARM_TRADITIONAL && (WTF_OS_LINUX || WTF_OS_ANDROID) && WTF_COMPILER_GCC
(-)lang/spidermonkey24/files/patch-bug1125580 (+11 lines)
Line 0 Link Here
1
--- jit/arm/Architecture-arm.cpp~
2
+++ jit/arm/Architecture-arm.cpp
3
@@ -15,7 +15,7 @@
4
 
5
 // lame check for kernel version
6
 // see bug 586550
7
-#if !(defined(ANDROID) || defined(MOZ_B2G))
8
+#if defined(__linux__) && !defined(ANDROID) && !defined(MOZ_B2G)
9
 #include <asm/hwcap.h>
10
 #else
11
 #define HWCAP_VFP      (1<<0)

Return to bug 197058