diff options
| author | Maxim Kuvyrkov <maxim@codesourcery.com> | 2010-03-09 02:20:36 -0800 |
|---|---|---|
| committer | Andreas Schwab <schwab@linux-m68k.org> | 2010-03-12 19:45:34 +0100 |
| commit | 42ae1878f326c413dd026373ebdb6bf6cd20e75d (patch) | |
| tree | cbf8229e8fd4bbe0eab1a72c098627499d392030 | |
| parent | f3ed03373affbd13ee8dbbeb933959381ae492bb (diff) | |
| download | glibc-42ae1878f326c413dd026373ebdb6bf6cd20e75d.tar.xz glibc-42ae1878f326c413dd026373ebdb6bf6cd20e75d.zip | |
m68k: update jmpbuf-unwind.h
| -rw-r--r-- | ChangeLog.m68k | 5 | ||||
| -rw-r--r-- | sysdeps/m68k/jmpbuf-unwind.h | 23 |
2 files changed, 27 insertions, 1 deletions
diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 8487ba3e5c..d14368e493 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,8 @@ +2010-03-09 Maxim Kuvyrkov <maxim@codesourcery.com> + + * sysdeps/m68k/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ) + (_jmpbuf_sp, _JMPBUF_UNWINDS_ADJ, __libc_unwind_longjmp): Define. + 2010-02-10 Joseph Myers <joseph@codesourcery.com> * sysdeps/m68k/fpu/fegetenv.c: Add hidden alias. diff --git a/sysdeps/m68k/jmpbuf-unwind.h b/sysdeps/m68k/jmpbuf-unwind.h index 3490c79bdc..28b9537960 100644 --- a/sysdeps/m68k/jmpbuf-unwind.h +++ b/sysdeps/m68k/jmpbuf-unwind.h @@ -1,5 +1,5 @@ /* Examine __jmp_buf for unwinding frames. m68k version. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,8 +18,29 @@ 02111-1307 USA. */ #include <setjmp.h> +#include <stdint.h> +#include <unwind.h> /* 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)->__sp)) + +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) + +static inline uintptr_t __attribute__ ((unused)) +_jmpbuf_sp (__jmp_buf regs) +{ + uintptr_t sp = regs[0].__sp; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (sp); +#endif + return sp; +} + +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ + ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) + +/* We use the normal longjmp for unwinding. */ +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) |
