cmd/compile: ppc64le working, not optimized enough

This time with the cherry-pick from the proper patch of
the old CL.

Stack size increased.
Corrected NaN-comparison glitches.
Marked g register as clobbered by calls.
Fixed shared libraries.

live_ssa.go still disabled because of differences.
Presumably turning on more optimization will fix
both the stack size and the live_ssa.go glitches.

Enhanced debugging output for shared libs test.

Rebased onto master.

Updates #16010.

Change-Id: I40864faf1ef32c118fb141b7ef8e854498e6b2c4
Reviewed-on: https://go-review.googlesource.com/27159
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
David Chase 2016-08-15 13:51:00 -07:00
parent dea6dab40c
commit 5b9ff11c3d
17 changed files with 121 additions and 128 deletions

View file

@ -97,6 +97,9 @@ func testMain(m *testing.M) (int, error) {
if gorootInstallDir == "" {
return 0, errors.New("could not create temporary directory after 10000 tries")
}
if testing.Verbose() {
fmt.Printf("+ mkdir -p %s\n", gorootInstallDir)
}
defer os.RemoveAll(gorootInstallDir)
// Some tests need to edit the source in GOPATH, so copy this directory to a
@ -105,6 +108,9 @@ func testMain(m *testing.M) (int, error) {
if err != nil {
return 0, fmt.Errorf("TempDir failed: %v", err)
}
if testing.Verbose() {
fmt.Printf("+ mkdir -p %s\n", scratchDir)
}
defer os.RemoveAll(scratchDir)
err = filepath.Walk(".", func(path string, info os.FileInfo, err error) error {
scratchPath := filepath.Join(scratchDir, path)
@ -112,12 +118,18 @@ func testMain(m *testing.M) (int, error) {
if path == "." {
return nil
}
if testing.Verbose() {
fmt.Printf("+ mkdir -p %s\n", scratchPath)
}
return os.Mkdir(scratchPath, info.Mode())
} else {
fromBytes, err := ioutil.ReadFile(path)
if err != nil {
return err
}
if testing.Verbose() {
fmt.Printf("+ cp %s %s\n", path, scratchPath)
}
return ioutil.WriteFile(scratchPath, fromBytes, info.Mode())
}
})
@ -125,7 +137,13 @@ func testMain(m *testing.M) (int, error) {
return 0, fmt.Errorf("walk failed: %v", err)
}
os.Setenv("GOPATH", scratchDir)
if testing.Verbose() {
fmt.Printf("+ export GOPATH=%s\n", scratchDir)
}
myContext.GOPATH = scratchDir
if testing.Verbose() {
fmt.Printf("+ cd %s\n", scratchDir)
}
os.Chdir(scratchDir)
// All tests depend on runtime being built into a shared library. Because