1 /* $Id: bitops.S,v 1.3 2001/11/18 00:12:56 davem Exp $
2 * bitops.S: Sparc64 atomic bit operations.
4 * Copyright (C) 2000 David S. Miller (davem@redhat.com)
11 /* On SMP we need to use memory barriers to ensure
12 * correct memory operation ordering, nop these out
17 #define BITOP_PRE_BARRIER membar #StoreLoad | #LoadLoad
18 #define BITOP_POST_BARRIER \
20 membar #StoreLoad | #StoreStore
25 #define BITOP_PRE_BARRIER
26 #define BITOP_POST_BARRIER
29 .globl test_and_set_bit
30 .type test_and_set_bit,#function
31 test_and_set_bit: /* %o0=nr, %o1=addr */
50 .size test_and_set_bit, .-test_and_set_bit
52 .globl test_and_clear_bit
53 .type test_and_clear_bit,#function
54 test_and_clear_bit: /* %o0=nr, %o1=addr */
73 .size test_and_clear_bit, .-test_and_clear_bit
75 .globl test_and_change_bit
76 .type test_and_change_bit,#function
77 test_and_change_bit: /* %o0=nr, %o1=addr */
96 .size test_and_change_bit, .-test_and_change_bit
99 .type set_bit,#function
100 set_bit: /* %o0=nr, %o1=addr */
115 .size set_bit, .-set_bit
118 .type clear_bit,#function
119 clear_bit: /* %o0=nr, %o1=addr */
134 .size clear_bit, .-clear_bit
137 .type change_bit,#function
138 change_bit: /* %o0=nr, %o1=addr */
153 .size change_bit, .-change_bit