From: Ken Thompson Date: Sun, 16 Jan 2011 23:25:13 +0000 (-0800) Subject: arm reg bug with address(variable) X-Git-Tag: weekly.2011-01-19~52 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3965519ae5fd7f51403669208deddcd103ebcdfc;p=gostls13.git arm reg bug with address(variable) R=r CC=golang-dev https://golang.org/cl/4047041 --- diff --git a/src/cmd/5g/reg.c b/src/cmd/5g/reg.c index 4fb9916b1d..04933a873e 100644 --- a/src/cmd/5g/reg.c +++ b/src/cmd/5g/reg.c @@ -137,18 +137,16 @@ regopt(Prog *firstp) uint32 vreg; Bits bit; -return; - if(first == 0) { fmtinstall('Q', Qconv); } first++; if(debug['K']) { - if(first != 2) + if(first != 1) return; - debug['R'] = 2; - debug['P'] = 2; +// debug['R'] = 2; +// debug['P'] = 2; print("optimizing %S\n", curfn->nname->sym); } @@ -644,21 +642,17 @@ mkvar(Reg *r, Adr *a, int docon) print("type %d %d %D\n", t, a->name, a); goto none; - case D_CONST: - if(a->reg != NREG) - r->regu |= RtoB(a->reg); - // fallthrough - case D_NONE: case D_FCONST: case D_BRANCH: - goto none; + break; case D_REGREG: if(a->offset != NREG) r->regu |= RtoB(a->offset); // fallthrough + case D_CONST: case D_REG: case D_SHIFT: case D_OREG: @@ -750,22 +744,8 @@ out: if(n == D_PARAM) for(z=0; z