summaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index d266a4a9226..4656597e06f 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -2390,6 +2390,22 @@ __unwind_function(void *ptr)
asm("# br");
asm("mtctr 3;bctr # b 3");
}
+#elif #machine(vax)
+__unwind_function(void *ptr)
+{
+ __label__ return_again;
+
+ /* Replace our frame's return address with the label below.
+ During execution, we will first return here instead of to
+ caller, then second return takes caller's frame off the stack.
+ Two returns matches two actual calls, so is less likely to
+ confuse debuggers. `16' corresponds to RETURN_ADDRESS_OFFSET. */
+ __asm ("movl %0,16(fp)" : : "p" (&& return_again));
+ return;
+
+ return_again:
+ return;
+}
#else
__unwind_function(void *ptr)
{