diff options
author | Mike Stump <mrs@gcc.gnu.org> | 1997-05-07 22:50:11 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 1997-05-07 22:50:11 +0000 |
commit | 6e6a07d29955e808fccd63ee2ca34ec217e19b5c (patch) | |
tree | cb529c4d7f439546438820c79f061fa0ec0e5666 /gcc/libgcc2.c | |
parent | 24f2dbd6f70dd5ae6b3069f7587b3a6ba4e2211f (diff) | |
download | gcc-6e6a07d29955e808fccd63ee2ca34ec217e19b5c.tar.gz |
except.c (start_dynamic_handler): Fix so that we can use __builtin_setjmp...
* except.c (start_dynamic_handler): Fix so that we can use
__builtin_setjmp, and default to using __builtin_setjmp instead of
setjmp.
* expr.c (expand_builtin_setjmp): New routine, split out from
existing inline code from expand_builtin.
(expand_builtin): Split out code into expand_builtin_setjmp.
* expr.h (expand_builtin_setjmp): Add declaration.
* libgcc2.c (__sjthrow): Default to using __builtin_setjmp instead
of setjmp.
(__sjpopnthrow): Likewise.
* optabs.c (init_optabs): Likewise.
From-SVN: r14045
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r-- | gcc/libgcc2.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 107c4bf04df..09b6a15dcc6 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -3120,7 +3120,7 @@ __terminate () is raised when using the setjmp/longjmp exception handling codegen method. */ -extern longjmp (void *, int); +extern void longjmp (void *, int); extern void *__eh_type; @@ -3169,7 +3169,11 @@ __sjthrow () buf[0] = (*dhc); /* try { */ +#ifdef DONT_USE_BUILTIN_SETJMP if (! setjmp (&buf[2])) +#else + if (! __builtin_setjmp (&buf[2])) +#endif { *dhc = buf; while (cleanup[0]) @@ -3206,10 +3210,10 @@ __sjthrow () /* And then we jump to the handler. */ -#ifdef USE_BUILTIN_SETJMP - __builtin_longjmp (jmpbuf, 1); -#else +#ifdef DONT_USE_BUILTIN_SETJMP longjmp (jmpbuf, 1); +#else + __builtin_longjmp (jmpbuf, 1); #endif } @@ -3240,7 +3244,11 @@ __sjpopnthrow () buf[0] = (*dhc); /* try { */ +#ifdef DONT_USE_BUILTIN_SETJMP if (! setjmp (&buf[2])) +#else + if (! __builtin_setjmp (&buf[2])) +#endif { *dhc = buf; while (cleanup[0]) |