Inline assembler BL and SVC corrupted
register list
The BL and SVC instructions of the
inline assembler 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}
corrupt_reg_list specifies
the physical registers that are corrupted by the called function.
If the condition flags are modified by the called function, you
must specify the PSR in the corrupted register
list.
The BL and SVC instructions always
corrupt lr.
If corrupt_reg_list is
omitted then for BL and SVC, the registers r0-r3, lr and
the PSR are corrupted.
Only the branch instruction, B, can be used to
jump to labels within a single C or C++ function.
By default, if you do not specify any corrupt_reg_list registers, r0 to r3, r14,
and the PSR can be corrupted.
Note
It is not possible to specify the lr, sp,
or pc registers in the corrupt register list.
See also