summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShenghou Ma <minux@golang.org>2014-08-12 20:57:32 -0400
committerShenghou Ma <minux@golang.org>2014-08-12 20:57:32 -0400
commit92dd375ec14ba68e5856553f3d0042bf8267ec52 (patch)
tree7968a248c9e4e99d301e148e0873c68a3c0bd9f4
parent81f022f35e9234ce3b6945f029bb363c3e4b5b15 (diff)
downloadgo-92dd375ec14ba68e5856553f3d0042bf8267ec52.tar.gz
[dev.power64] cmd/gc: handle thechar=='9', disable nilopt() for now
LGTM=rsc R=rsc, iant, dave CC=golang-codereviews https://codereview.appspot.com/121630043
-rw-r--r--src/cmd/gc/pgen.c4
-rw-r--r--src/cmd/gc/popt.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/cmd/gc/pgen.c b/src/cmd/gc/pgen.c
index cabba6824..5ac46e774 100644
--- a/src/cmd/gc/pgen.c
+++ b/src/cmd/gc/pgen.c
@@ -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);
diff --git a/src/cmd/gc/popt.c b/src/cmd/gc/popt.c
index c8d60c5ad..4c75e6c26 100644
--- a/src/cmd/gc/popt.c
+++ b/src/cmd/gc/popt.c
@@ -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;