User guide

1.2 General programing issues
The ARM family of processors are RISC processors. Many of the programing strategies that give efficient code are
generic to RISC processors. For example, under the ARM-Thumb Procedure Call Standard (ATPCS) the ARM
compilers pass the first four integer-sized function parameters in registers r0 to r3. Additional parameters are passed
on the stack. This means that:
it is more efficient to pass large parameters, such as structs, by reference
it is more efficient to restrict functions to four or fewer integer-sized parameters, where possible.
In addition, as with many RISC processors, the ARM is designed to access aligned data. Accesses to unaligned data
can be expensive in code size or performance. In some cases they do not work as expected. See the ARM
Frequently Asked Questions list at http://www.arm.com for more information.
If you are porting legacy code from a CISC architecture it is recommended that you become familiar with general
RISC programing strategies.
Introduction
Copyright ?1999 2001 ARM Limited 1-2