Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/common/lib/libc/arch/arm/atomic Pull up following revisio...
details: https://anonhg.NetBSD.org/src/rev/2bd734ac15b0
branches: netbsd-7
changeset: 799812:2bd734ac15b0
user: snj <snj%NetBSD.org@localhost>
date: Fri Feb 26 22:29:04 2016 +0000
description:
Pull up following revision(s) (requested by skrll in ticket #1105):
common/lib/libc/arch/arm/atomic/atomic_nand_16.S: revision 1.3
common/lib/libc/arch/arm/atomic/atomic_nand_32.S: revision 1.3
common/lib/libc/arch/arm/atomic/atomic_nand_64.S: revision 1.4
common/lib/libc/arch/arm/atomic/atomic_nand_8.S: revision 1.3
common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S: revision 1.5
Use gcc 4.4 and later operation for nand, i.e.
*ptr = ~(tmp & value) instead of *ptr = ~tmp & value
There was also another bug in sync_fetch_and_nand_8 which I've also fixed.
PR port-arm32/50513: Incorrect logic for atomic_nand_xx.S
diffstat:
common/lib/libc/arch/arm/atomic/atomic_nand_16.S | 10 +++++-----
common/lib/libc/arch/arm/atomic/atomic_nand_32.S | 10 +++++-----
common/lib/libc/arch/arm/atomic/atomic_nand_64.S | 10 +++++-----
common/lib/libc/arch/arm/atomic/atomic_nand_8.S | 10 +++++-----
common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S | 10 +++++-----
5 files changed, 25 insertions(+), 25 deletions(-)
diffs (141 lines):
diff -r 8248bedc91b9 -r 2bd734ac15b0 common/lib/libc/arch/arm/atomic/atomic_nand_16.S
--- a/common/lib/libc/arch/arm/atomic/atomic_nand_16.S Fri Feb 26 22:25:07 2016 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_nand_16.S Fri Feb 26 22:29:04 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic_nand_16.S,v 1.2 2014/03/04 16:15:28 matt Exp $ */
+/* $NetBSD: atomic_nand_16.S,v 1.2.6.1 2016/02/26 22:29:04 snj Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,8 +36,8 @@
ENTRY_NP(_atomic_nand_16)
mov ip, r0
1: ldrexh r0, [ip] /* load old value (to be returned) */
- mvns r3, r0 /* complement source */
- ands r3, r3, r1 /* calculate new value */
+ ands r3, r0, r1 /* calculate new value step 1 */
+ mvns r3, r3 /* ... complement for new value */
strexh r2, r3, [ip] /* try to store */
cmp r2, #0 /* succeed? */
bne 1b /* no, try again */
@@ -57,8 +57,8 @@
ENTRY_NP(_atomic_nand_16_nv)
mov ip, r0 /* need r0 for return value */
1: ldrexh r0, [ip] /* load old value */
- mvns r0, r0 /* complement source */
- ands r0, r0, r1 /* calculate new value (return value) */
+ ands r0, r0, r1 /* calculate new value step 1 */
+ mvns r0, r0 /* ... complement for new value */
strexh r2, r0, [ip] /* try to store */
cmp r2, #0 /* succeed? */
bne 1b /* no, try again? */
diff -r 8248bedc91b9 -r 2bd734ac15b0 common/lib/libc/arch/arm/atomic/atomic_nand_32.S
--- a/common/lib/libc/arch/arm/atomic/atomic_nand_32.S Fri Feb 26 22:25:07 2016 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_nand_32.S Fri Feb 26 22:29:04 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic_nand_32.S,v 1.2 2014/03/04 16:15:28 matt Exp $ */
+/* $NetBSD: atomic_nand_32.S,v 1.2.6.1 2016/02/26 22:29:04 snj Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,8 +36,8 @@
ENTRY_NP(_atomic_nand_32)
mov ip, r0
1: ldrex r0, [ip] /* load old value (to be returned) */
- mvns r3, r0 /* complement source */
- ands r3, r3, r1 /* calculate new value */
+ ands r3, r0, r1 /* calculate new value step 1 */
+ mvns r3, r3 /* ... complement for new value */
strex r2, r3, [ip] /* try to store */
cmp r2, #0 /* succeed? */
bne 1b /* no, try again */
@@ -59,8 +59,8 @@
ENTRY_NP(_atomic_nand_32_nv)
mov ip, r0 /* need r0 for return value */
1: ldrex r0, [ip] /* load old value */
- mvns r0, r0 /* complement source */
- ands r0, r0, r1 /* calculate new value (return value) */
+ ands r0, r0, r1 /* calculate new value step 1 */
+ mvns r0, r0 /* ... complement for new value */
strex r2, r0, [ip] /* try to store */
cmp r2, #0 /* succeed? */
bne 1b /* no, try again? */
diff -r 8248bedc91b9 -r 2bd734ac15b0 common/lib/libc/arch/arm/atomic/atomic_nand_64.S
--- a/common/lib/libc/arch/arm/atomic/atomic_nand_64.S Fri Feb 26 22:25:07 2016 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_nand_64.S Fri Feb 26 22:29:04 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic_nand_64.S,v 1.3 2014/03/04 16:15:28 matt Exp $ */
+/* $NetBSD: atomic_nand_64.S,v 1.3.6.1 2016/02/26 22:29:04 snj Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -40,10 +40,10 @@
#endif
mov ip, r0 /* need r0 for return 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 */
+ ands r0, r0, r2 /* calculate new value step 1 */
+ ands r1, r1, r3 /* calculate new value step 2 */
+ mvns r0, r0 /* ... complement for new value */
+ mvns r1, r1 /* ... complement for new value */
strexd r4, r0, r1, [ip] /* try to store */
cmp r4, #0 /* succeed? */
bne 1b /* no, try again? */
diff -r 8248bedc91b9 -r 2bd734ac15b0 common/lib/libc/arch/arm/atomic/atomic_nand_8.S
--- a/common/lib/libc/arch/arm/atomic/atomic_nand_8.S Fri Feb 26 22:25:07 2016 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_nand_8.S Fri Feb 26 22:29:04 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic_nand_8.S,v 1.2 2014/03/04 16:15:28 matt Exp $ */
+/* $NetBSD: atomic_nand_8.S,v 1.2.6.1 2016/02/26 22:29:04 snj Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,8 +36,8 @@
ENTRY_NP(_atomic_nand_8)
mov ip, r0
1: ldrexb r0, [ip] /* load old value (to be returned) */
- mvns r3, r0 /* complement source */
- ands r3, r3, r1 /* calculate new value */
+ ands r3, r0, r1 /* calculate new value step 1 */
+ mvns r3, r3 /* ... complement for new value */
strexb r2, r3, [ip] /* try to store */
cmp r2, #0 /* succeed? */
bne 1b /* no, try again */
@@ -57,8 +57,8 @@
ENTRY_NP(_atomic_nand_8_nv)
mov ip, r0 /* need r0 for return value */
1: ldrexb r0, [ip] /* load old value */
- mvns r0, r0 /* complement source */
- ands r0, r0, r1 /* calculate new value (return value) */
+ ands r0, r0, r1 /* calculate new value step 1*/
+ mvns r0, r0 /* ... complement for new value */
strexb r2, r0, [ip] /* try to store */
cmp r2, #0 /* succeed? */
bne 1b /* no, try again? */
diff -r 8248bedc91b9 -r 2bd734ac15b0 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 Fri Feb 26 22:25:07 2016 +0000
+++ b/common/lib/libc/arch/arm/atomic/sync_fetch_and_nand_8.S Fri Feb 26 22:29:04 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sync_fetch_and_nand_8.S,v 1.2 2013/11/30 21:09:11 joerg Exp $ */
+/* $NetBSD: sync_fetch_and_nand_8.S,v 1.2.6.1 2016/02/26 22:29:04 snj Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -41,10 +41,10 @@
mov r2, r1
#endif
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 */
+ ands r4, r0, r2 /* calculate new value step 1 */
+ ands r5, r1, r3 /* calculate new value step 1 */
+ mvns r4, r4 /* complement new value */
+ mvns r5, r5 /* complement new value */
strexd r6, r4, r5, [ip] /* try to store */
cmp r6, #0 /* succeed? */
bne 1b /* no, try again */
Home |
Main Index |
Thread Index |
Old Index