From adc315d4ccdd8ccddd1df28062f007b9ba2c7746 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 22 Aug 2008 10:54:47 +0000 Subject: [PATCH] Fix _interlockedbittest intrinsics. For some strange reason they were working correctly on x86, the compiler seemed to know "what it means". But that doesn't work on amd64, here we need *a as "=m" operand, not a. svn path=/branches/ros-amd64-bringup/; revision=35525 --- reactos/include/psdk/intrin_x86.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/include/psdk/intrin_x86.h b/reactos/include/psdk/intrin_x86.h index 01d4d08dcce..1ee99d6fbb5 100644 --- a/reactos/include/psdk/intrin_x86.h +++ b/reactos/include/psdk/intrin_x86.h @@ -493,7 +493,7 @@ static __inline__ __attribute__((always_inline)) long long _InterlockedIncrement static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset(volatile long * a, const long b) { unsigned char retval; - __asm__("lock; btrl %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + __asm__("lock; btrl %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory"); return retval; } @@ -501,7 +501,7 @@ static __inline__ __attribute__((always_inline)) unsigned char _interlockedbitte static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset64(volatile long long * a, const long long b) { unsigned char retval; - __asm__("lock; btrq %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + __asm__("lock; btrq %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory"); return retval; } #endif @@ -509,7 +509,7 @@ static __inline__ __attribute__((always_inline)) unsigned char _interlockedbitte static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset(volatile long * a, const long b) { unsigned char retval; - __asm__("lock; btsl %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + __asm__("lock; btsl %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory"); return retval; } @@ -517,7 +517,7 @@ static __inline__ __attribute__((always_inline)) unsigned char _interlockedbitte static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset64(volatile long long * a, const long long b) { unsigned char retval; - __asm__("lock; btsq %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory"); + __asm__("lock; btsq %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (*a) : [b] "Ir" (b) : "memory"); return retval; } #endif