]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.power64] cmd/gc: handle thechar=='9', disable nilopt() for now
authorShenghou Ma <minux@golang.org>
Wed, 13 Aug 2014 00:57:32 +0000 (20:57 -0400)
committerShenghou Ma <minux@golang.org>
Wed, 13 Aug 2014 00:57:32 +0000 (20:57 -0400)
LGTM=rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/121630043

src/cmd/gc/pgen.c
src/cmd/gc/popt.c

index cabba6824ec78ce519d34fbca45235e48312f718..5ac46e774e79e512fe4b3983ceb5d5207ef7a990 100644 (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);
index c8d60c5add61a6003bf52430143a790340762e15..4c75e6c2657b27f56a9bf7e0ef06426a7a4c656a 100644 (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;