add support for GCC 4.0
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1407 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
5c805163bf
commit
14ff55d13b
|
@ -390,8 +390,12 @@ LONG SyncInterlockedExchange(LONG *Dest, LONG Val)
|
|||
#if defined(__GNUC__) && defined (__GNUC_MINOR__) && ((4 < __GNUC__) || (4 == __GNUC__ && 1 <= __GNUC_MINOR__))
|
||||
return __sync_lock_test_and_set(Dest, Val);
|
||||
#else
|
||||
// TODO:
|
||||
#error Implement support older GCC Versions
|
||||
register int result;
|
||||
__asm__ __volatile__("lock; xchg %0,%1"
|
||||
: "=r" (result), "=m" (*Dest)
|
||||
: "0" (Val), "m" (*Dest)
|
||||
: "memory");
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue