Commit 3acddba2 authored by Russ Cox's avatar Russ Cox

cmd/5l: fix handling of RET.EQ in wrapper function

Keith is too clever for me.

R=ken2
CC=golang-dev, khr
https://golang.org/cl/13272050
parent 27cb23ce
......@@ -321,6 +321,13 @@ noops(void)
}
if(cursym->text->reg & WRAPPER) {
int cond;
// Preserve original RET's cond, to allow RET.EQ
// in the implementation of reflect.call.
cond = p->scond;
p->scond = C_SCOND_NONE;
// g->panicwrap -= autosize;
// MOVW panicwrap_offset(g), R3
// SUB $autosize, R3
......@@ -347,6 +354,8 @@ noops(void)
p->to.reg = REGG;
p->to.offset = 2*PtrSize;
p = appendp(p);
p->scond = cond;
}
p->as = AMOVW;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment