try to fix libatomic_ops inline asm

This commit is contained in:
Matthew Flatt 2010-08-04 13:16:51 -06:00
parent e3320067a9
commit be95805548

View File

@ -113,7 +113,7 @@ AO_test_and_set_full(volatile AO_TS_t *addr)
/* Note: the "xchg" instruction does not need a "lock" prefix */
__asm__ __volatile__("xchgb %0, %1"
: "=q"(oldval), "=m"(*addr)
: "0"(0xff), "m"(*addr) : "memory");
: "0"((AO_TS_t)0xff), "m"(*addr) : "memory"); /* PLTSCHEME: AO_TS_t cast */
return (AO_TS_VAL_t)oldval;
}