@@ -70,19 +70,11 @@ _hurdsig_longjmp_from_handler (void *data, jmp_buf env, int val)
struct hurd_userlink *link;
- inline uintptr_t demangle_ptr (uintptr_t x)
- {
-# ifdef PTR_DEMANGLE
- PTR_DEMANGLE (x);
-# endif
- return x;
- }
-
/* Continue _longjmp_unwind's job of running the unwind
forms for frames being unwound, since we will not
return to its loop like this one, which called us. */
for (link = ss->active_resources;
- link && _JMPBUF_UNWINDS (env[0].__jmpbuf, link, demangle_ptr);
+ link && _JMPBUF_UNWINDS (env[0].__jmpbuf, link);
link = link->thread.next)
if (_hurd_userlink_unlink (link))
{
@@ -23,8 +23,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle (jmpbuf[JB_SP]))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(jmpbuf, context, adj) \
_JMPBUF_UNWINDS_ADJ (jmpbuf, (void *) _Unwind_GetCFA (context), adj)
@@ -24,8 +24,8 @@
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
- ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP]))
+#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
+ ((uintptr_t) (_address) < _jmpbuf_sp (_jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
@@ -22,8 +22,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
@@ -21,6 +21,5 @@
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
- ((void *) (_address) > \
- (void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP])))
+#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
+ ((unsigned long) (_address) > ((unsigned long *) _jmpbuf)[JB_SP])
@@ -24,8 +24,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[JB_SP]))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
@@ -22,8 +22,8 @@
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
- ((void *) (_address) < (void *) (((long int *) _jmpbuf)[0]))
+#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
+ ((void *) (_address) < (void *) ((long int *) _jmpbuf)[0])
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
({ uintptr_t _cfa = (uintptr_t) _Unwind_GetCFA (_context) - (_adj); \
@@ -22,8 +22,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((uintptr_t) (jmpbuf)->__sp))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
@@ -28,15 +28,6 @@
#error "<jmpbuf-unwind.h> fails to define _JMPBUF_UNWINDS"
#endif
-static inline uintptr_t
-demangle_ptr (uintptr_t x)
-{
-# ifdef PTR_DEMANGLE
- PTR_DEMANGLE (x);
-# endif
- return x;
-}
-
/* This function is called by `longjmp' (with its arguments) to restore
active resources to a sane state before the frames code using them are
jumped out of. */
@@ -55,7 +46,7 @@ _longjmp_unwind (jmp_buf env, int val)
/* Remove local signal preemptors being unwound past. */
while (ss->preemptors &&
- _JMPBUF_UNWINDS (env[0].__jmpbuf, ss->preemptors, demangle_ptr))
+ _JMPBUF_UNWINDS (env[0].__jmpbuf, ss->preemptors))
ss->preemptors = ss->preemptors->next;
__spin_unlock (&ss->lock);
@@ -65,7 +56,7 @@ _longjmp_unwind (jmp_buf env, int val)
in stack frames being unwound by this jump. */
for (link = ss->active_resources;
- link && _JMPBUF_UNWINDS (env[0].__jmpbuf, link, demangle_ptr);
+ link && _JMPBUF_UNWINDS (env[0].__jmpbuf, link);
link = link->thread.next)
/* Remove this link from the resource's users list,
since the frame using the resource is being unwound.
@@ -23,8 +23,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
@@ -22,8 +22,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, \
@@ -24,8 +24,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[JB_GPR1]))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
@@ -26,8 +26,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)->__gregs[__JB_GPR15]))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
/* On s390{,x}, CFA is always 96 (resp. 160) bytes above actual
@@ -23,8 +23,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[0].__regs[7]))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf)[7])
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
@@ -24,8 +24,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((int) (address) < demangle ((jmpbuf)[JB_SP]))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
@@ -22,7 +22,7 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_gregs[MC_O6] + 2047)
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
@@ -25,8 +25,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[JB_SP]))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
@@ -24,8 +24,8 @@
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[JB_RSP]))
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((uintptr_t) (address) < _jmpbuf_sp (jmpbuf))
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, \