1 /* bitops.S: Sparc64 atomic bit operations.
3 * Copyright (C) 2000, 2007 David S. Miller (davem@davemloft.net)
6 #include <linux/linkage.h>
8 #include <asm/backoff.h>
12 ENTRY(test_and_set_bit) /* %o0=nr, %o1=addr */
24 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
30 2: BACKOFF_SPIN(%o3, %o4, 1b)
31 ENDPROC(test_and_set_bit)
33 ENTRY(test_and_clear_bit) /* %o0=nr, %o1=addr */
45 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
51 2: BACKOFF_SPIN(%o3, %o4, 1b)
52 ENDPROC(test_and_clear_bit)
54 ENTRY(test_and_change_bit) /* %o0=nr, %o1=addr */
66 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
72 2: BACKOFF_SPIN(%o3, %o4, 1b)
73 ENDPROC(test_and_change_bit)
75 ENTRY(set_bit) /* %o0=nr, %o1=addr */
87 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
91 2: BACKOFF_SPIN(%o3, %o4, 1b)
94 ENTRY(clear_bit) /* %o0=nr, %o1=addr */
106 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
110 2: BACKOFF_SPIN(%o3, %o4, 1b)
113 ENTRY(change_bit) /* %o0=nr, %o1=addr */
125 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
129 2: BACKOFF_SPIN(%o3, %o4, 1b)