llgo/ssa: AtomicCmpXchg fix

This commit is contained in:
xushiwei
2024-06-16 17:03:41 +08:00
parent 7d2f68c5e4
commit 4a3446a0a5
5 changed files with 31 additions and 26 deletions

View File

@@ -68,4 +68,4 @@ func Store[T integer](ptr *T, v T) {}
func Exchange[T integer](ptr *T, v T) T { return v }
// llgo:link CompareAndExchange llgo.atomicCmpXchg
func CompareAndExchange[T integer](ptr *T, old, new T) T { return old }
func CompareAndExchange[T integer](ptr *T, old, new T) (T, bool) { return old, false }