SWP and SWPB
Swap data between registers and memory.
is an optional condition code.
is an optional suffix. If B is present, a byte is swapped. Otherwise, a 32-bit word is swapped.
is the destination register. Rt must not be PC.
is the source register. Rt2 can be the same register as Rt. Rt2 must not be PC.
contains the address in memory. Rn must be a different register from both Rt and Rt2. Rn must not be PC.
You can use
Data from memory is loaded into Rt.
The contents of Rt2 are saved to memory.
If Rt2 is the same register as Rt, the contents of the register are swapped with the contents of the memory location.
The use of
deprecated in ARMv6 and above. You can use
to implement more sophisticated semaphores in ARMv6 and above.
These ARM instructions are available in all versions of the ARM architecture.
There are no Thumb