diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2014-07-25 17:39:05 +0530 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2014-08-18 11:52:34 +0200 |
commit | 873fa5beccbb4e95d1bbb9afb6a0eec02811f09b (patch) | |
tree | 17ceb2c595fe9a491f3e7fa91d7c379babf2c356 /libc/sysdeps/linux/arc/jmpbuf-unwind.h | |
parent | 6915b3a6b96e8e34601941c0eb7519cde1c0f999 (diff) |
NPTL: ARC support
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/arc/jmpbuf-unwind.h')
-rw-r--r-- | libc/sysdeps/linux/arc/jmpbuf-unwind.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/arc/jmpbuf-unwind.h b/libc/sysdeps/linux/arc/jmpbuf-unwind.h index e4ed8fe75..8c41816c5 100644 --- a/libc/sysdeps/linux/arc/jmpbuf-unwind.h +++ b/libc/sysdeps/linux/arc/jmpbuf-unwind.h @@ -11,3 +11,20 @@ containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP])) + +#ifdef __UCLIBC_HAS_THREADS_NATIVE__ +#include <stdint.h> +#include <unwind.h> + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#undef _JMPBUF_UNWINDS +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ + ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP])) + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj)) +#endif |