Block move instructions
In this section, we will learn how multiple registers can be moved. The fundamental concepts are as follows:
- How to specify a group of registers
- How to address memory
- How to sequence the storage of registers
- The different types of block moves
A great feature of some CISC processors was that you could push a group of registers on the stack in a single instruction. RISC processors generally don’t have such an instruction because it conflicts with the one-operation-per-cycle design constraint that’s at the heart of the RISC philosophy. Surprisingly, the ARM implements a block move instruction that lets you copy a group of registers to or from memory in one operation (i.e., an instruction). The following ARM code demonstrates how to load registers r1
,r2
,r3
,r5
from memory:
adr r0,DataToGo @ Load r0 with the address of the data area
ldr ...