File mozilla-s390-context.patch of Package MozillaFirefox.11622

# HG changeset patch
# User msirringhaus@suse.de
# Date 1558421140 -7200
#      Tue May 21 08:45:40 2019 +0200
# Node ID 75befa1218781262985bef9c39bb735d030a53c8
# Parent  d25fcb6ed9a80448bf5c3a249365f2810dad3de5
[mq]: mozilla-s390-context.patch

diff -r d25fcb6ed9a8 -r 75befa121878 js/src/wasm/WasmSignalHandlers.cpp
--- a/js/src/wasm/WasmSignalHandlers.cpp	Tue May 21 08:45:37 2019 +0200
+++ b/js/src/wasm/WasmSignalHandlers.cpp	Tue May 21 08:45:40 2019 +0200
@@ -191,6 +191,10 @@
 // powerpc next instruction pointer (NIP or PC)
 #define R32_sig(p) ((p)->uc_mcontext.gp_regs[32])
 #endif
+# if defined(__linux__) && defined(__s390x__)
+#  define GR_sig(p,x) ((p)->uc_mcontext.gregs[x])
+#  define PSWa_sig(p) ((p)->uc_mcontext.psw.addr)
+# 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])
@@ -454,6 +458,10 @@
 #define PC_sig(p) R32_sig(p)
 #define SP_sig(p) R01_sig(p)
 #define FP_sig(p) R01_sig(p)
+#elif defined(__s390x__)
+# define PC_sig(p) PSWa_sig(p)
+# define SP_sig(p) GR_sig(p, 15)
+# define FP_sig(p) GR_sig(p, 11)
 #endif
 
 #if defined(PC_sig) && defined(FP_sig) && defined(SP_sig)
openSUSE Build Service is sponsored by