setjmp.h 682 B

123456789101112131415161718192021222324252627
  1. /* Copyright (C) 2004, Yoshinori Sato <ysato@users.sourceforge.jp> */
  2. /* Define the machine-dependent type `jmp_buf'. H8/300 version. */
  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 __regs[4]; /* save er4 - er7(sp) */
  10. unsigned long __pc; /* the return address */
  11. } __jmp_buf[1];
  12. #endif /* _ASM */
  13. #define JB_REGS 0
  14. #define JB_PC 16
  15. #define JB_SIZE 20
  16. /* Test if longjmp to JMPBUF would unwind the frame
  17. containing a local variable at ADDRESS. */
  18. #define _JMPBUF_UNWINDS(jmpbuf, address) \
  19. ((void *) (address) < (void *) (jmpbuf)->__regs[3])