]> Cypherpunks repositories - gostls13.git/commitdiff
peep: more bugs
authorKen Thompson <ken@golang.org>
Thu, 10 Feb 2011 00:03:02 +0000 (16:03 -0800)
committerKen Thompson <ken@golang.org>
Thu, 10 Feb 2011 00:03:02 +0000 (16:03 -0800)
R=r
CC=golang-dev
https://golang.org/cl/4176042

src/cmd/5g/peep.c
src/cmd/5g/reg.c

index 1aac1a8302abdc8d8eef50c1b982df0c8093bc50..ca12d70f263c40fb09957eca9a232757586c5f65 100644 (file)
@@ -339,7 +339,8 @@ subprop(Reg *r0)
 
                case AMULLU:
                case AMULA:
-//             case AMVN:
+               case AMVN:
+                       return 0;
 
                case ACMN:
                case AADD:
@@ -985,6 +986,8 @@ copyu(Prog *p, Adr *v, Adr *s)
        case AMOVHU:
        case AMOVB:
        case AMOVBU:
+       case AMOVFW:
+       case AMOVWF:
        case AMOVDW:
        case AMOVWD:
        case AMOVFD:
@@ -1020,7 +1023,7 @@ copyu(Prog *p, Adr *v, Adr *s)
 
        case AMULLU:    /* read, read, write, write */
        case AMULA:
-//     case AMVN:
+       case AMVN:
                return 2;
 
        case AADD:      /* read, read, write */
@@ -1192,15 +1195,15 @@ copyau(Adr *a, Adr *v)
                return 1;
        if(v->type == D_REG) {
                if(a->type == D_CONST && a->reg != NREG) {
-                       if(v->reg == a->reg)
+                       if(a->reg == v->reg)
                                return 1;
                } else
                if(a->type == D_OREG) {
-                       if(v->reg == a->reg)
+                       if(a->reg == v->reg)
                                return 1;
                } else
                if(a->type == D_REGREG) {
-                       if(v->reg == a->reg)
+                       if(a->reg == v->reg)
                                return 1;
                        if(a->offset == v->reg)
                                return 1;
index c80c0774bf128c3ebc037d51abfaabc31bdea89f..f31f70535ed902a53fb9ce95162ed02878372eed 100644 (file)
@@ -140,10 +140,10 @@ regopt(Prog *firstp)
        if(first == 0) {
                fmtinstall('Q', Qconv);
        }
-       first++;
 
+       first++;
        if(debug['K']) {
-               if(first != 2)
+               if(first != 13)
                        return;
 //             debug['R'] = 2;
 //             debug['P'] = 2;