Description: Fix build on hppa
Author: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Forwarded: https://bugzilla.mozilla.org/show_bug.cgi?id=1325495
Last-Update: 2017-01-01

Index: firefox-50.1.0/js/src/jit/AtomicOperations.h
===================================================================
--- firefox-50.1.0.orig/js/src/jit/AtomicOperations.h
+++ firefox-50.1.0/js/src/jit/AtomicOperations.h
@@ -324,6 +324,8 @@ AtomicOperations::isLockfree(int32_t siz
 # include "jit/arm/AtomicOperations-arm.h"
 #elif defined(JS_CODEGEN_ARM64)
 # include "jit/arm64/AtomicOperations-arm64.h"
+#elif defined(__hppa__)
+# include "jit/none/AtomicOperations-ppc.h"
 #elif defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
 # include "jit/mips-shared/AtomicOperations-mips-shared.h"
 #elif defined(__ppc__) || defined(__PPC__)
Index: firefox-50.1.0/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
===================================================================
--- firefox-50.1.0.orig/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
+++ firefox-50.1.0/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
@@ -126,11 +126,20 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 
 extern "C" nsresult SharedStub(int);
 
+#ifdef __GNUC__
 #define STUB_ENTRY(n)       \
 nsresult nsXPTCStubBase::Stub##n()  \
 {                           \
+    __asm__ __volatile__ ("STW %r26, -36-64(%sp)"); \
     return SharedStub(n);   \
 }
+#else
+#define STUB_ENTRY(n)       \
+nsresult nsXPTCStubBase::Stub##n()  \
+{                           \
+    return SharedStub(n);   \
+}
+#endif
 
 #define SENTINEL_ENTRY(n) \
 nsresult nsXPTCStubBase::Sentinel##n() \
