Index: support.S =================================================================== --- support.S (revision 224216) +++ support.S (working copy) @@ -404,6 +404,11 @@ fs_nofault_begin: * int32_t casuword32(volatile int32_t *p, int32_t e, int32_t s) */ ENTRY(casuword32) + /* + * XXX include a memory barrier in case this is used with release + * semantics. + */ + membar #LoadStore | #StoreStore casa [%o0] ASI_AIUP, %o1, %o2 retl mov %o2, %o0 @@ -413,6 +418,11 @@ END(casuword32) * int64_t casuword64(volatile int64_t *p, int64_t e, int64_t s) */ ENTRY(casuword64) + /* + * XXX include a memory barrier in case this is used with release + * semantics. + */ + membar #LoadStore | #StoreStore casxa [%o0] ASI_AIUP, %o1, %o2 retl mov %o2, %o0