aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/panic.c
diff options
context:
space:
mode:
authorRémy Oudompheng <oudomphe@phare.normalesup.org>2014-03-14 19:37:39 +0100
committerRémy Oudompheng <oudomphe@phare.normalesup.org>2014-03-14 19:37:39 +0100
commitf210fd1fa905ad381c8cb358ed7c004ec582f90f (patch)
treeba07bcccd1ac8274b538e6a4e639e9e9f6cde2bd /src/pkg/runtime/panic.c
parentd8e6881166e280cc44056f1a6c9747a103dca340 (diff)
downloadgo-f210fd1fa905ad381c8cb358ed7c004ec582f90f.tar.xz
cmd/6g, runtime: alignment fixes for amd64p32.
LGTM=rsc R=rsc, dave, iant, khr CC=golang-codereviews https://golang.org/cl/75820044
Diffstat (limited to 'src/pkg/runtime/panic.c')
-rw-r--r--src/pkg/runtime/panic.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pkg/runtime/panic.c b/src/pkg/runtime/panic.c
index d35f7800a3..0bf3b6a140 100644
--- a/src/pkg/runtime/panic.c
+++ b/src/pkg/runtime/panic.c
@@ -353,10 +353,11 @@ runtime·unwindstack(G *gp, byte *sp)
// find the stack segment of its caller.
#pragma textflag NOSPLIT
void
-runtime·recover(byte *argp, Eface ret)
+runtime·recover(byte *argp, GoOutput retbase, ...)
{
Panic *p;
Stktop *top;
+ Eface *ret;
// Must be an unrecovered panic in progress.
// Must be on a stack segment created for a deferred call during a panic.
@@ -367,16 +368,16 @@ runtime·recover(byte *argp, Eface ret)
// do not count as official calls to adjust what we consider the top frame
// while they are active on the stack. The linker emits adjustments of
// g->panicwrap in the prologue and epilogue of functions marked as wrappers.
+ ret = (Eface*)&retbase;
top = (Stktop*)g->stackbase;
p = g->panic;
if(p != nil && !p->recovered && top->panic && argp == (byte*)top - top->argsize - g->panicwrap) {
p->recovered = 1;
- ret = p->arg;
+ *ret = p->arg;
} else {
- ret.type = nil;
- ret.data = nil;
+ ret->type = nil;
+ ret->data = nil;
}
- FLUSH(&ret);
}
void