1 /* SPDX-License-Identifier: GPL-2.0 */
5 # setjmp/longjmp for the x86-64 architecture
9 # The jmp_buf is assumed to contain the following, in order:
23 .type kernel_setjmp, @function
25 pop %rsi # Return address, and adjust the stack
26 xorl %eax,%eax # Return value
28 movq %rsp,8(%rdi) # Post-return %rsp!
29 push %rsi # Make the call/return stack happy
35 movq %rsi,56(%rdi) # Return address
38 .size kernel_setjmp,.-kernel_setjmp
43 .type kernel_longjmp, @function
45 movl %esi,%eax # Return value (int)
55 .size kernel_longjmp,.-kernel_longjmp