Module Name:    src
Committed By:   skrll
Date:           Sat Jun 18 08:01:56 UTC 2022

Modified Files:
        src/common/lib/libc/arch/aarch64/atomic: __aarch64_lse.S

Log Message:
be consistent about comparing loaded value against expected old value
register ordering


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
    src/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S
diff -u src/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S:1.4 src/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S:1.5
--- src/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S:1.4	Sat Jun 18 07:55:19 2022
+++ src/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S	Sat Jun 18 08:01:56 2022
@@ -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.	*/

Reply via email to