]> git.pld-linux.org Git - packages/fox.git/blame - x32.patch
Release 2 (by relup.sh)
[packages/fox.git] / x32.patch
CommitLineData
9e091b22
JB
1--- fox-1.7.84/lib/FXAtomic.cpp.orig 2023-06-14 06:50:33.000000000 +0200
2+++ fox-1.7.84/lib/FXAtomic.cpp 2023-10-26 06:19:01.695280795 +0200
3@@ -721,7 +721,7 @@ FXptr atomicSet(volatile FXptr* ptr,FXpt
910698a6
JB
4 return result;
5 #elif (defined(WIN32) && (_MSC_VER >= 1500))
6 return (FXptr)_InterlockedExchange((LONG*)ptr,(LONG)v);
7-#elif (defined(HAVE_INLINE_ASSEMBLY) && defined(__i386__))
9e091b22 8+#elif (defined(HAVE_INLINE_ASSEMBLY) && (defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__))))
71c8b69b
JR
9 FXptr ret=v;
10 __asm__ __volatile__("xchgl %0, (%1)\n\t" : "=r"(ret) : "r"(ptr), "0"(ret) : "memory", "cc");
11 return ret;
9e091b22
JB
12@@ -746,7 +746,7 @@ FXptr atomicAdd(volatile FXptr* ptr,FXiv
13 return (FXptr)_InterlockedExchangeAdd64((volatile LONGLONG*)ptr,(LONGLONG)v);
910698a6 14 #elif (defined(WIN32) && (_MSC_VER >= 1600))
9e091b22 15 return (FXptr)_InterlockedExchangeAdd((volatile LONG*)ptr,(LONG)v);
910698a6 16-#elif (defined(HAVE_INLINE_ASSEMBLY) && defined(__i386__))
9e091b22
JB
17+#elif (defined(HAVE_INLINE_ASSEMBLY) && (defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__))))
18 FXptr ret=(void*)v;
71c8b69b
JR
19 __asm__ __volatile__ ("lock\n\t"
20 "xaddl %0, (%1)\n\t" : "=r"(ret) : "r"(ptr), "0"(ret) : "memory", "cc");
9e091b22
JB
21@@ -772,7 +772,7 @@ FXptr atomicCas(volatile FXptr* ptr,FXpt
22 return (FXptr)_InterlockedCompareExchange64((volatile LONGLONG*)ptr,(LONGLONG)v,(LONGLONG)expect);
910698a6 23 #elif defined(WIN32) && (MSC_VER >=1500)
9e091b22 24 return (FXptr)_InterlockedCompareExchange((volatile LONG*)ptr,(LONG)v,(LONG)expect);
910698a6 25-#elif (defined(HAVE_INLINE_ASSEMBLY) && defined(__i386__))
9e091b22
JB
26+#elif (defined(HAVE_INLINE_ASSEMBLY) && (defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__))))
27 FXptr ret;
71c8b69b
JR
28 __asm__ __volatile__("lock\n\t"
29 "cmpxchgl %2, (%1)\n\t" : "=a"(ret) : "r"(ptr), "r"(v), "a"(expect) : "memory", "cc");
9e091b22
JB
30@@ -800,7 +800,7 @@ FXbool atomicBoolCas(volatile FXptr* ptr
31 return (_InterlockedCompareExchange64((volatile LONGLONG*)ptr,(LONGLONG)v,(LONGLONG)expect)==(LONGLONG)expect);
910698a6 32 #elif defined(WIN32) && (MSC_VER >=1500)
9e091b22 33 return (_InterlockedCompareExchange((volatile LONG*)ptr,(LONG)v,(LONG)expect)==(LONG)expect);
910698a6 34-#elif (defined(HAVE_INLINE_ASSEMBLY) && defined(__i386__))
9e091b22
JB
35+#elif (defined(HAVE_INLINE_ASSEMBLY) && (defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__))))
36 FXbool ret;
71c8b69b
JR
37 __asm__ __volatile__ ("lock\n\t"
38 "cmpxchgl %2, (%1)\n\t"
This page took 0.102173 seconds and 5 git commands to generate.