From fc4767bbb69323f65b841b350a8d67742a83a89d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 16 Jul 2003 13:52:55 +0200 Subject: unwind-dw2.c (MD_FROB_UPDATE_CONTEXT): Define. * unwind-dw2.c (MD_FROB_UPDATE_CONTEXT): Define. (uw_update_context_1): Use it. * config/rs6000/rs6000.c (insn_after_throw): Remove. (rs6000_aix_emit_builtin_unwind_init): Save $r2 to its location in parent frame if _Unwind_* called directly instead of through .plt. (rs6000_emit_eh_toc_restore): Remove. (rs6000_emit_prologue): Update stack pointer before doing any saving if current_function_calls_eh_return. Generate unwind info for $r2. (rs6000_emit_epilogue): Restore stack pointer after doing all restoring if current_function_calls_eh_return. Restore $r2. * config/rs6000/rs6000-protos.h (rs6000_emit_eh_toc_restore): Remove. * config/rs6000/rs6000.md (eh_return): Remove call to rs6000_emit_eh_toc_restore. * config/rs6000/linux64.h (MD_FROB_UPDATE_CONTEXT): Define. * config/rs6000/aix.h (MD_FROB_UPDATE_CONTEXT): Define. * gcc.dg/cleanup-8.c: New test. * gcc.dg/cleanup-9.c: New test. From-SVN: r69450 --- gcc/unwind-dw2.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/unwind-dw2.c') diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c index eadd88b..3e58be6 100644 --- a/gcc/unwind-dw2.c +++ b/gcc/unwind-dw2.c @@ -54,6 +54,11 @@ #define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO) #endif +/* A target can do some update context frobbing. */ +#ifndef MD_FROB_UPDATE_CONTEXT +#define MD_FROB_UPDATE_CONTEXT(CTX, FS) do { } while (0) +#endif + /* This is the register and unwind state for a particular frame. This provides the information necessary to unwind up past a frame and return to its caller. */ @@ -1203,6 +1208,8 @@ uw_update_context_1 (struct _Unwind_Context *context, _Unwind_FrameState *fs) } break; } + + MD_FROB_UPDATE_CONTEXT (context, fs); } /* CONTEXT describes the unwind state for a frame, and FS describes the FDE -- cgit v1.1