Unformatted text preview: ure v5T support the CLZ instruction (see Section 5.23 on page 147). 5.10 Single word and unsigned byte data transfer instructions
These instructions are the most flexible way to transfer single bytes or words of data between ARM's registers and memory. Transferring large blocks of data is usually better done using the multiple register transfer instructions, and recent ARM processors also support instructions for transferring half-words and signed bytes. Provided that a register has been initialized to point somewhere near (usually within 4 Kbytes of) the required memory address, these instructions provide an efficient load and store mechanism with a relatively rich set of addressing modes which includes immediate and register offsets, auto-indexing and PC-relative. Description These instructions construct an address starting from a base register (Rn), then adding (U = 1) or subtracting (U = 0) an unsigned immediate or (possibly scaled) register offset. The base or computed address is used to load (L = 1) or store (L = 0) an unsigned byte (B = 1) or word (B = 0) quantity to or from a register (Rd), from or to memory. When a byte is loaded into a register it is zero extended to 32 bits. When a byte is stored into memory, the bottom eight bits of the register are stored into the addressed location. A pre-indexed (P = 1) addressing mode uses the computed address for the load or store operation, and then, when write-back is requested (W =1), updates the base register to the computed value. 126 The ARM Instruction Set Binary encoding Figure 5.9 Single word and unsigned byte data transfer instruction binary encoding. A post-indexed (P = 0) addressing mode uses the unmodified base register for the transfer and then updates the base register to the computed address irrespective of the W bit (since the offset has no significance other than as a base register modifier, and can always be set to immediate zero if no change is desired). Since the W bit is unused in this case, it has an alternative function which is only relevant i...
View Full Document
This document was uploaded on 10/30/2011 for the course CSE 378 380 at SUNY Buffalo.
- Spring '09