Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/arch/aarch64/atomic be consistent about comp...



details:   https://anonhg.NetBSD.org/src/rev/a9c67907db61
branches:  trunk
changeset: 366838:a9c67907db61
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Jun 18 08:01:56 2022 +0000

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

diffstat:

 common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 73c1a69e64df -r a9c67907db61 common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S
--- a/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S       Sat Jun 18 07:55:19 2022 +0000
+++ b/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S       Sat Jun 18 08:01:56 2022 +0000
@@ -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 @@
        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.  */



Home | Main Index | Thread Index | Old Index