1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 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 6 */ 7 8 #ifndef __setjmp_h 9 #define __setjmp_h 10 11 #ifdef CONFIG_X86_64 12 13 struct jmp_buf_data { 14 unsigned long __rip; 15 unsigned long __rsp; 16 unsigned long __rbp; 17 unsigned long __rbx; 18 unsigned long __r12; 19 unsigned long __r13; 20 unsigned long __r14; 21 unsigned long __r15; 22 }; 23 24 #else 25 26 struct jmp_buf_data { 27 unsigned int __ebx; 28 unsigned int __esp; 29 unsigned int __ebp; 30 unsigned int __esi; 31 unsigned int __edi; 32 unsigned int __eip; 33 }; 34 35 #endif 36 37 int setjmp(struct jmp_buf_data *jmp_buf); 38 void longjmp(struct jmp_buf_data *jmp_buf, int val); 39 40 #endif 41