]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/5g: add missing splitclean.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 8 Feb 2013 07:19:47 +0000 (08:19 +0100)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 8 Feb 2013 07:19:47 +0000 (08:19 +0100)
See issue 887 for the 8g analogue.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7306069

src/cmd/5g/ggen.c
src/cmd/5g/gsubr.c

index 40ef0bd7bcfc73c2148e00d7a00906dd9ced9d2c..1decdf46c1845cbb0417983e7c48c410ea9af500 100644 (file)
@@ -609,6 +609,7 @@ cgen_shift(int op, int bounded, Node *nl, Node *nr, Node *res)
                regalloc(&n3, types[TUINT32], N);
                gmove(&lo, &n1);
                gmove(&hi, &n3);
+               splitclean();
                gins(ATST, &n3, N);
                nodconst(&t, types[TUINT32], w);
                p1 = gins(AMOVW, &t, &n1);
index f023b269c81084a3abe2c1eeb76e4fd91d97c648..b8161acdbc45fe0bcd0c2ad71f4a7ee93d1246ac 100644 (file)
@@ -560,9 +560,9 @@ split64(Node *n, Node *lo, Node *hi)
        if(!is64(n->type))
                fatal("split64 %T", n->type);
 
-       sclean[nsclean].op = OEMPTY;
        if(nsclean >= nelem(sclean))
                fatal("split64 clean");
+       sclean[nsclean].op = OEMPTY;
        nsclean++;
        switch(n->op) {
        default: