lbic: aarch64 longjmp should pass second argument as return value

This commit is contained in:
K. Lange 2023-04-23 22:37:12 +09:00
parent a9bd6e4cdc
commit 40fc40f693

View File

@ -5,26 +5,26 @@ asm (
".globl setjmp\n"
"setjmp:\n"
"mov x2, sp\n"
"stp x2, x29, [x0]\n"
"stp x30, x1, [x0, (1 * 16)]\n"
"str x2, [x0]\n"
"stp x19, x20, [x0, (2 * 16)]\n"
"stp x21, x22, [x0, (3 * 16)]\n"
"stp x23, x24, [x0, (4 * 16)]\n"
"stp x25, x26, [x0, (5 * 16)]\n"
"stp x27, x28, [x0, (6 * 16)]\n"
"stp x29, x30, [x0, (1 * 16)]\n"
"mov x0, 0\n"
"ret\n"
".globl longjmp\n"
"longjmp:\n"
"ldp x2, x29, [x0]\n"
"ldp x30, x1, [x0, (1 * 16)]\n"
"ldr x2, [x0]\n"
"ldp x19, x20, [x0, (2 * 16)]\n"
"ldp x21, x22, [x0, (3 * 16)]\n"
"ldp x23, x24, [x0, (4 * 16)]\n"
"ldp x25, x26, [x0, (5 * 16)]\n"
"ldp x27, x28, [x0, (6 * 16)]\n"
"ldp x29, x30, [x0, (1 * 16)]\n"
"mov sp, x2\n"
"mov x0, 1\n"
"mov x0, x1\n"
"ret\n"
);