1
0
mirror of https://github.com/golang/go synced 2024-11-22 19:54:39 -07:00

optimizer bug w STOstring

R=r
OCL=23820
CL=23820
This commit is contained in:
Ken Thompson 2009-01-29 15:13:36 -08:00
parent 6ee6d6ec55
commit 4f49b88dda
3 changed files with 54 additions and 8 deletions

View File

@ -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)
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;

View File

@ -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)
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;

View File

@ -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)
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;