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