]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: generate dummy duffcopy
authorCherry Zhang <cherryyz@google.com>
Tue, 31 Mar 2020 23:13:39 +0000 (19:13 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 31 Mar 2020 23:54:09 +0000 (23:54 +0000)
Although duffcopy is not used on PPC64, duff_ppc64x.s and
mkduff.go don't match. Make it so.

Fixes #38188.

Change-Id: Ic6c08e335795ea407880efd449f4229696af7744
Reviewed-on: https://go-review.googlesource.com/c/go/+/226719
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/runtime/duff_ppc64x.s
src/runtime/mkduff.go

index 0c62d0afe9a3eab1ef871cabb0292dc5ff99dd5c..d6b89ba9401cee6a76622fc4c035b3d6458d7abd 100644 (file)
@@ -137,7 +137,5 @@ TEXT runtime·duffzero(SB), NOSPLIT|NOFRAME, $0-0
        MOVDU   R0, 8(R3)
        RET
 
-// TODO: Implement runtime·duffcopy.
-TEXT runtime·duffcopy(SB),NOSPLIT|NOFRAME,$0-0
-       MOVD    R0, 0(R0)
-       RET
+TEXT runtime·duffcopy(SB), NOSPLIT|NOFRAME, $0-0
+       UNDEF
index 6ac5e7da44732e496535bc2c7743dcada29eb374..6c7a4cf8dc7e218ca527066cad3cdec697ff77eb 100644 (file)
@@ -194,7 +194,9 @@ func zeroPPC64x(w io.Writer) {
 }
 
 func copyPPC64x(w io.Writer) {
-       fmt.Fprintln(w, "// TODO: Implement runtime·duffcopy.")
+       // duffcopy is not used on PPC64.
+       fmt.Fprintln(w, "TEXT runtime·duffcopy(SB), NOSPLIT|NOFRAME, $0-0")
+       fmt.Fprintln(w, "\tUNDEF")
 }
 
 func tagsMIPS64x(w io.Writer) {