Use __builtin_unwind_init if available
* configure.in: Check for __builtin_unwind_init. * src/alloc.c (mark_stack): Use __builtin_unwind_init if available.
This commit is contained in:
parent
96f129d50f
commit
2018939f5d
6 changed files with 649 additions and 528 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-01-05 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* configure.in: Check for __builtin_unwind_init.
|
||||
|
||||
2011-01-05 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* configure.in (HAVE_MAKEINFO): New output variable.
|
||||
|
|
13
configure.in
13
configure.in
|
@ -5,7 +5,7 @@ dnl in the directory containing this script.
|
|||
dnl If you changed any AC_DEFINES, also run autoheader.
|
||||
dnl
|
||||
dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
dnl 2005, 2006, 2007, 2008, 2009, 2010
|
||||
dnl 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
||||
dnl Free Software Foundation, Inc.
|
||||
dnl
|
||||
dnl This file is part of GNU Emacs.
|
||||
|
@ -2635,6 +2635,17 @@ gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
|
|||
memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
|
||||
cfmakeraw cfsetspeed isnan copysign __executable_start)
|
||||
|
||||
dnl Cannot use AC_CHECK_FUNCS
|
||||
AC_CACHE_CHECK([for __builtin_unwind_init],
|
||||
emacs_cv_func___builtin_unwind_init,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_unwind_init ();])],
|
||||
emacs_cv_func___builtin_unwind_init=yes,
|
||||
emacs_cv_func___builtin_unwind_init=no)])
|
||||
if test $emacs_cv_func___builtin_unwind_init = yes; then
|
||||
AC_DEFINE(HAVE___BUILTIN_UNWIND_INIT, 1,
|
||||
[Define to 1 if you have the `__builtin_unwind_init' function.])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(sys/un.h)
|
||||
|
||||
AC_FUNC_MKTIME
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2011-01-05 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* alloc.c (mark_stack): Use __builtin_unwind_init if available.
|
||||
|
||||
2011-01-04 Jan Moringen <jan.moringen@uni-bielefeld.de>
|
||||
|
||||
* dbusbind.c (Fdbus_register_method): Added optional parameter
|
||||
|
@ -29431,7 +29435,7 @@ See ChangeLog.10 for earlier changes.
|
|||
;; coding: utf-8
|
||||
;; End:
|
||||
|
||||
Copyright (C) 2007, 2008, 2009, 2010
|
||||
Copyright (C) 2007, 2008, 2009, 2010, 2011
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
|
21
src/alloc.c
21
src/alloc.c
|
@ -1,6 +1,6 @@
|
|||
/* Storage allocation and gc for GNU Emacs Lisp interpreter.
|
||||
Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999,
|
||||
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
@ -4222,7 +4222,7 @@ Please mail the result to <emacs-devel@gnu.org>.\n\
|
|||
can prove that. */
|
||||
|
||||
static void
|
||||
test_setjmp ()
|
||||
test_setjmp (void)
|
||||
{
|
||||
char buf[10];
|
||||
register int x;
|
||||
|
@ -4270,7 +4270,7 @@ test_setjmp ()
|
|||
/* Abort if anything GCPRO'd doesn't survive the GC. */
|
||||
|
||||
static void
|
||||
check_gcpros ()
|
||||
check_gcpros (void)
|
||||
{
|
||||
struct gcpro *p;
|
||||
int i;
|
||||
|
@ -4286,7 +4286,7 @@ check_gcpros ()
|
|||
#elif GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES
|
||||
|
||||
static void
|
||||
dump_zombies ()
|
||||
dump_zombies (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -4321,6 +4321,11 @@ dump_zombies ()
|
|||
have to be true! It must be verified for each system, possibly
|
||||
by taking a look at the source code of setjmp.
|
||||
|
||||
If __builtin_unwind_init is available (defined by GCC >= 2.8) we
|
||||
can use it as a machine independent method to store all registers
|
||||
to the stack. In this case the macros described in the previous
|
||||
two paragraphs are not used.
|
||||
|
||||
Stack Layout
|
||||
|
||||
Architectures differ in the way their processor stack is organized.
|
||||
|
@ -4359,6 +4364,13 @@ mark_stack (void)
|
|||
volatile int stack_grows_down_p = (char *) &j > (char *) stack_base;
|
||||
void *end;
|
||||
|
||||
#ifdef HAVE___BUILTIN_UNWIND_INIT
|
||||
/* Force callee-saved registers and register windows onto the stack.
|
||||
This is the preferred method if available, obviating the need for
|
||||
machine dependent methods. */
|
||||
__builtin_unwind_init ();
|
||||
end = &end;
|
||||
#else /* not HAVE___BUILTIN_UNWIND_INIT */
|
||||
/* This trick flushes the register windows so that all the state of
|
||||
the process is contained in the stack. */
|
||||
/* Fixme: Code in the Boehm GC suggests flushing (with `flushrs') is
|
||||
|
@ -4394,6 +4406,7 @@ mark_stack (void)
|
|||
setjmp (j.j);
|
||||
end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j;
|
||||
#endif /* not GC_SAVE_REGISTERS_ON_STACK */
|
||||
#endif /* not HAVE___BUILTIN_UNWIND_INIT */
|
||||
|
||||
/* This assumes that the stack is a contiguous region in memory. If
|
||||
that's not the case, something has to be done here to iterate
|
||||
|
|
|
@ -816,6 +816,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
/* Define to 1 if you want to use the X window system. */
|
||||
#undef HAVE_X_WINDOWS
|
||||
|
||||
/* Define to 1 if you have the `__builtin_unwind_init' function. */
|
||||
#undef HAVE___BUILTIN_UNWIND_INIT
|
||||
|
||||
/* Define to 1 if you have the `__executable_start' function. */
|
||||
#undef HAVE___EXECUTABLE_START
|
||||
|
||||
|
@ -1053,6 +1056,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to any substitute for sys_siglist. */
|
||||
#undef sys_siglist
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue