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/arm Use explicit form of register pair ...



details:   https://anonhg.NetBSD.org/src/rev/49ffd54e8eb3
branches:  trunk
changeset: 791763:49ffd54e8eb3
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Nov 30 21:09:11 2013 +0000

description:
Use explicit form of register pair operations by specifying both.

diffstat:

 common/lib/libc/arch/arm/atomic/atomic_and_64.S                |   6 +-
 common/lib/libc/arch/arm/atomic/atomic_cas_64.S                |   8 +-
 common/lib/libc/arch/arm/atomic/atomic_dec_64.S                |   6 +-
 common/lib/libc/arch/arm/atomic/atomic_inc_64.S                |   6 +-
 common/lib/libc/arch/arm/atomic/atomic_nand_64.S               |   6 +-
 common/lib/libc/arch/arm/atomic/atomic_or_64.S                 |   6 +-
 common/lib/libc/arch/arm/atomic/atomic_swap_64.S               |   8 +-
 common/lib/libc/arch/arm/atomic/atomic_xor_64.S                |   6 +-
 common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_8.S |   8 +-
 common/lib/libc/arch/arm/atomic/sync_fetch_and_add_8.S         |   6 +-
 common/lib/libc/arch/arm/atomic/sync_fetch_and_and_8.S         |   6 +-
 common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S        |   6 +-
 common/lib/libc/arch/arm/atomic/sync_fetch_and_or_8.S          |   6 +-
 common/lib/libc/arch/arm/atomic/sync_fetch_and_sub_8.S         |   6 +-
 common/lib/libc/arch/arm/atomic/sync_fetch_and_xor_8.S         |   6 +-
 common/lib/libc/arch/arm/string/memset.S                       |  46 +++++-----
 16 files changed, 71 insertions(+), 71 deletions(-)

diffs (truncated from 442 to 300 lines):

diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/atomic_and_64.S
--- a/common/lib/libc/arch/arm/atomic/atomic_and_64.S   Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_and_64.S   Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic_and_64.S,v 1.8 2013/11/08 22:42:52 matt Exp $   */
+/*     $NetBSD: atomic_and_64.S,v 1.9 2013/11/30 21:09:11 joerg Exp $  */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,10 +39,10 @@
        mov     r2, r1
 #endif
        mov     ip, r0                  /* need r0 for return value */
-1:     ldrexd  r0, [ip]                /* load old value */
+1:     ldrexd  r0, r1, [ip]            /* load old value */
        ands    r0, r0, r2              /* calculate new value */
        ands    r1, r1, r3              /* calculate new value */
-       strexd  r4, r0, [ip]            /* try to store */
+       strexd  r4, r0, r1, [ip]        /* try to store */
        cmp     r4, #0                  /*   succeed? */
        bne     1b                      /*     no, try again? */
 #ifdef _ARM_ARCH_7
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/atomic_cas_64.S
--- a/common/lib/libc/arch/arm/atomic/atomic_cas_64.S   Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_cas_64.S   Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic_cas_64.S,v 1.4 2013/11/08 22:42:52 matt Exp $   */
+/*     $NetBSD: atomic_cas_64.S,v 1.5 2013/11/30 21:09:11 joerg Exp $  */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,7 +39,7 @@
        push    {r4, r5, r6}            /* save temporaries */
        mov     ip, r0                  /* we need r0 for return value */
 #ifdef __ARM_EABI__
