patch-2.3.99-pre2 linux/arch/sparc64/lib/atomic.S
Next file: linux/arch/sparc64/lib/blockops.S
Previous file: linux/arch/sparc64/lib/VIScopy.S
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Thu Mar 16 11:40:17 2000
- Orig file:
v2.3.99-pre1/linux/arch/sparc64/lib/atomic.S
- Orig date:
Tue Aug 31 17:29:13 1999
diff -u --recursive --new-file v2.3.99-pre1/linux/arch/sparc64/lib/atomic.S linux/arch/sparc64/lib/atomic.S
@@ -1,4 +1,4 @@
-/* $Id: atomic.S,v 1.2 1999/08/23 05:15:58 davem Exp $
+/* $Id: atomic.S,v 1.3 2000/03/16 16:44:37 davem Exp $
* atomic.S: These things are too big to do inline.
*
* Copyright (C) 1999 David S. Miller (davem@redhat.com)
@@ -13,24 +13,24 @@
.globl __atomic_add
atomic_impl_begin:
-__atomic_add:
- lduw [%g1], %g5
- add %g5, %g2, %g7
- cas [%g1], %g5, %g7
+__atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
+ lduw [%o1], %g5
+ add %g5, %o0, %g7
+ cas [%o1], %g5, %g7
cmp %g5, %g7
bne,pn %icc, __atomic_add
nop
- jmpl %g3 + 8, %g0
- add %g7, %g2, %g2
+ retl
+ add %g7, %o0, %o0
.globl __atomic_sub
-__atomic_sub:
- lduw [%g1], %g5
- sub %g5, %g2, %g7
- cas [%g1], %g5, %g7
+__atomic_sub: /* %o0 = increment, %o1 = atomic_ptr */
+ lduw [%o1], %g5
+ sub %g5, %o0, %g7
+ cas [%o1], %g5, %g7
cmp %g5, %g7
bne,pn %icc, __atomic_sub
nop
- jmpl %g3 + 8, %g0
- sub %g7, %g2, %g2
+ retl
+ sub %g7, %o0, %o0
atomic_impl_end:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)