
Instruction Cycle Times
ARM DDI 0165B
Copyright 2000 ARM Limited. All rights reserved.
8-27
8.14
Load multiple registers
A load multiple (LDM) takes several cycles to execute, depending on the number of
registers transferred and whether the PC is in the list of registers transferred.
1.
During the first cycle, the ARM9E-S calculates the address of the first word to be
transferred, while performing an instruction prefetch.
2.
During the second and subsequent cycles, ARM9E-S reads the data requested in
the previous cycle and calculates the address of the next word to be transferred.
The new value for the base register is calculated.
When a Data Abort occurs, the instruction continues to completion. The ARM9E-S
prevents all register writing after the abort. The ARM9E-S restores the modified base
pointer (which the load activity before the abort occurred might have overwritten).
When the PC is in the list of registers to be loaded, the ARM9E-S invalidates the current
contents of the instruction pipeline. The PC is always the last register to be loaded, so
an abort at any point prevents the PC from being overwritten.
Note
LDM
with destination = PC cannot be executed in Thumb state. However,
POP{Rlist, PC}
equates to an LDM with destination = PC.
8.14.1
Interlocks
An LDM instruction can cause an interlock if a following instruction is dependent on the
last data value transferred. This is similar to the interlock cases present with a single
word register load. There is an exception to this case for a single-word LDM where, due
to the presence of an idle cycle at the end of a single-word LDM, no interlock condition
exists.
For example, the following sequence incurs a single-cycle interlock:
LDMIA r0, {r1-r2}
ADD
r3, r2, r4
The following sequence incurs a single-cycle interlock:
LDMIA r0, {r1-r2}
STR
r2, [r3]
The following sequence does not incur an interlock:
LDMIA r0, {r1}
STR
r1, [r2]