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

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

diff -r af85321aa913 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 17:38:17 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