From 9dfc6eba89b34917b26947ffb35984cdd3f70944 Mon Sep 17 00:00:00 2001 From: Manfred Hollstein Date: Wed, 10 Sep 1997 18:02:16 +0000 Subject: [PATCH] * m88k/sysv3.h (INITIALIZE_TRAMPOLINE) Define. * libgcc2.c (__enable_execute_stack): Provide for sysV88 too. From-SVN: r15256 --- gcc/ChangeLog | 3 +++ gcc/config/m88k/sysv3.h | 18 ++++++++++++++++++ gcc/libgcc2.c | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 40fef6a8844..dd4cedaa961 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -26,6 +26,9 @@ Wed Sep 10 01:32:54 1997 Jeffrey A Law (law@cygnus.com) Wed Sep 10 00:29:29 1997 Manfred Hollstein + * m88k/sysv3.h (INITIALIZE_TRAMPOLINE) Define. + * libgcc2.c (__enable_execute_stack): Provide for sysV88 too. + * xm-m88k.h (USG): Only define if it hasn't already been defined. * Makefile.in (risky-stage1): Delete gratutious whitespace. diff --git a/gcc/config/m88k/sysv3.h b/gcc/config/m88k/sysv3.h index 62fe8973d4f..e3c318ef90b 100644 --- a/gcc/config/m88k/sysv3.h +++ b/gcc/config/m88k/sysv3.h @@ -137,3 +137,21 @@ do { \ if (((int *)__DTOR_LIST__)[i] != -1) \ __DTOR_LIST__[i] (); \ } while (0) + +#ifdef sysV88 +/* manfred@s-direktnet.de: Re-define INITIALIZE_TRAMPOLINE to additionally call + __enable_execute_stack. + I don't actually have a clue why nobody else than sysV88 and __DOLPHIN__ + needs to call this; perhaps they didn't ever run the c-torture tests + getting segmentations violations and/or bus errors with nested functions. */ +#undef INITIALIZE_TRAMPOLINE +#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ +{ \ + emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 40)), FNADDR); \ + emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 36)), CXT); \ + emit_call_insn (gen_call (gen_rtx (MEM, SImode, \ + gen_rtx (SYMBOL_REF, Pmode, \ + "__enable_execute_stack")), \ + const0_rtx)); \ +} +#endif diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index eb6a9ba00a0..23a4e5a7149 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -2827,7 +2827,7 @@ __enable_execute_stack () } #endif /* __convex__ */ -#ifdef __DOLPHIN__ +#if defined (__DOLPHIN__) || defined (sysV88) /* Modified from the convex -code above. */ @@ -2857,7 +2857,7 @@ __enable_execute_stack () errno=save_errno; } -#endif /* __DOLPHIN__ */ +#endif /* __DOLPHIN__ or sysV88 */ #ifdef __pyr__