mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user