From: Ken Thompson Date: Thu, 29 Jan 2009 23:13:36 +0000 (-0800) Subject: optimizer bug w STOstring X-Git-Tag: weekly.2009-11-06~2268 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4f49b88dda80a80ec1272447e3a2ca219b6c0436;p=gostls13.git optimizer bug w STOstring R=r OCL=23820 CL=23820 --- diff --git a/src/cmd/6c/peep.c b/src/cmd/6c/peep.c index 77c034b07b..2800d58c2a 100644 --- a/src/cmd/6c/peep.c +++ b/src/cmd/6c/peep.c @@ -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; diff --git a/src/cmd/6g/peep.c b/src/cmd/6g/peep.c index cdf8a8bc35..c84ff3ce72 100644 --- a/src/cmd/6g/peep.c +++ b/src/cmd/6g/peep.c @@ -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; diff --git a/src/cmd/8c/peep.c b/src/cmd/8c/peep.c index b30a57b0a2..64ce5fa786 100644 --- a/src/cmd/8c/peep.c +++ b/src/cmd/8c/peep.c @@ -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;