-       ldrd    r4, [sp]                /* fetch new value */
+       ldrd    r4, r5, [sp]            /* fetch new value */
 #else
        ldr     r4, [sp, #0]            /* fetch new value */
        ldr     r5, [sp, #4]            /* fetch new value */
@@ -47,7 +47,7 @@
        mov     r2, r1                  /* r1 will be overwritten by ldrexd */
 #endif
 1:
-       ldrexd  r0, [ip]                /* load current value */
+       ldrexd  r0, r1, [ip]            /* load current value */
        cmp     r0, r2                  /*   compare to old? 1st half */
 #ifdef __thumb__
        bne     2f                      /*     jump to return if different */
@@ -56,7 +56,7 @@
        cmpeq   r1, r3                  /*   compare to old? 2nd half */
 #endif
        bne     2f                      /*     jump to return if different */
-       strexd  r6, r4, [ip]            /* store new value */
+       strexd  r6, r4, r5, [ip]        /* store new value */
        cmp     r6, #0                  /*   succeed? */
        bne     1b                      /*     nope, try again. */
 #ifdef _ARM_ARCH_7
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/atomic_dec_64.S
--- a/common/lib/libc/arch/arm/atomic/atomic_dec_64.S   Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_dec_64.S   Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic_dec_64.S,v 1.6 2013/08/11 04:41:17 matt Exp $   */
+/*     $NetBSD: atomic_dec_64.S,v 1.7 2013/11/30 21:09:11 joerg Exp $  */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,10 +34,10 @@
 
 ENTRY_NP(_atomic_dec_64_nv)
        mov     ip, r0                  /* need r0 for return value */
-1:     ldrexd  r0, [ip]                /* load old value */
+1:     ldrexd  r0, r1, [ip]            /* load old value */
        subs    LO, LO, #1              /* calculate new value */
        sbcs    HI, HI, #0              /* calculate new value */
-       strexd  r2, r0, [ip]            /* try to store */
+       strexd  r2, r0, r1, [ip]        /* try to store */
        cmp     r2, #0                  /*   succeed? */
        bne     1b                      /*     no, try again? */
 #ifdef _ARM_ARCH_7
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/atomic_inc_64.S
--- a/common/lib/libc/arch/arm/atomic/atomic_inc_64.S   Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_inc_64.S   Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic_inc_64.S,v 1.8 2013/08/11 04:41:17 matt Exp $   */
+/*     $NetBSD: atomic_inc_64.S,v 1.9 2013/11/30 21:09:11 joerg Exp $  */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,10 +34,10 @@
 
 ENTRY_NP(_atomic_inc_64_nv)
        mov     ip, r0                  /* need r0 for return value */
-1:     ldrexd  r0, [ip]                /* load old value */
+1:     ldrexd  r0, r1, [ip]            /* load old value */
        adds    LO, LO, #1              /* calculate new value (return value) */
        adcs    HI, HI, #0              /* fold carry into high */
-       strexd  r2, r0, [ip]            /* try to store */
+       strexd  r2, r0, r1, [ip]        /* try to store */
        cmp     r2, #0                  /*   succeed? */
        bne     1b                      /*     no, try again? */
 #ifdef _ARM_ARCH_7
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/atomic_nand_64.S
--- a/common/lib/libc/arch/arm/atomic/atomic_nand_64.S  Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_nand_64.S  Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic_nand_64.S,v 1.1 2013/11/08 22:42:52 matt Exp $  */
+/*     $NetBSD: atomic_nand_64.S,v 1.2 2013/11/30 21:09:11 joerg Exp $ */
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,12 +39,12 @@
        mov     r2, r1
 #endif
        mov     ip, r0                  /* need r0 for return value */
-1:     ldrexd  r0, [ip]                /* load old value */
+1:     ldrexd  r0, r1, [ip]            /* load old value */
        mvns    r0, r0                  /* complement old value */
        mvns    r1, r1                  /* complement old value */
        ands    r0, r0, r2              /* calculate new value */
        ands    r1, r1, r3              /* calculate new value */
-       strexd  r4, r0, [ip]            /* try to store */
+       strexd  r4, r0, r1, [ip]        /* try to store */
        cmp     r4, #0                  /*   succeed? */
        bne     1b                      /*     no, try again? */
 #ifdef _ARM_ARCH_7
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/atomic_or_64.S
--- a/common/lib/libc/arch/arm/atomic/atomic_or_64.S    Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_or_64.S    Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic_or_64.S,v 1.8 2013/11/08 22:42:52 matt Exp $    */
+/*     $NetBSD: atomic_or_64.S,v 1.9 2013/11/30 21:09:11 joerg Exp $   */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,10 +39,10 @@
        mov     r2, r1
 #endif
        mov     ip, r0                  /* need r0 for return value */
-1:     ldrexd  r0, [ip]                /* load old value */
+1:     ldrexd  r0, r1, [ip]            /* load old value */
        orrs    r0, r0, r2              /* calculate new value (return value) */
        orrs    r1, r1, r3              /* calculate new value (return value) */
-       strexd  r4, r0, [ip]            /* try to store */
+       strexd  r4, r0, r1, [ip]        /* try to store */
        cmp     r4, #0                  /*   succeed? */
        bne     1b                      /*     no, try again? */
 #ifdef _ARM_ARCH_7
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/atomic_swap_64.S
--- a/common/lib/libc/arch/arm/atomic/atomic_swap_64.S  Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_swap_64.S  Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic_swap_64.S,v 1.6 2013/11/08 22:42:52 matt Exp $  */
+/*     $NetBSD: atomic_swap_64.S,v 1.7 2013/11/30 21:09:11 joerg Exp $ */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -37,8 +37,8 @@
        mov     r3, r2                  /* r2 will be overwriten by r1 */
        mov     r2, r1                  /* and r1 will be overwritten by ldrexd */
 #endif
-1:     ldrexd  r0, [ip]                /* load old value */
-       strexd  r4, r2, [ip]            /* store new value */
+1:     ldrexd  r0, r1, [ip]            /* load old value */
+       strexd  r4, r2, r3, [ip]        /* store new value */
        cmp     r4, #0                  /*   succeed? */
        bne     1b                      /*    no, try again */
 #ifdef _ARM_ARCH_7
@@ -55,6 +55,6 @@
 ENTRY_NP(__sync_lock_release_8)
        mov     r2, #0
        mov     r3, #0
-       strd    r2, [r0]
+       strd    r2, r3, [r0]
        RET
 END(__sync_lock_release_8)
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/atomic_xor_64.S
--- a/common/lib/libc/arch/arm/atomic/atomic_xor_64.S   Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_xor_64.S   Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic_xor_64.S,v 1.1 2013/11/08 22:42:52 matt Exp $   */
+/*     $NetBSD: atomic_xor_64.S,v 1.2 2013/11/30 21:09:11 joerg Exp $  */
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,10 +39,10 @@
        mov     r2, r1
 #endif
        mov     ip, r0                  /* need r0 for return value */
-1:     ldrexd  r0, [ip]                /* load old value */
+1:     ldrexd  r0, r1, [ip]            /* load old value */
        eors    r0, r0, r2              /* calculate new value (return value) */
        eors    r1, r1, r3              /* calculate new value (return value) */
-       strexd  r4, r0, [ip]            /* try to store */
+       strexd  r4, r0, r1, [ip]        /* try to store */
        cmp     r4, #0                  /*   succeed? */
        bne     1b                      /*     no, try again? */
 #ifdef _ARM_ARCH_7
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_8.S
--- a/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_8.S    Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_8.S    Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sync_bool_compare_and_swap_8.S,v 1.1 2013/11/08 22:42:52 matt Exp $    */
+/*     $NetBSD: sync_bool_compare_and_swap_8.S,v 1.2 2013/11/30 21:09:11 joerg Exp $   */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -40,7 +40,7 @@
        mov     ip, r0                  /* we need r0 for return value */
        movs    r0, #0                  /* assume failure */
 #ifdef __ARM_EABI__
-       ldrd    r4, [sp]                /* fetch new value from stack */
+       ldrd    r4, r5, [sp]            /* fetch new value from stack */
 #else
        ldr     r4, [sp, #0]            /* fetch new value from stack */
        ldr     r5, [sp, #4]            /* fetch new value from stack */
@@ -48,7 +48,7 @@
        mov     r2, r1                  /* r1 will be overwritten by ldrexd */
 #endif
 1:
-       ldrexd  r6, [ip]                /* load current value */
+       ldrexd  r6, r7, [ip]            /* load current value */
        cmp     r6, r2                  /*   compare to old? 1st half */
 #ifdef __thumb__
        bne     2f                      /*     jump to return if different */
@@ -57,7 +57,7 @@
        cmpeq   r7, r3                  /*   compare to old? 2nd half */
 #endif
        bne     2f                      /*     jump to return if different */
-       strexd  r0, r4, [ip]            /* store new value */
+       strexd  r0, r4, r5, [ip]        /* store new value */
        cmp     r0, #0                  /*   succeed? */
        bne     1b                      /*     nope, try again. */
        movs    r0, #1                  /* indicate success */
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/sync_fetch_and_add_8.S
--- a/common/lib/libc/arch/arm/atomic/sync_fetch_and_add_8.S    Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/sync_fetch_and_add_8.S    Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sync_fetch_and_add_8.S,v 1.1 2013/11/08 22:42:52 matt Exp $    */
+/*     $NetBSD: sync_fetch_and_add_8.S,v 1.2 2013/11/30 21:09:11 joerg Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -40,10 +40,10 @@
        mov     r3, r2
        mov     r2, r1
 #endif
-1:     ldrexd  r0, [ip]                /* load old value */
+1:     ldrexd  r0, r1, [ip]            /* load old value */
        adds    TLO, LO, NLO            /* calculate new value */
        adcs    THI, HI, NHI            /* calculate new value */
-       strexd  r6, r4, [ip]            /* try to store */
+       strexd  r6, r4, r5, [ip]        /* try to store */
        cmp     r6, #0                  /*   succeed? */
        bne     1b                      /*     no, try again */
 #ifdef _ARM_ARCH_7
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/sync_fetch_and_and_8.S
--- a/common/lib/libc/arch/arm/atomic/sync_fetch_and_and_8.S    Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/sync_fetch_and_and_8.S    Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sync_fetch_and_and_8.S,v 1.1 2013/11/08 22:42:52 matt Exp $    */
+/*     $NetBSD: sync_fetch_and_and_8.S,v 1.2 2013/11/30 21:09:11 joerg Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -40,10 +40,10 @@
        mov     r3, r2
        mov     r2, r1
 #endif
-1:     ldrexd  r0, [ip]                /* load old value */
+1:     ldrexd  r0, r1, [ip]            /* load old value */
        ands    r4, r0, r2              /* calculate new value */
        ands    r5, r1, r3              /* calculate new value */
-       strexd  r6, r4, [ip]            /* try to store */
+       strexd  r6, r4, r5, [ip]        /* try to store */
        cmp     r6, #0                  /*   succeed? */
        bne     1b                      /*     no, try again */
 #ifdef _ARM_ARCH_7
diff -r fcf50ddc3171 -r 49ffd54e8eb3 common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S
--- a/common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S   Sat Nov 30 21:07:59 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S   Sat Nov 30 21:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sync_fetch_and_nand_8.S,v 1.1 2013/11/08 22:42:52 matt Exp $   */
+/*     $NetBSD: sync_fetch_and_nand_8.S,v 1.2 2013/11/30 21:09:11 joerg Exp $  */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -40,12 +40,12 @@
        mov     r3, r2
        mov     r2, r1
 #endif
-1:     ldrexd  r0, [ip]                /* load old value */
+1:     ldrexd  r0, r1, [ip]            /* load old value */
        mvns    r4, r0                  /* complement old value */
        mvns    r5, r0                  /* complement old value */
        ands    r4, r4, r2              /* calculate new value */
        ands    r5, r5, r3              /* calculate new value */
-       strexd  r6, r4, [ip]            /* try to store */
+       strexd  r6, r4, r5, [ip]        /* try to store */
        cmp     r6, #0                  /*   succeed? */



Home | Main Index | Thread Index | Old Index