]> Cypherpunks repositories - gostls13.git/commitdiff
optimizer bug w STOstring
authorKen Thompson <ken@golang.org>
Thu, 29 Jan 2009 23:13:36 +0000 (15:13 -0800)
committerKen Thompson <ken@golang.org>
Thu, 29 Jan 2009 23:13:36 +0000 (15:13 -0800)
R=r
OCL=23820
CL=23820

src/cmd/6c/peep.c
src/cmd/6g/peep.c
src/cmd/8c/peep.c

index 77c034b07b702d9b2fee06d0b7c9883f952606b1..2800d58c2a66ceff5ffb7fe350391078232f0450 100644 (file)
@@ -377,6 +377,10 @@ subprop(Reg *r0)
                case ACDQ:
                case ACQO:
 
+               case ASTOSB:
+               case ASTOSL:
+               case ASTOSQ:
+               case AMOVSB:
                case AMOVSL:
                case AMOVSQ:
                        return 0;
@@ -755,11 +759,23 @@ copyu(Prog *p, Adr *v, Adr *s)
                        return 2;
                goto caseread;
 
-       case AMOVSL:
-       case AMOVSQ:
        case AREP:
        case AREPN:
-               if(v->type == D_CX || v->type == D_DI || v->type == D_SI)
+               if(v->type == D_CX)
+                       return 2;
+               goto caseread;
+
+       case AMOVSB:
+       case AMOVSL:
+       case AMOVSQ:
+               if(v->type == D_DI || v->type == D_SI)
+                       return 2;
+               goto caseread;
+
+       case ASTOSB:
+       case ASTOSL:
+       case ASTOSQ:
+               if(v->type == D_AX || v->type == D_DI)
                        return 2;
                goto caseread;
 
index cdf8a8bc351f6ef517c90065f3ddb8c9e7869fe4..c84ff3ce72352c28dcf4df553c8ce116e10bb208 100644 (file)
@@ -392,6 +392,10 @@ subprop(Reg *r0)
                case ACDQ:
                case ACQO:
 
+               case ASTOSB:
+               case ASTOSL:
+               case ASTOSQ:
+               case AMOVSB:
                case AMOVSL:
                case AMOVSQ:
                        return 0;
@@ -770,11 +774,23 @@ copyu(Prog *p, Adr *v, Adr *s)
                        return 2;
                goto caseread;
 
-       case AMOVSL:
-       case AMOVSQ:
        case AREP:
        case AREPN:
-               if(v->type == D_CX || v->type == D_DI || v->type == D_SI)
+               if(v->type == D_CX)
+                       return 2;
+               goto caseread;
+
+       case AMOVSB:
+       case AMOVSL:
+       case AMOVSQ:
+               if(v->type == D_DI || v->type == D_SI)
+                       return 2;
+               goto caseread;
+
+       case ASTOSB:
+       case ASTOSL:
+       case ASTOSQ:
+               if(v->type == D_AX || v->type == D_DI)
                        return 2;
                goto caseread;
 
index b30a57b0a2b9df76853e0b0a73039e7d2e984f9d..64ce5fa78675db69af54dc4b5188a668944dac71 100644 (file)
@@ -305,6 +305,9 @@ subprop(Reg *r0)
                case ACWD:
                case ACDQ:
 
+               case ASTOSB:
+               case ASTOSL:
+               case AMOVSB:
                case AMOVSL:
                case AFSTSW:
                        return 0;
@@ -669,10 +672,21 @@ copyu(Prog *p, Adr *v, Adr *s)
                        return 2;
                goto caseread;
 
-       case AMOVSL:
        case AREP:
        case AREPN:
-               if(v->type == D_CX || v->type == D_DI || v->type == D_SI)
+               if(v->type == D_CX)
+                       return 2;
+               goto caseread;
+
+       case AMOVSB:
+       case AMOVSL:
+               if(v->type == D_DI || v->type == D_SI)
+                       return 2;
+               goto caseread;
+
+       case ASTOSB:
+       case ASTOSL:
+               if(v->type == D_AX || v->type == D_DI)
                        return 2;
                goto caseread;