]> Cypherpunks repositories - gostls13.git/commitdiff
enable arm peep.
authorKen Thompson <ken@golang.org>
Sun, 30 Jan 2011 23:55:08 +0000 (15:55 -0800)
committerKen Thompson <ken@golang.org>
Sun, 30 Jan 2011 23:55:08 +0000 (15:55 -0800)
one bug fixed,
probably more will be revealed

R=r
CC=golang-dev
https://golang.org/cl/4126044

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

index b442ee8d168a55953065705ef758b9463e3c25c0..f619a6206f8e8694361257a11ee4205362f0e042 100644 (file)
@@ -333,6 +333,9 @@ subprop(Reg *r0)
                case ABL:
                        return 0;
 
+               case AMULLU:
+               case AMULA:
+
                case ACMN:
                case AADD:
                case ASUB:
@@ -344,9 +347,13 @@ subprop(Reg *r0)
                case AORR:
                case AAND:
                case AEOR:
+               case AMVN:
                case AMUL:
+               case AMULU:
                case ADIV:
                case ADIVU:
+               case AMOD:
+               case AMODU:
 
                case AADDD:
                case AADDF:
@@ -1005,7 +1012,12 @@ copyu(Prog *p, Adr *v, Adr *s)
                        return 1;
                return 0;
 
+       case AMULLU:    /* read, read, write, write */
+       case AMULA:
+               return 2;
+
        case AADD:      /* read, read, write */
+       case AADC:
        case ASUB:
        case ASBC:
        case ARSB:
@@ -1015,9 +1027,13 @@ copyu(Prog *p, Adr *v, Adr *s)
        case AORR:
        case AAND:
        case AEOR:
+       case AMVN:
        case AMUL:
+       case AMULU:
        case ADIV:
        case ADIVU:
+       case AMOD:
+       case AMODU:
        case AADDF:
        case AADDD:
        case ASUBF:
@@ -1144,6 +1160,9 @@ a2type(Prog *p)
        case ACMP:
        case ACMN:
 
+       case AMULLU:
+       case AMULA:
+
        case AADD:
        case ASUB:
        case ARSB:
@@ -1153,9 +1172,13 @@ a2type(Prog *p)
        case AORR:
        case AAND:
        case AEOR:
+       case AMVN:
        case AMUL:
+       case AMULU:
        case ADIV:
        case ADIVU:
+       case AMOD:
+       case AMODU:
                return D_REG;
 
        case ACMPF:
@@ -1372,12 +1395,15 @@ int
 modifiescpsr(Prog *p)
 {
        switch(p->as) {
+       case AMULLU:
+       case AMULA:
+       case AMULU:
+       case ADIVU:
+
        case ATEQ:
        case ACMN:
        case ATST:
        case ACMP:
-       case AMULU:
-       case ADIVU:
        case AMUL:
        case ADIV:
        case AMOD:
index 3f1ec07e4eb52baceada1847229300675c4df122..cd6adeaec7df1918c1a0d1350cebf7039111d28d 100644 (file)
@@ -143,7 +143,7 @@ regopt(Prog *firstp)
        first++;
 
        if(debug['K']) {
-               if(first != 1)
+               if(first != 13)
                        return;
 //             debug['R'] = 2;
 //             debug['P'] = 2;
@@ -491,7 +491,7 @@ brk:
         * peep-hole on basic block
         */
        if(!debug['R'] || debug['P']) {
-//             peep();
+               peep();
        }
 
        /*