summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/spidermonkey/files/spidermonkey-1.8.7-x32.patch')
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.7-x32.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.7-x32.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.7-x32.patch
new file mode 100644
index 00000000000..f14a269ee3f
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.7-x32.patch
@@ -0,0 +1,25 @@
+--- a/js/src/jslock.cpp 2012-04-06 16:24:51.000000000 -0500
++++ b/js/src/jslock.cpp 2012-06-21 20:57:00.877937542 -0500
+@@ -150,17 +150,22 @@
+
+ static JS_ALWAYS_INLINE int
+ NativeCompareAndSwap(volatile jsword *w, jsword ov, jsword nv)
+ {
+ unsigned int res;
+
+ __asm__ __volatile__ (
+ "lock\n"
++/* GCC's x32 abi support */
++#if defined(__LP64__)
+ "cmpxchgq %2, (%1)\n"
++#else
++ "cmpxchg %2, (%1)\n"
++#endif
+ "sete %%al\n"
+ "movzbl %%al, %%eax\n"
+ : "=a" (res)
+ : "r" (w), "r" (nv), "a" (ov)
+ : "cc", "memory");
+ return (int)res;
+ }
+