The following restrictions apply to embedded assembly language functions:
__asmfunctions can only contain assembly code, with the exception of the following embedded assembler builtins:
expr) __offsetof_base(D, B) __mcall_is_virtual(D, f) __mcall_is_in_vbase(D, f) __mcall_offsetof_base(D, f) __mcall_this_offset(D, f) __vcall_offsetof_vfunc(D, f)
No return instructions are generated by the compiler for an
__asmfunction. If you want to return from an
__asmfunction, you must include the return instructions, in assembly code, in the body of the function.
This makes it possible to fall through to the next function, because the embedded assembler guarantees to emit the
__asmfunctions in the order you define them. However, inlined and template functions behave differently. Do not assume that code execution falls out of an inline or template function into another embedded assembly function.
__asmfunctions do not change the ARM Architecture Procedure Call Standard (AAPCS) rules that apply. This means that all calls between an
__asmfunction and a normal C or C++ function must adhere to the AAPCS, even though there are no restrictions on the assembly code that an
__asmfunction can use (for example, change state).