1 #include <asm/unwind.h>
3 #if __LINUX_ARM_ARCH__ >= 6
4 .macro bitop, name, instr
8 strneb r1, [ip] @ assert word-aligned
10 and r3, r0, #31 @ Get bit offset
12 add r1, r1, r0, lsl #2 @ Get word offset
24 .macro testop, name, instr, store
28 strneb r1, [ip] @ assert word-aligned
30 and r3, r0, #31 @ Get bit offset
32 add r1, r1, r0, lsl #2 @ Get word offset
33 mov r3, r2, lsl r3 @ create mask
36 ands r0, r2, r3 @ save old value of bit
37 \instr r2, r2, r3 @ toggle bit
49 .macro bitop, name, instr
53 strneb r1, [ip] @ assert word-aligned
58 save_and_disable_irqs ip
59 ldr r2, [r1, r0, lsl #2]
61 str r2, [r1, r0, lsl #2]
69 * testop - implement a test_and_xxx_bit operation.
70 * @instr: operational instruction
71 * @store: store instruction
73 * Note: we can trivially conditionalise the store instruction
74 * to avoid dirtying the data cache.
76 .macro testop, name, instr, store
80 strneb r1, [ip] @ assert word-aligned
83 save_and_disable_irqs ip
84 ldr r2, [r1, r0, lsl #2]!
87 \instr r2, r2, r0, lsl r3