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