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>
10 /* On SMP we need to use memory barriers to ensure
11 * correct memory operation ordering, nop these out
15 #define BITOP_PRE_BARRIER membar #StoreLoad | #LoadLoad
16 #define BITOP_POST_BARRIER membar #StoreLoad | #StoreStore
18 #define BITOP_PRE_BARRIER nop
19 #define BITOP_POST_BARRIER nop
24 .globl test_and_set_bit
25 .type test_and_set_bit,#function
26 test_and_set_bit: /* %o0=nr, %o1=addr */
44 .size test_and_set_bit, .-test_and_set_bit
46 .globl test_and_clear_bit
47 .type test_and_clear_bit,#function
48 test_and_clear_bit: /* %o0=nr, %o1=addr */
66 .size test_and_clear_bit, .-test_and_clear_bit
68 .globl test_and_change_bit
69 .type test_and_change_bit,#function
70 test_and_change_bit: /* %o0=nr, %o1=addr */
88 .size test_and_change_bit, .-test_and_change_bit
91 .type set_bit,#function
92 set_bit: /* %o0=nr, %o1=addr */
107 .size set_bit, .-set_bit
110 .type clear_bit,#function
111 clear_bit: /* %o0=nr, %o1=addr */
126 .size clear_bit, .-clear_bit
129 .type change_bit,#function
130 change_bit: /* %o0=nr, %o1=addr */
145 .size change_bit, .-change_bit