6.1. About the procedure call standards

Sometimes you will find it necessary to combine C or C++, and assembly language in the same program. For example, you may wish to hand code performance-critical routines in assembly language so that they run at optimum speed.

The ARM Software Development Toolkit enables you to generate object files from C, C++, and assembly language source, and then link them with one or more libraries to produce an executable file, as shown in Figure 6.1.

Figure 6.1. Mixing C or C++ and assembly language

Mixing C or C++ and assembly language

Irrespective of the language in which they are written, routines that make calls to other modules must observe a common convention of argument and result passing. For the ARM and Thumb instruction sets, these are:

This chapter introduces these standards, and discusses their role in ARM assembly language for passing and returning values and pointers to structures for use by C and C++ routines.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D
Non-Confidential