diff options
| author | skrll <skrll@NetBSD.org> | 2022-06-18 08:01:56 +0000 |
|---|---|---|
| committer | skrll <skrll@NetBSD.org> | 2022-06-18 08:01:56 +0000 |
| commit | 74e7b28cbf561023d86a6276bfae53fe0f9355c9 (patch) | |
| tree | 7324158b98bf806db5ef0842a608213b2ba0f52a /common | |
| parent | 5b5467e7b46696bc78e2818dc34bcd4f3fee50d0 (diff) | |
be consistent about comparing loaded value against expected old value
register ordering
Diffstat (limited to 'common')
| -rw-r--r-- | common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S b/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S index d9868f9be60..4e12b94808d 100644 --- a/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S +++ b/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S @@ -1,4 +1,4 @@ -/* $NetBSD: __aarch64_lse.S,v 1.4 2022/06/18 07:55:19 skrll Exp $ */ +/* $NetBSD: __aarch64_lse.S,v 1.5 2022/06/18 08:01:56 skrll Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -177,9 +177,9 @@ ENTRY_NP(CASP_FUNC) mov x5, x0 /* need x0 for return value */ mov x6, x1 /* need x1 for return value */ 1: LDXP x0, x1, [x4] /* load old value */ - cmp x5, x0 /* compare */ + cmp x0, x5 /* compare */ b.ne 2f /* not equal? return */ - cmp x6, x1 + cmp x1, x6 b.ne 2f /* not equal? return */ STXP w7, x2, x3, [x4] /* store new value */ cbnz w7, 3f /* succeed? nope, try again. */ |
