jmpbuf-unwind.h 773 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  3. *
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. #include <setjmp.h>
  7. #include <jmpbuf-offsets.h>
  8. #if __WORDSIZE == 64
  9. /* Test if longjmp to JMPBUF would unwind the frame
  10. containing a local variable at ADDRESS. */
  11. #define _JMPBUF_UNWINDS(jmpbuf, address) \
  12. ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp)
  13. #else
  14. /* Test if longjmp to JMPBUF would unwind the frame
  15. containing a local variable at ADDRESS. */
  16. #define _JMPBUF_UNWINDS(jmpbuf, address) \
  17. ((int) (address) < (jmpbuf)[JB_SP])
  18. #endif
  19. #ifdef __UCLIBC_HAS_THREADS_NATIVE__
  20. #if defined(__arch64__)
  21. #include "sparc64/jmpbuf-unwind.h"
  22. #else
  23. #include "sparc32/jmpbuf-unwind.h"
  24. #endif
  25. #endif