]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix ppc64le c-archive init
authorIan Lance Taylor <iant@golang.org>
Wed, 24 May 2017 22:01:49 +0000 (15:01 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 24 May 2017 22:28:33 +0000 (22:28 +0000)
We weren't setting r0 to 0, as required by our generated code.

Before this patch, the misc/cgo/testcarchive tests failed on ppc64le.
After this patch, they work, so enable them.

Change-Id: I53b16746961da9f7c34f59030a1e40953c9c1e05
Reviewed-on: https://go-review.googlesource.com/44093
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/dist/test.go
src/runtime/rt0_linux_ppc64le.s

index fc2b58a0823f1320daed44879e506870914c68d7..b56495e723a0cc3ccca3cef086cf75ad0ed906cd 100644 (file)
@@ -772,7 +772,8 @@ func (t *tester) supportedBuildmode(mode string) bool {
                }
                switch pair {
                case "darwin-386", "darwin-amd64", "darwin-arm", "darwin-arm64",
-                       "linux-amd64", "linux-386", "windows-amd64", "windows-386":
+                       "linux-amd64", "linux-386", "linux-ppc64le",
+                       "windows-amd64", "windows-386":
                        return true
                }
                return false
index 2c5541357f2af77c896bf9471ea7bca19a7330af..bcbc9c7b31c31fce1712190d2f48f8c9dc33c375 100644 (file)
@@ -53,6 +53,9 @@ TEXT _rt0_ppc64le_linux_lib(SB),NOSPLIT,$-8
        MOVD    R4, _rt0_ppc64le_linux_lib_argv<>(SB)
 
        // Synchronous initialization.
+       MOVD    $runtime·reginit(SB), R12
+       MOVD    R12, CTR
+       BL      (CTR)
        MOVD    $runtime·libpreinit(SB), R12
        MOVD    R12, CTR
        BL      (CTR)