| |||
| Home > Using the Inline and Embedded Assemblers of the ARM Compiler > Inline assembler function calls and branches in C and C++ code | |||
The BL and SVC instructions of the
inline assembler enable you to specify three optional lists following
the normal instruction fields. These instructions have the following
format:
SVC{cond} svc_num, {input_param_list}, {output_value_list}, {corrupt_reg_list}
BL{cond} function, {input_param_list}, {output_value_list}, {corrupt_reg_list}
The SVC instruction used to be named SWI.
The inline assembler still accepts SWI in place of SVC.
If you are compiling for architecture 5TE or later, the linker
converts BL instructions to function BLX instructions
if appropriate. However, you cannot use function BLX instructions directly
within inline assembly code.function
The lists are described in the following topics:
The BX, BLX,
and BXJ instructions are not supported in the inline
assembler.
It is not possible to specify the lr, sp,
or pc registers in any of the input, output,
or corrupted register lists.
The sp register must not be changed
by any SVC instruction or function call.