Commit b317bf2d authored by Pierre d'Herbemont's avatar Pierre d'Herbemont Committed by Alexandre Julliard

Make the PowerPC interlocked assembler code volatile.

parent 43858e4d
...@@ -1998,7 +1998,7 @@ extern inline LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LON ...@@ -1998,7 +1998,7 @@ extern inline LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LON
{ {
LONG ret = 0; LONG ret = 0;
LONG scratch; LONG scratch;
__asm__ ( __asm__ __volatile__(
"0: lwarx %0,0,%2\n" "0: lwarx %0,0,%2\n"
" xor. %1,%4,%0\n" " xor. %1,%4,%0\n"
" bne 1f\n" " bne 1f\n"
...@@ -2016,7 +2016,7 @@ extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val ); ...@@ -2016,7 +2016,7 @@ extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val );
extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val ) extern inline LONG WINAPI InterlockedExchange( PLONG dest, LONG val )
{ {
LONG ret = 0; LONG ret = 0;
__asm__( __asm__ __volatile__(
"0: lwarx %0,0,%1\n" "0: lwarx %0,0,%1\n"
" stwcx. %2,0,%1\n" " stwcx. %2,0,%1\n"
" bne- 0b\n" " bne- 0b\n"
...@@ -2032,7 +2032,7 @@ extern inline LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr ) ...@@ -2032,7 +2032,7 @@ extern inline LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr )
{ {
LONG ret = 0; LONG ret = 0;
LONG zero = 0; LONG zero = 0;
__asm__( __asm__ __volatile__(
"0: lwarx %0, %3, %1\n" "0: lwarx %0, %3, %1\n"
" add %0, %2, %0\n" " add %0, %2, %0\n"
" stwcx. %0, %3, %1\n" " stwcx. %0, %3, %1\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment