riscv64: fix linking with binutils 2.40
[uclibc-ng.git] / libc / sysdeps / linux / powerpc / jmpbuf-unwind.h
blobd650b32301ba316df03c46ca6097f2e591b162df
1 /*
2 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
4 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
5 */
7 #include <setjmp.h>
8 #include <jmpbuf-offsets.h>
10 /* Test if longjmp to JMPBUF would unwind the frame
11 containing a local variable at ADDRESS. */
12 #define _JMPBUF_UNWINDS(jmpbuf, address) \
13 ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
15 #ifdef __UCLIBC_HAS_THREADS_NATIVE__
16 #include <stdint.h>
17 #include <unwind.h>
19 #define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
20 _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
22 #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
23 ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_GPR1] - (_adj))
24 #endif