1 #if __LINUX_ARM_ARCH__ >= 6
4 strneb r1
, [ip
] @
assert word
-aligned
6 and r3
, r0
, #31 @ Get bit offset
8 add r1
, r1
, r0
, lsl
#2 @ Get word offset
18 .macro testop
, instr
, store
20 strneb r1
, [ip
] @
assert word
-aligned
22 and r3
, r0
, #31 @ Get bit offset
24 add r1
, r1
, r0
, lsl
#2 @ Get word offset
25 mov r3
, r2
, lsl r3 @ create mask
28 ands r0
, r2
, r3 @ save old value of bit
29 \instr r2
, r2
, r3 @ toggle bit
41 strneb r1
, [ip
] @
assert word
-aligned
46 save_and_disable_irqs ip
47 ldr r2
, [r1
, r0
, lsl
#2]
49 str r2
, [r1
, r0
, lsl
#2]
55 * testop - implement a test_and_xxx_bit operation.
56 * @instr: operational instruction
57 * @store: store instruction
59 * Note: we can trivially conditionalise the store instruction
60 * to avoid dirtying the data cache.
62 .macro testop
, instr
, store
64 strneb r1
, [ip
] @
assert word
-aligned
67 save_and_disable_irqs ip
68 ldr r2
, [r1
, r0
, lsl
#2]!
71 \instr r2
, r2
, r0
, lsl r3