From 50ad3372383a8d47804a213b870eb32e251ca18b Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Mon, 5 Oct 2015 23:16:51 +0200 Subject: [PATCH] runtime: don't use duffcopy on Plan 9 In CL 14836, the implementation of duffcopy on amd64 was changed to replace the use of the MOVQ instructions by MOVUPS. However, it broke the build on plan9/amd64, since Plan 9 doesn't allow floating point in note handler. This change disables the use of duffcopy on Plan 9. Fixes #12829. Change-Id: Ifd5b17b17977a1b631b16c3dfe2dc7ab4ad00507 Reviewed-on: https://go-review.googlesource.com/15421 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Reviewed-by: Keith Randall --- src/cmd/compile/internal/amd64/cgen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/compile/internal/amd64/cgen.go b/src/cmd/compile/internal/amd64/cgen.go index dc1a9f3beb..4b00003018 100644 --- a/src/cmd/compile/internal/amd64/cgen.go +++ b/src/cmd/compile/internal/amd64/cgen.go @@ -80,7 +80,7 @@ func blockcopy(n, ns *gc.Node, osrc, odst, w int64) { gins(x86.ACLD, nil, nil) } else { // normal direction - if q > 128 || (gc.Nacl && q >= 4) { + if q > 128 || (gc.Nacl && q >= 4) || (obj.Getgoos() == "plan9" && q >= 4) { gconreg(movptr, q, x86.REG_CX) gins(x86.AREP, nil, nil) // repeat gins(x86.AMOVSQ, nil, nil) // MOVQ *(SI)+,*(DI)+ -- 2.50.0