Category:Architecture/ARM/LDM

From aldeid
Jump to: navigation, search
You are here
LDM

Description

LDM (Load Multiple Registers) is a stack manipulation operation (POP) that accepts following variants:

  • LDMFD: Full Descending Stack
  • LDMFA: Full Ascending Stack
  • LDLED: Empty Descending Stack
  • LDMEA: Empty Ascending Stack
Info.png
Note
ARM Compiler will always use a Full Descending Stack (LDMFD)

Load Multiple Registers (LDM):

  • LDMIA: Increase After
  • LDMIB: Increast Before
  • LDMDA: Decrease After
  • LDMDB: Descrease Before

Syntax

Incomplete.png
INCOMPLETE SECTION OR ARTICLE
This section/article is being written and is therefore not complete.
Thank you for your comprehension.

Examples

Stack After the following instruction Values will be
R1 R2 R3 R0
       Addr  Data
       ----  ----
R0 --> 0x10  10
       0x14  20
       0x18  30
       0x1C  40
       0x20  50
       0x24  60
LDMIA R0, {R1,R2,R3}
10 20 30 0x10
LDMIA R0!, {R1,R2,R3}
10 20 30 0x1C
LDMIB R0!, {R1,R2,R3}
20 30 40 0x1C
       Addr  Data
       ----  ----
       0x10  10
       0x14  20
       0x18  30
       0x1C  40
       0x20  50
R0 --> 0x24  60
LDMDA R0!, {R1,R2,R3}
40 50 60 0x18
LDMDB R0!, {R1,R2,R3}
30 40 50 0x18

This category currently contains no pages or media.