1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Written by H. Peter Anvin <hpa@zytor.com>
4 * Brought in from Linux v4.4 and modified for U-Boot
5 * From Linux arch/um/sys-i386/setjmp.S
11 * The jmp_buf is assumed to contain the following, in order:
23 .type setjmp, @function
30 popl %ecx /* Return address, and adjust the stack */
31 xorl %eax, %eax /* Return value */
33 movl %esp, 4(%edx) /* Post-return %esp! */
34 pushl %ecx /* Make the call/return stack happy */
38 movl %ecx, 20(%edx) /* Return address */
41 /* Provide function size if needed */
42 .size setjmp, .-setjmp
46 .type longjmp, @function
51 movl 4(%esp), %edx /* jmp_ptr address */
60 .size longjmp, .-longjmp