]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: enable DUFFZERO in defframe on MIPS64
authorCherry Zhang <cherryyz@google.com>
Wed, 26 Oct 2016 20:17:54 +0000 (16:17 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 27 Oct 2016 15:34:45 +0000 (15:34 +0000)
DUFFZERO was disabled due to issue #12108. CL 27592 fixed it and
enabled DUFFZERO in general, but this one was forgotten.

Change-Id: I0476a3a0524c7b54218f7a747bdba76cd823fbc5
Reviewed-on: https://go-review.googlesource.com/32181
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/mips64/ggen.go

index 06f347488563d623d22ec50c05079fa704e25e3a..2af4a8b1ce620432605338981c9c92956ab89059 100644 (file)
@@ -67,10 +67,7 @@ func zerorange(p *obj.Prog, frame int64, lo int64, hi int64) *obj.Prog {
                for i := int64(0); i < cnt; i += int64(gc.Widthptr) {
                        p = gc.Appendpp(p, mips.AMOVV, obj.TYPE_REG, mips.REGZERO, 0, obj.TYPE_MEM, mips.REGSP, 8+frame+lo+i)
                }
-               // TODO(dfc): https://golang.org/issue/12108
-               // If DUFFZERO is used inside a tail call (see genwrapper) it will
-               // overwrite the link register.
-       } else if false && cnt <= int64(128*gc.Widthptr) {
+       } else if cnt <= int64(128*gc.Widthptr) {
                p = gc.Appendpp(p, mips.AADDV, obj.TYPE_CONST, 0, 8+frame+lo-8, obj.TYPE_REG, mips.REGRT1, 0)
                p.Reg = mips.REGSP
                p = gc.Appendpp(p, obj.ADUFFZERO, obj.TYPE_NONE, 0, 0, obj.TYPE_MEM, 0, 0)