summaryrefslogtreecommitdiff
path: root/atomic
diff options
context:
space:
mode:
authorBrian Pane <brianp@apache.org>2002-09-01 09:34:42 +0000
committerBrian Pane <brianp@apache.org>2002-09-01 09:34:42 +0000
commit12039df2be5037d64bf8b587c694e07914fcc044 (patch)
treef1cc8d7e45abcf00415e60d94d45fcfc965724b7 /atomic
parent364f18c023202d9ad95788eb0435569a0c225f0b (diff)
downloadapr-12039df2be5037d64bf8b587c694e07914fcc044.tar.gz
Fixed the SPARC v8plus version of apr_atomic_dec so that
it returns the new value instead of the old value (to match the way the other implementations of this function work) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63844 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'atomic')
-rw-r--r--atomic/solaris_sparc/apr_atomic_sparc.s6
1 files changed, 4 insertions, 2 deletions
diff --git a/atomic/solaris_sparc/apr_atomic_sparc.s b/atomic/solaris_sparc/apr_atomic_sparc.s
index 3057b3238..9d87fe03d 100644
--- a/atomic/solaris_sparc/apr_atomic_sparc.s
+++ b/atomic/solaris_sparc/apr_atomic_sparc.s
@@ -65,6 +65,7 @@
! %o1 [input] - the increment delta value
! %o2 [local] - work register (was %l0 in book)
! %o3 [local] - work register (was %l1 in book)
+! %o4 [local] - work register
! %o0 [output] - contains return value
!
!
@@ -90,12 +91,13 @@ _apr_atomic_add_sparc_loop:
ld [%o0], %o2
_apr_atomic_sub_sparc_loop:
sub %o2, %o1, %o3
+ mov %o3, %o4
cas [%o0], %o2, %o3
cmp %o2, %o3
bne,a _apr_atomic_sub_sparc_loop
- ld [%o0], %o2
+ nop
retl
- mov %o3, %o0
+ mov %o4, %o0
SET_SIZE(apr_atomic_sub_sparc)
!