Та самая вставка:
#elif __aarch64__
__asm__ volatile(
/* Save current context */
"\tsub x1, sp, #8 * 20\n"
"\tstp x19, x20, [x1, #16 * 0]\n"
"\tstp x21, x22, [x1, #16 * 1]\n"
"\tstp x23, x24, [x1, #16 * 2]\n"
"\tstp x25, x26, [x1, #16 * 3]\n"
"\tstp x27, x28, [x1, #16 * 4]\n"
"\tstp x29, x30, [x1, #16 * 5]\n"
"\tstp d8, d9, [x1, #16 * 6]\n"
"\tstp d10, d11, [x1, #16 * 7]\n"
"\tstp d12, d13, [x1, #16 * 8]\n"
"\tstp d14, d15, [x1, #16 * 9]\n"
/* Restore target context */
"\tldr x2, [%1]\n"
"\tldp x19, x20, [x2, #16 * 0]\n"
"\tldp x21, x22, [x2, #16 * 1]\n"
"\tldp x23, x24, [x2, #16 * 2]\n"
"\tldp x25, x26, [x2, #16 * 3]\n"
"\tldp x27, x28, [x2, #16 * 4]\n"
"\tldp x29, x30, [x2, #16 * 5]\n"
"\tldp d8, d9, [x2, #16 * 6]\n"
"\tldp d10, d11, [x2, #16 * 7]\n"
"\tldp d12, d13, [x2, #16 * 8]\n"
"\tldp d14, d15, [x2, #16 * 9]\n"
"\tmov sp, x2\n"
/* Setup fisrst arg */
"\tmov x0, %0\n"
"\tbl %2\n"
/* Restore context (old sp in x0) */
"\tldp x19, x20, [x0, #16 * 0]\n"
"\tldp x21, x22, [x0, #16 * 1]\n"
"\tldp x23, x24, [x0, #16 * 2]\n"
"\tldp x25, x26, [x0, #16 * 3]\n"
"\tldp x27, x28, [x0, #16 * 4]\n"
"\tldp x29, x30, [x0, #16 * 5]\n"
"\tldp d8, d9, [x0, #16 * 6]\n"
"\tldp d10, d11, [x0, #16 * 7]\n"
"\tldp d12, d13, [x0, #16 * 8]\n"
"\tldp d14, d15, [x0, #16 * 9]\n"
"\tadd sp, x0, #8 * 20\n"
:
: "r" (unw_context), "r" (coro_ctx), "i" (unw_getcontext_f)
: /*"lr", "r0", "r1", "ip" */
"x0", "x1", "x2", "x30"
);
#endif
Аргумент unw_getcontext_f
"i" : An immediate integer operand (one with constant value) is allowed. This includes symbolic constants whose values will be known only at assembly time.
https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html#Simple-ConstraintsВот тут немного иной комментарий.
> ‘i’
>
> An immediate integer operand (one with constant value) is allowed. This includes symbolic constants whose values will be known only at assembly time or later.
>