1 /* bitops.S: Sparc64 atomic bit operations.
3 * Copyright (C) 2000, 2007 David S. Miller (davem@davemloft.net)
7 #include <asm/backoff.h>
11 .globl test_and_set_bit
12 .type test_and_set_bit,#function
13 test_and_set_bit: /* %o0=nr, %o1=addr */
25 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
31 2: BACKOFF_SPIN(%o3, %o4, 1b)
32 .size test_and_set_bit, .-test_and_set_bit
34 .globl test_and_clear_bit
35 .type test_and_clear_bit,#function
36 test_and_clear_bit: /* %o0=nr, %o1=addr */
48 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
54 2: BACKOFF_SPIN(%o3, %o4, 1b)
55 .size test_and_clear_bit, .-test_and_clear_bit
57 .globl test_and_change_bit
58 .type test_and_change_bit,#function
59 test_and_change_bit: /* %o0=nr, %o1=addr */
71 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
77 2: BACKOFF_SPIN(%o3, %o4, 1b)
78 .size test_and_change_bit, .-test_and_change_bit
81 .type set_bit,#function
82 set_bit: /* %o0=nr, %o1=addr */
94 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
98 2: BACKOFF_SPIN(%o3, %o4, 1b)
99 .size set_bit, .-set_bit
102 .type clear_bit,#function
103 clear_bit: /* %o0=nr, %o1=addr */
115 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
119 2: BACKOFF_SPIN(%o3, %o4, 1b)
120 .size clear_bit, .-clear_bit
123 .type change_bit,#function
124 change_bit: /* %o0=nr, %o1=addr */
136 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
140 2: BACKOFF_SPIN(%o3, %o4, 1b)
141 .size change_bit, .-change_bit