setjmp.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
  2. /* This file is released under the LGPL, any version you like */
  3. #ifndef _SETJMP_H
  4. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  5. #endif
  6. #ifndef _ASM
  7. typedef struct
  8. {
  9. unsigned long __dregs[6]; /* save d2 - d7 */
  10. unsigned long __aregs[6]; /* save a2 - a7 */
  11. unsigned long __pc; /* the return address */
  12. #if defined __HAVE_68881__ || defined __HAVE_FPU__
  13. /* There are eight floating point registers which
  14. are saved in IEEE 96-bit extended format. */
  15. char __fpregs[8 * (96 / 8)];
  16. #endif
  17. } __jmp_buf[1];
  18. #endif /* _ASM */
  19. #define JB_REGS 0
  20. #define JB_DREGS 0
  21. #define JB_AREGS 24
  22. #define JB_PC 48
  23. #define JB_FPREGS 52
  24. #if defined __HAVE_68881__ || defined __HAVE_FPU__
  25. # define JB_SIZE 76
  26. #else
  27. # define JB_SIZE 52
  28. #endif
  29. /* Test if longjmp to JMPBUF would unwind the frame
  30. containing a local variable at ADDRESS. */
  31. #define _JMPBUF_UNWINDS(jmpbuf, address) \
  32. ((void *) (address) < (void *) (jmpbuf)->__aregs[5])