1 /* bitops.S: Low level assembler bit operations.
3 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
6 #include <asm/ptrace.h>
15 /* Take bits in %g2 and set them in word at %g1,
16 * return whether bits were set in original value
17 * in %g2. %g4 holds value to restore into %o7
18 * in delay slot of jmpl return, %g3 + %g5 + %g7 can be
19 * used as temporaries and thus is considered clobbered
30 set bitops_spinlock, %g5
31 2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
32 orcc %g7, 0x0, %g0 ! Did we get it?
40 set bitops_spinlock, %g5
50 /* Same as above, but clears the bits from %g2 instead. */
59 set bitops_spinlock, %g5
60 2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
61 orcc %g7, 0x0, %g0 ! Did we get it?
69 set bitops_spinlock, %g5
79 /* Same thing again, but this time toggles the bits from %g2. */
88 set bitops_spinlock, %g5
89 2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
90 orcc %g7, 0x0, %g0 ! Did we get it?
98 set bitops_spinlock, %g5