Atomic and : Set t1 to the word at the address in t3, and store the bitwise AND of that value and t2 there. Clears a bit mask in shared memory
amoand.w
Operands
reg, reg, (reg)Variants
- Atomic and : Set t1 to the word at the address in t3, and store the bitwise AND of that value and t2 there. Clears a bit mask in shared memory amoand.w t1, t2, (t3)
# value is initialized and naturally aligned for this operation.
.data
value: .word 0x12345678
.text
la t0, value
# Atomic operation returns the old value 305419896 in t2, then changes value to 0.
li t1, 5
amoand.w t2, t1, (t0)