1 / 16

ARM Load/Store Instructions

ARM Load/Store Instructions. The ARM is a Load/Store Architecture: Only load and store instructions can access memory Does not support memory to memory data processing operations. Must move data values into registers before using them. ARM Load/Store Instructions.

brendy
Télécharger la présentation

ARM Load/Store Instructions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ARM Load/Store Instructions • The ARM is a Load/Store Architecture: • Only load and store instructions can access memory • Does not support memory to memory data processing operations. • Must move data values into registers before using them.

  2. ARM Load/Store Instructions • ARM has three sets of instructions which interact with main memory. These are: • Single register data transfer (LDR/STR) • Block data transfer (LDM/STM) • Single Data Swap (SWP)

  3. ARM Load/Store Instructions • The basic load and store instructions are: LDR STR Word LDRB STRB Byte LDRH STRH Halfword LDRSB Signed byte load LDRSH Signed halfwordload

  4. ARM Load/Store Instructions • Memory system must support all access sizes • Syntax: • LDR{<cond>}{<size>} Rd, <address> • STR{<cond>}{<size>} Rd, <address> e.g. LDR R0, [R1] STR R0, [R1] LDREQB R0, [R1]

  5. Data Transfer: Memory to Register (load) • To transfer a word of data, we need to specify two things: • Register: r0-r15 • Memory address: more difficult • Think of memory as a single one-dimensional array, so we can address it simply by supplying a pointer to a memory address. • There are times when we will want to offset from this pointer.

  6. ARM Addressing Modes There are basically two types of addressing modes available in ARM • Pre-indexex addressing: the address generated is used immediately • Post-indexex addressing: the address generated later replaces the base register

  7. r0 r1 DestinationRegisterfor ldr 0x5 0x200 0x200 ARM Addressing Modes . . . . .

  8. r1 188 r2 27 200 DestinationRegisterfor ldr ARM Addressing Modes . . .

  9. ARM Addressing Modes

  10. ARM Addressing Modes

  11. ARM Addressing Modes

  12. ARM Addressing Modes

  13. ARM Addressing Modes

  14. ARM Addressing Modes

  15. ARM Addressing Modes

  16. ARM Addressing Modes

More Related