Commit 2c35e548 authored by Ken Thompson's avatar Ken Thompson

arm reg bug MOVW into bool variable

R=r
CC=golang-dev
https://golang.org/cl/4034042
parent 7b4495c0
......@@ -137,18 +137,16 @@ regopt(Prog *firstp)
uint32 vreg;
Bits bit;
return;
if(first == 0) {
fmtinstall('Q', Qconv);
}
first++;
if(debug['K']) {
if(first != 20)
if(first != 2)
return;
// debug['R'] = 2;
// debug['P'] = 2;
debug['R'] = 2;
debug['P'] = 2;
print("optimizing %S\n", curfn->nname->sym);
}
......@@ -480,7 +478,7 @@ brk:
* peep-hole on basic block
*/
if(!debug['R'] || debug['P']) {
peep();
// peep();
}
/*
......@@ -562,20 +560,24 @@ addmove(Reg *r, int bn, int rn, int f)
default:
print("What is this %E\n", v->etype);
case TINT32:
case TUINT32:
case TPTR32:
case TBOOL:
p1->as = AMOVW;
break;
case TINT8:
case TUINT8:
p1->as = AMOVB;
break;
case TBOOL:
case TUINT8:
p1->as = AMOVBU;
break;
case TINT16:
case TUINT16:
p1->as = AMOVH;
break;
case TUINT16:
p1->as = AMOVHU;
break;
case TINT32:
case TUINT32:
case TPTR32:
p1->as = AMOVW;
break;
case TFLOAT32:
p1->as = AMOVF;
break;
......@@ -599,7 +601,7 @@ addmove(Reg *r, int bn, int rn, int f)
a->type = D_FREG;
a->reg = rn-NREG;
}
if(v->etype == TUINT8)
if(v->etype == TUINT8 || v->etype == TBOOL)
p1->as = AMOVBU;
if(v->etype == TUINT16)
p1->as = AMOVHU;
......
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