Commit 5e4989cf authored by Shenghou Ma's avatar Shenghou Ma

[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
parent b1c9a8bc
......@@ -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);
......
......@@ -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;
......
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