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)
7 #include <linux/config.h>
12 /* On SMP we need to use memory barriers to ensure
13 * correct memory operation ordering, nop these out
18 #define BITOP_PRE_BARRIER membar #StoreLoad | #LoadLoad
19 #define BITOP_POST_BARRIER \
21 membar #StoreLoad | #StoreStore
26 #define BITOP_PRE_BARRIER
27 #define BITOP_POST_BARRIER
30 .globl test_and_set_bit
31 .type test_and_set_bit,#function
32 test_and_set_bit: /* %o0=nr, %o1=addr */
51 .size test_and_set_bit, .-test_and_set_bit
53 .globl test_and_clear_bit
54 .type test_and_clear_bit,#function
55 test_and_clear_bit: /* %o0=nr, %o1=addr */
74 .size test_and_clear_bit, .-test_and_clear_bit
76 .globl test_and_change_bit
77 .type test_and_change_bit,#function
78 test_and_change_bit: /* %o0=nr, %o1=addr */
97 .size test_and_change_bit, .-test_and_change_bit
100 .type set_bit,#function
101 set_bit: /* %o0=nr, %o1=addr */
116 .size set_bit, .-set_bit
119 .type clear_bit,#function
120 clear_bit: /* %o0=nr, %o1=addr */
135 .size clear_bit, .-clear_bit
138 .type change_bit,#function
139 change_bit: /* %o0=nr, %o1=addr */
154 .size change_bit, .-change_bit