From: Russ Cox Date: Fri, 13 Sep 2013 03:50:50 +0000 (+0000) Subject: cmd/5l: fix handling of RET.EQ in wrapper function X-Git-Tag: go1.2rc2~224 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3acddba2ec9ec2b6e8e9f6b9b6843d3780587bfe;p=gostls13.git 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 --- diff --git a/src/cmd/5l/noop.c b/src/cmd/5l/noop.c index 0bd76040d3..fb70599b51 100644 --- a/src/cmd/5l/noop.c +++ b/src/cmd/5l/noop.c @@ -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;