setjmp.h 935 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * libc/sysdeps/linux/v850/bits/setjmp.h -- v850 version of `jmp_buf' type
  3. *
  4. * Copyright (C) 2001 NEC Corporation
  5. * Copyright (C) 2001 Miles Bader <miles@gnu.org>
  6. *
  7. * This file is subject to the terms and conditions of the GNU Lesser
  8. * General Public License. See the file COPYING.LIB in the main
  9. * directory of this archive for more details.
  10. *
  11. * Written by Miles Bader <miles@gnu.org>
  12. */
  13. #ifndef _SETJMP_H
  14. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  15. #endif
  16. #ifndef _ASM
  17. typedef struct
  18. {
  19. /* Stack pointer. */
  20. void *__sp;
  21. /* Link pointer. */
  22. void *__lp;
  23. /* Callee-saved registers r2 and r20-r29. */
  24. int __regs[11];
  25. } __jmp_buf[1];
  26. #endif
  27. #define JB_SIZE (4 * 13)
  28. /* Test if longjmp to JMPBUF would unwind the frame
  29. containing a local variable at ADDRESS. */
  30. #define _JMPBUF_UNWINDS(jmpbuf, address) \
  31. ((__ptr_t) (address) < &(jmpbuf)[0].__sp)