Use r2 instead of ip

This commit is contained in:
matt 2013-08-10 18:45:12 +00:00
parent 39ab77f3dd
commit d86c65aadb
2 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: atomic_dec_64.S,v 1.3 2013/08/10 18:40:19 matt Exp $ */
/* $NetBSD: atomic_dec_64.S,v 1.4 2013/08/10 18:45:12 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@ -43,7 +43,7 @@ ENTRY_NP(_atomic_dec_64)
#ifdef _ARM_ARCH_7
dmb
#else
mcr p15, 0, ip, c7, c10, 5 /* data memory barrier */
mcr p15, 0, r2, c7, c10, 5 /* data memory barrier */
#endif
RET
END(_atomic_dec_64)
@ -60,7 +60,7 @@ ENTRY_NP(_atomic_dec_64_nv)
#ifdef _ARM_ARCH_7
dmb
#else
mcr p15, 0, ip, c7, c10, 5 /* data memory barrier */
mcr p15, 0, r2, c7, c10, 5 /* data memory barrier */
#endif
RET /* return new value */
END(_atomic_dec_64_nv)

View File

@ -1,4 +1,4 @@
/* $NetBSD: atomic_inc_64.S,v 1.5 2013/08/10 18:32:06 matt Exp $ */
/* $NetBSD: atomic_inc_64.S,v 1.6 2013/08/10 18:45:12 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@ -37,13 +37,13 @@ ENTRY_NP(_atomic_inc_64)
1: ldrexd r0, [r3] /* load old value (return value) */
adds LO, LO, #1 /* calculate new value */
adc HI, HI, #0 /* zero means we carried */
strexd ip, r0, [r3] /* try to store */
cmp ip, #0 /* succeed? */
strexd r2, r0, [r3] /* try to store */
cmp r2, #0 /* succeed? */
bne 1b /* no, try again? */
#ifdef _ARM_ARCH_7
dmb
#else
mcr p15, 0, ip, c7, c10, 5 /* data memory barrier */
mcr p15, 0, r2, c7, c10, 5 /* data memory barrier */
#endif
RET
END(_atomic_inc_64)
@ -54,13 +54,13 @@ ENTRY_NP(_atomic_inc_64_nv)
1: ldrexd r0, [r3] /* load old value */
adds LO, LO, #1 /* calculate new value (return value) */
adc HI, HI, #0 /* fold carry into high */
strexd ip, r0, [r3] /* try to store */
cmp ip, #0 /* succeed? */
strexd r2, r0, [r3] /* try to store */
cmp r2, #0 /* succeed? */
bne 1b /* no, try again? */
#ifdef _ARM_ARCH_7
dmb
#else
mcr p15, 0, ip, c7, c10, 5 /* data memory barrier */
mcr p15, 0, r2, c7, c10, 5 /* data memory barrier */
#endif
RET /* return new value */
END(_atomic_inc_64_nv)