summaryrefslogtreecommitdiff
path: root/rhbz-1498561.patch
blob: 0c6cf4010820115ba3b33a7a40fe951dc8fc6140 (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
diff -up firefox-60.0/js/src/wasm/WasmSignalHandlers.cpp.rhbz-1498561 firefox-60.0/js/src/wasm/WasmSignalHandlers.cpp
--- firefox-60.0/js/src/wasm/WasmSignalHandlers.cpp.rhbz-1498561	2018-05-16 13:45:46.014042224 +0200
+++ firefox-60.0/js/src/wasm/WasmSignalHandlers.cpp	2018-05-16 13:50:48.834887034 +0200
@@ -181,6 +181,12 @@ struct AutoSignalHandler
 #  define FP_sig(p) ((p)->uc_mcontext.mc_fp)
 #  define SP_sig(p) ((p)->uc_mcontext.mc_i7)
 # endif
+# if defined(__linux__) && (defined(__ppc64__) ||  defined (__PPC64__) || defined(__ppc64le__) || defined (__PPC64LE__))
+// powerpc stack frame pointer (SFP or SP or FP)
+#  define R01_sig(p) ((p)->uc_mcontext.gp_regs[01])
+// powerpc next instruction pointer (NIP or PC)
+#  define R32_sig(p) ((p)->uc_mcontext.gp_regs[32])
+# endif
 #elif defined(__NetBSD__)
 # define XMM_sig(p,i) (((struct fxsave64*)(p)->uc_mcontext.__fpregs)->fx_xmm[i])
 # define EIP_sig(p) ((p)->uc_mcontext.__gregs[_REG_EIP])
@@ -426,6 +432,10 @@ struct macos_arm_context {
 # define FP_sig(p) RFP_sig(p)
 # define SP_sig(p) RSP_sig(p)
 # define LR_sig(p) R31_sig(p)
+#elif defined(__ppc64__) ||  defined (__PPC64__) || defined(__ppc64le__) || defined (__PPC64LE__)
+# define PC_sig(p) R32_sig(p)
+# define SP_sig(p) R01_sig(p)
+# define FP_sig(p) R01_sig(p)
 #endif
 
 #if defined(PC_sig) && defined(FP_sig) && defined(SP_sig)
bgstack15