| /* SPDX-License-Identifier: GPL-2.0 */ |
| # setjmp/longjmp for the i386 architecture |
| # The jmp_buf is assumed to contain the following, in order: |
| .type kernel_setjmp, @function |
| popl %ecx # Return address, and adjust the stack |
| xorl %eax,%eax # Return value |
| movl %esp,4(%edx) # Post-return %esp! |
| pushl %ecx # Make the call/return stack happy |
| movl %ecx,20(%edx) # Return address |
| .size kernel_setjmp,.-kernel_setjmp |
| .type kernel_longjmp, @function |
| movl 4(%esp),%edx # jmp_ptr address |
| movl 8(%esp),%eax # Return value |
| .size kernel_longjmp,.-kernel_longjmp |