]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: add s390x support (modified files only)
authorMichael Munday <munday@ca.ibm.com>
Fri, 18 Mar 2016 23:02:52 +0000 (19:02 -0400)
committerMinux Ma <minux@golang.org>
Wed, 6 Apr 2016 04:25:06 +0000 (04:25 +0000)
Change-Id: Ib79ad4a890994ad64edb1feb79bd242d26b5b08a
Reviewed-on: https://go-review.googlesource.com/20945
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/runtime/cgocall.go
src/runtime/extern.go
src/runtime/gcinfo_test.go
src/runtime/hash64.go
src/runtime/noasm.go
src/runtime/os1_linux_generic.go
src/runtime/os2_linux_generic.go
src/runtime/runtime-gdb_test.go
src/runtime/unaligned1.go

index d5248803a48f86b4893a5435e310085b5938da31..c6000bf98f704c1cbadddbbdd35d650d4c83e709 100644 (file)
@@ -246,8 +246,8 @@ func cgocallbackg1() {
        case "386":
                // On 386, stack frame is three words, plus caller PC.
                cb = (*args)(unsafe.Pointer(sp + 4*sys.PtrSize))
-       case "ppc64", "ppc64le":
-               // On ppc64, the callback arguments are in the arguments area of
+       case "ppc64", "ppc64le", "s390x":
+               // On ppc64 and s390x, the callback arguments are in the arguments area of
                // cgocallback's stack frame. The stack looks like this:
                // +--------------------+------------------------------+
                // |                    | ...                          |
@@ -300,7 +300,7 @@ func unwindm(restore *bool) {
        switch GOARCH {
        default:
                throw("unwindm not implemented")
-       case "386", "amd64", "arm", "ppc64", "ppc64le":
+       case "386", "amd64", "arm", "ppc64", "ppc64le", "s390x":
                sched.sp = *(*uintptr)(unsafe.Pointer(sched.sp + sys.MinFrameSize))
        case "arm64":
                sched.sp = *(*uintptr)(unsafe.Pointer(sched.sp + 16))
index 984b0ca81712ec6d503b37ae7a71a0f7fcb52805..1d8304f4fc36fdf485c41cd32a0a84484ed3f50d 100644 (file)
@@ -227,5 +227,5 @@ func Version() string {
 const GOOS string = sys.TheGoos
 
 // GOARCH is the running program's architecture target:
-// 386, amd64, or arm.
+// 386, amd64, arm, or s390x.
 const GOARCH string = sys.TheGoarch
index edb63616429d74953f1c3a4a9fcf174aa5af7d6f..c1c2354bf93fb317e81fabf0eee6cddff14e7c77 100644 (file)
@@ -144,7 +144,7 @@ func infoBigStruct() []byte {
                        typeScalar, typeScalar, typeScalar, typeScalar, // t int; y uint16; u uint64
                        typePointer, typeScalar, // i string
                }
-       case "arm64", "amd64", "mips64", "mips64le", "ppc64", "ppc64le":
+       case "arm64", "amd64", "mips64", "mips64le", "ppc64", "ppc64le", "s390x":
                return []byte{
                        typePointer,                        // q *int
                        typeScalar, typeScalar, typeScalar, // w byte; e [17]byte
index fb3dba40004cdf7fb0955357b571a3dfb6cdb09a..d61f114475aa9887793ce2bd83451b4cf178bcfe 100644 (file)
@@ -6,7 +6,7 @@
 //   xxhash: https://code.google.com/p/xxhash/
 // cityhash: https://code.google.com/p/cityhash/
 
-// +build amd64 amd64p32 arm64 mips64 mips64le ppc64 ppc64le
+// +build amd64 amd64p32 arm64 mips64 mips64le ppc64 ppc64le s390x
 
 package runtime
 
index 351e325f4f2f5e6ab632f40cda62e5570e0ae532..0a8f9e6f52dcd8548676743e0d771d6f5e99e6e0 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Routines that are implemented in assembly in asm_{amd64,386,arm,arm64,ppc64x}.s
+// Routines that are implemented in assembly in asm_{amd64,386,arm,arm64,ppc64x,s390x}.s
 
 // +build mips64 mips64le
 
index 2c8b743aeb0bce57830fe139f2a985ef6b817f90..50d6d6afb4b2a5342263f9da949c506b5b4ba52c 100644 (file)
@@ -4,6 +4,7 @@
 
 // +build !mips64
 // +build !mips64le
+// +build !s390x
 // +build linux
 
 package runtime
index 01e6c8a5ec857f4bd8529fc3a062ef2c93eaf0a2..f1a2dd513051779d7ec79a9ba049a9d7ca7a7fda 100644 (file)
@@ -4,6 +4,7 @@
 
 // +build !mips64
 // +build !mips64le
+// +build !s390x
 // +build linux
 
 package runtime
index 110d99064fc5ac8f345e08b6770fc6030b8e5342..7cfcefc2c23f5bb83987bdede35f8f6df18ab9b2 100644 (file)
@@ -104,7 +104,7 @@ func TestGdbPython(t *testing.T) {
        // stack frames on RISC architectures.
        canBackTrace := false
        switch runtime.GOARCH {
-       case "amd64", "386", "ppc64", "ppc64le", "arm", "arm64", "mips64", "mips64le":
+       case "amd64", "386", "ppc64", "ppc64le", "arm", "arm64", "mips64", "mips64le", "s390x":
                canBackTrace = true
                args = append(args,
                        "-ex", "echo BEGIN goroutine 2 bt\n",
index 6bd901835248d6761e9a4aee7ab2967307f9d9cd..754d63b4173438a35bb0015638ed2f31765b5ec6 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build 386 amd64 amd64p32 arm64 ppc64 ppc64le
+// +build 386 amd64 amd64p32 arm64 ppc64 ppc64le s390x
 
 package runtime