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 Fix some register usage



details:   https://anonhg.NetBSD.org/src/rev/73c1a69e64df
branches:  trunk
changeset: 366837:73c1a69e64df
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Jun 18 07:55:19 2022 +0000

description:
Fix some register usage

diffstat:

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

diffs (21 lines):

diff -r bf8f2687b9e8 -r 73c1a69e64df common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S
--- a/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S       Sat Jun 18 02:19:07 2022 +0000
+++ b/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S       Sat Jun 18 07:55:19 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __aarch64_lse.S,v 1.3 2022/06/16 08:21:57 skrll Exp $ */
+/* $NetBSD: __aarch64_lse.S,v 1.4 2022/06/18 07:55:19 skrll Exp $ */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -174,8 +174,9 @@
        ret
 99:
 #endif
-       mov     x4, x0                  /* need x0 for return value     */
-1:     LDXP    x5, x6, [x4]            /* load old value               */
+       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                      */
        b.ne    2f                      /*   not equal? return          */
        cmp     x6, x1



Home | Main Index | Thread Index | Old Index