aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1995-02-18 21:05:17 +0000
committerMike Stump <mrs@gcc.gnu.org>1995-02-18 21:05:17 +0000
commit71a810956e321407dfead626fc34d8c58b739a17 (patch)
tree2af341ae8b77ff679efd850d98a890fded0661ad /gcc
parent1e58f107572eacff48d711a0db224b07a5e5be7f (diff)
downloadgcc-71a810956e321407dfead626fc34d8c58b739a17.zip
gcc-71a810956e321407dfead626fc34d8c58b739a17.tar.gz
gcc-71a810956e321407dfead626fc34d8c58b739a17.tar.bz2
rs6000 exception handling support
From-SVN: r8970
Diffstat (limited to 'gcc')
-rw-r--r--gcc/libgcc2.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 661a799..3f12552 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -2277,6 +2277,24 @@ __unwind_function(void *ptr)
asm("ret");
}
#endif
+
+#if #machine(rs6000)
+__unwind_function(void *ptr)
+{
+ asm("mr 31,1");
+ asm("l 1,0(1)");
+ asm("l 31,-4(1)");
+ asm("# br");
+
+ asm("mr 31,1");
+ asm("l 1,0(1)");
+ /* use 31 as a scratch register to restore the link register. */
+ asm("l 31, 8(1);mtlr 31 # l lr,8(1)");
+ asm("l 31,-4(1)");
+ asm("# br");
+ asm("mtctr 3;bctr # b 3");
+}
+#endif
#endif /* L_eh */
#ifdef L_pure