diff --git a/plugins/GSdx/stdafx.h b/plugins/GSdx/stdafx.h index 082aa4440a..99d6869919 100644 --- a/plugins/GSdx/stdafx.h +++ b/plugins/GSdx/stdafx.h @@ -387,80 +387,6 @@ struct aligned_free_second {template void operator()(T& p) {_aligned_fr return Mask ? 1 : 0; } - __forceinline unsigned char _interlockedbittestandreset(volatile long* a, const long b) - { - unsigned char retval; - - __asm__("lock; btrl %k[b], %[a]; setb %b[retval]" : [retval] "=q" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory"); - - return retval; - } - - __forceinline unsigned char _interlockedbittestandset(volatile long* a, const long b) - { - unsigned char retval; - - __asm__("lock; btsl %k[b], %[a]; setc %b[retval]" : [retval] "=q" (retval), [a] "+m" (*a) : [b] "Ir" (b) : "memory"); - - return retval; - } - - __forceinline long _InterlockedCompareExchange(volatile long* const Destination, const long Exchange, const long Comperand) - { - long retval = Comperand; - - __asm__("lock; cmpxchgl %k[Exchange], %[Destination]" : [retval] "+a" (retval) : [Destination] "m" (*Destination), [Exchange] "q" (Exchange): "memory"); - - return retval; - } - - __forceinline long _InterlockedExchange(volatile long* const Target, const long Value) - { - long retval = Value; - - __asm__("xchgl %[retval], %[Target]" : [retval] "+r" (retval) : [Target] "m" (*Target) : "memory"); - - return retval; - } - - __forceinline long _InterlockedExchangeAdd(volatile long* const Addend, const long Value) - { - long retval = Value; - - __asm__("lock; xaddl %[retval], %[Addend]" : [retval] "+r" (retval) : [Addend] "m" (*Addend) : "memory"); - - return retval; - } - - __forceinline short _InterlockedExchangeAdd16(volatile short* const Addend, const short Value) - { - short retval = Value; - - __asm__("lock; xaddw %[retval], %[Addend]" : [retval] "+r" (retval) : [Addend] "m" (*Addend) : "memory"); - - return retval; - } - - __forceinline long _InterlockedDecrement(volatile long* const lpAddend) - { - return _InterlockedExchangeAdd(lpAddend, -1) - 1; - } - - __forceinline long _InterlockedIncrement(volatile long* const lpAddend) - { - return _InterlockedExchangeAdd(lpAddend, 1) + 1; - } - - __forceinline short _InterlockedDecrement16(volatile short* const lpAddend) - { - return _InterlockedExchangeAdd16(lpAddend, -1) - 1; - } - - __forceinline short _InterlockedIncrement16(volatile short* const lpAddend) - { - return _InterlockedExchangeAdd16(lpAddend, 1) + 1; - } - #ifdef __GNUC__ // gcc 4.8 define __rdtsc but unfortunately the compiler crash...