riscv64: fix linking with binutils 2.40
[uclibc-ng.git] / libc / sysdeps / linux / csky / jmpbuf-unwind.h
blob15144fe82f3e5145a4a39439fef89b10d3aa3c88
1 /*
2 * Copyright (C) 2017 Hangzhou C-SKY Microsystems co.,ltd.
4 * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB
5 * in this tarball.
6 */
8 #include <setjmp.h>
9 #include <stdint.h>
10 #include <unwind.h>
12 /* Test if longjmp to JMPBUF would unwind the frame
13 containing a local variable at ADDRESS. */
14 #define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
15 ((void *) (address) < (void *) demangle (jmpbuf[0].__sp))
17 #define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
18 _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
20 #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
21 ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf[0].__sp) - (_adj))