1
0
mirror of https://github.com/golang/go synced 2024-10-04 00:11:21 -06:00

[dev.power64] cmd/gc: handle thechar=='9', disable nilopt() for now

LGTM=rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/121630043
This commit is contained in:
Shenghou Ma 2014-08-12 20:57:32 -04:00
parent b1c9a8bce3
commit 5e4989cf0a
2 changed files with 6 additions and 2 deletions

View File

@ -428,7 +428,7 @@ allocauto(Prog* ptxt)
stksize = rnd(stksize, n->type->align);
if(haspointers(n->type))
stkptrsize = stksize;
if(thechar == '5')
if(thechar == '5' || thechar == '9')
stksize = rnd(stksize, widthptr);
if(stksize >= (1ULL<<31)) {
setlineno(curfn);
@ -485,7 +485,7 @@ cgen_checknil(Node *n)
dump("checknil", n);
fatal("bad checknil");
}
if((thechar == '5' && n->op != OREGISTER) || !n->addable || n->op == OLITERAL) {
if(((thechar == '5' || thechar == '9') && n->op != OREGISTER) || !n->addable || n->op == OLITERAL) {
regalloc(&reg, types[tptr], n);
cgen(n, &reg);
gins(ACHECKNIL, &reg, N);

View File

@ -847,6 +847,10 @@ nilopt(Prog *firstp)
Graph *g;
int ncheck, nkill;
// TODO(minux): nilopt on power64 throw away seemly random segment of code.
if(thechar == '9')
return;
g = flowstart(firstp, sizeof(NilFlow));
if(g == nil)
return;