1
0
mirror of https://github.com/golang/go synced 2024-11-22 15:04:52 -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 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;

View 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;

View 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;