Lecture6 ARM
Lecture6 ARM
Lecture6 ARM
The register
bank, which stores
the processor state.
21
Multiple register data transfer instuctions
ldmia – Example
ldmia r9, {r0-r3, r12}
• Load words addressed by r9 into r0, r1, r2, r3, and r12
• Increment r9 after each load.
Example 3
ldmia r9, {r5, r3, r0-r2, r14}
• load words addressed by r9 into registers r5, r3, r0, r1,
r2, and r14.
• Increment r9 after each load.
• ldmib, ldmda, ldmdb work similar to ldmia
• Stores work in an analogous manner to load instructions
22
Store Multiples
Load and Store Multiples
IA IB DA DB
LDMxx r10, {r0,r1,r4} r4
STMxx r10, {r0,r1,r4}
r4 r1
r1 r0 Increasing
Base Register (Rb) r10 r0 r4 Address
r1 r4
r0 r1
r0
The mapping between the stack and block copy views
of the load and store multiple instructions
N inst CPI
Tprog
f clk
where,
N inst - Number of ARM instructions executed in the course of the program
CPI - Average number of clock cycles per instructions
f clk - Processor' s clock frequency
a=b+c
a=b+c