mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-01 21:52:41 +02:00
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__))
|
#if defined(__GNUC__) && defined (__GNUC_MINOR__) && ((4 < __GNUC__) || (4 == __GNUC__ && 1 <= __GNUC_MINOR__))
|
||||||
return __sync_lock_test_and_set(Dest, Val);
|
return __sync_lock_test_and_set(Dest, Val);
|
||||||
#else
|
#else
|
||||||
// TODO:
|
register int result;
|
||||||
#error Implement support older GCC Versions
|
__asm__ __volatile__("lock; xchg %0,%1"
|
||||||
|
: "=r" (result), "=m" (*Dest)
|
||||||
|
: "0" (Val), "m" (*Dest)
|
||||||
|
: "memory");
|
||||||
|
return result;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user