8 load and store multiple register instructions, Load and store multiple register instructions -39 – ARM VERSION 1.2 User Manual

Page 51

Advertising
background image

Writing ARM and Thumb Assembly Language

ARM DUI 0068B

Copyright © 2000, 2001 ARM Limited. All rights reserved.

2-39

2.8

Load and store multiple register instructions

The ARM and Thumb instruction sets include instructions that load and store multiple
registers to and from memory.

Multiple register transfer instructions provide an efficient way of moving the contents
of several registers to and from memory. They are most often used for block copy and
for stack operations at subroutine entry and exit. The advantages of using a multiple
register transfer instruction instead of a series of single data transfer instructions
include:

Smaller code size.

A single instruction fetch overhead, rather than many instruction fetches.

On uncached ARM processors, the first word of data transferred by a load or store
multiple is always a nonsequential memory cycle, but all subsequent words
transferred can be sequential memory cycles. Sequential memory cycles are faster
in most systems.

Note

The lowest numbered register is transferred to or from the lowest memory address
accessed, and the highest numbered register to or from the highest address accessed.
The order of the registers in the register list in the instructions makes no difference.

Use the

-checkreglist

assembler command line option to check that registers in register

lists are specified in increasing order. Refer to Command syntax on page 3-2 for further
information.

Advertising