aboutsummaryrefslogtreecommitdiff
path: root/gcc/unwind-dw2.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2003-07-16 13:52:55 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2003-07-16 13:52:55 +0200
commitfc4767bbb69323f65b841b350a8d67742a83a89d (patch)
treeda08a4ceb1400ad593f6a055dc2999c204a77e07 /gcc/unwind-dw2.c
parent6972c506d47a918744940e9af28a85d67e446090 (diff)
downloadgcc-fc4767bbb69323f65b841b350a8d67742a83a89d.zip
gcc-fc4767bbb69323f65b841b350a8d67742a83a89d.tar.gz
gcc-fc4767bbb69323f65b841b350a8d67742a83a89d.tar.bz2
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
Diffstat (limited to 'gcc/unwind-dw2.c')
-rw-r--r--gcc/unwind-dw2.c7
1 files changed, 7 insertions, 0 deletions
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