setjmp.h 719 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. #ifndef __setjmp_h
  8. #define __setjmp_h
  9. #ifdef CONFIG_X86_64
  10. struct jmp_buf_data {
  11. unsigned long __rip;
  12. unsigned long __rsp;
  13. unsigned long __rbp;
  14. unsigned long __rbx;
  15. unsigned long __r12;
  16. unsigned long __r13;
  17. unsigned long __r14;
  18. unsigned long __r15;
  19. };
  20. #else
  21. struct jmp_buf_data {
  22. unsigned int __ebx;
  23. unsigned int __esp;
  24. unsigned int __ebp;
  25. unsigned int __esi;
  26. unsigned int __edi;
  27. unsigned int __eip;
  28. };
  29. #endif
  30. int setjmp(struct jmp_buf_data *jmp_buf);
  31. void longjmp(struct jmp_buf_data *jmp_buf, int val);
  32. #endif