setjmp.h 1005 B

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