]> Cypherpunks repositories - gostls13.git/commit
syscall: add support for s390x
authorMichael Munday <munday@ca.ibm.com>
Thu, 31 Mar 2016 03:56:49 +0000 (23:56 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 3 Apr 2016 22:12:35 +0000 (22:12 +0000)
commitaf74dca49732d5953331d14dc06ec635838c357c
tree6f3e305d431679b6a1f336bd44fe54aebdbeaa27
parentfe5be5aced063a16c5c36051045f8f8af313bed9
syscall: add support for s390x

On s390x char is unsigned. We cannot force it to be signed using
-fsigned-char (see arm64) because the s390x gccgo API is already
public and we need to stick as closely as possible to it to avoid
breaking existing projects. In order to match the gccgo API we
also force the RawSockaddr.Data and RawSockaddrUnix.Path fields
to be signed.

This CL adds a post-processing pass (mkpost.go) to mkall.sh in
order to export the types of fields in PtraceRegs on s390x
without affecting the API on other platforms. The types of these
fields match their counterparts in gccgo. mkpost.go also cleans
up the Pad_cgo* fields and X_* fields (these fields are not
exported by gccgo currently). It could be extended to add build
tags on platforms that need them.

Change-Id: I66bdf5b86ec98af70baf666989027bb354df9e3e
Reviewed-on: https://go-review.googlesource.com/20961
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/syscall/mkall.sh
src/syscall/mkpost.go [new file with mode: 0644]
src/syscall/syscall_linux_s390x.go [new file with mode: 0644]
src/syscall/types_linux.go
src/syscall/zerrors_linux_s390x.go [new file with mode: 0644]
src/syscall/zsyscall_linux_s390x.go [new file with mode: 0644]
src/syscall/zsysnum_linux_s390x.go [new file with mode: 0644]
src/syscall/ztypes_linux_s390x.go [new file with mode: 0644]