8.1. Using the inline assemblers

The inline assemblers enable you to use most ARM assembly language instructions within a C or C++ program. You can use the inline assembler to:

The inline assembler supports very flexible interworking with C and C++. Any register operand may be an arbitrary C or C++ expression. The inline assembler also expands complex instructions and optimizes the assembly language code.

Note

Inline assembly language is subject to optimization by the compiler if optimization is enabled either by default, or with the -O1 or -O2 compiler options.

The armcc and armcpp inline assemblers implement the full ARM instruction set, including generic coprocessor instructions, halfword instructions and long multiply. The tcc and tcpp inline assemblers implement the full Thumb instruction set.

The inline assembler is a high-level assembler. Some low-level features that are available to armasm, such as branching by writing to pc, are not supported.

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