Commit 4f49b88d authored by Ken Thompson's avatar Ken Thompson

optimizer bug w STOstring

R=r
OCL=23820
CL=23820
parent 6ee6d6ec
...@@ -377,6 +377,10 @@ subprop(Reg *r0) ...@@ -377,6 +377,10 @@ subprop(Reg *r0)
case ACDQ: case ACDQ:
case ACQO: case ACQO:
case ASTOSB:
case ASTOSL:
case ASTOSQ:
case AMOVSB:
case AMOVSL: case AMOVSL:
case AMOVSQ: case AMOVSQ:
return 0; return 0;
...@@ -755,11 +759,23 @@ copyu(Prog *p, Adr *v, Adr *s) ...@@ -755,11 +759,23 @@ copyu(Prog *p, Adr *v, Adr *s)
return 2; return 2;
goto caseread; goto caseread;
case AMOVSL:
case AMOVSQ:
case AREP: case AREP:
case AREPN: 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; return 2;
goto caseread; goto caseread;
......
...@@ -392,6 +392,10 @@ subprop(Reg *r0) ...@@ -392,6 +392,10 @@ subprop(Reg *r0)
case ACDQ: case ACDQ:
case ACQO: case ACQO:
case ASTOSB:
case ASTOSL:
case ASTOSQ:
case AMOVSB:
case AMOVSL: case AMOVSL:
case AMOVSQ: case AMOVSQ:
return 0; return 0;
...@@ -770,11 +774,23 @@ copyu(Prog *p, Adr *v, Adr *s) ...@@ -770,11 +774,23 @@ copyu(Prog *p, Adr *v, Adr *s)
return 2; return 2;
goto caseread; goto caseread;
case AMOVSL:
case AMOVSQ:
case AREP: case AREP:
case AREPN: 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; return 2;
goto caseread; goto caseread;
......
...@@ -305,6 +305,9 @@ subprop(Reg *r0) ...@@ -305,6 +305,9 @@ subprop(Reg *r0)
case ACWD: case ACWD:
case ACDQ: case ACDQ:
case ASTOSB:
case ASTOSL:
case AMOVSB:
case AMOVSL: case AMOVSL:
case AFSTSW: case AFSTSW:
return 0; return 0;
...@@ -669,10 +672,21 @@ copyu(Prog *p, Adr *v, Adr *s) ...@@ -669,10 +672,21 @@ copyu(Prog *p, Adr *v, Adr *s)
return 2; return 2;
goto caseread; goto caseread;
case AMOVSL:
case AREP: case AREP:
case AREPN: 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; return 2;
goto caseread; goto caseread;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment