What version of Go are you using (go version)?
Tested with 1.10, 1.11beta2, and master
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/akhil/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/akhil/work"
GOPROXY=""
GORACE=""
GOROOT="/Users/akhil/Projects/go"
GOTMPDIR=""
GOTOOLDIR="/Users/akhil/Projects/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/13/_hxzb_513nv2zh71188hsczr0000gn/T/go-build504608614=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
I tried to build the following files: GOOS=linux GOARCH=s390x go build
main.go
package main
func asm()
func main() {}
asm_s390x.s
#include "textflag.h"
TEXT ·asm(SB),NOSPLIT,$0
FMADD F0, F1, F2, F3
RET
What did you expect to see?
The following output is with master (52cc9e3)
# _/Users/akhil/testgo/s390xasm
asm: illegal combination FMADD FREG FREG FREG FREG
asm: prog: 00000 (/Users/akhil/testgo/s390xasm/asm_s390x.s:4) FMADD F0, F1, F2, F3
What did you see instead?
# _/Users/akhil/testgo/s390xasm
asm: illegal combination FMADD FREG FREG FREG FREG
asm: prog: 00000 (/Users/akhil/testgo/s390xasm/asm_s390x.s:4) FMADD F0, F1, F2, F3
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x6 pc=0x112109d]
goroutine 1 [running]:
cmd/internal/obj/s390x.(*ctxtz).asmout(0xc0000d7be8, 0xc00006f790, 0xc0000d7bd0)
/Users/akhil/Projects/go/src/cmd/internal/obj/s390x/asmz.go:2615 +0x5d
cmd/internal/obj/s390x.spanz(0xc0000c6000, 0xc0000d0000, 0xc000040490)
/Users/akhil/Projects/go/src/cmd/internal/obj/s390x/asmz.go:444 +0x145
cmd/internal/obj.Flushplist(0xc0000c6000, 0xc0000d7e60, 0xc000040490, 0x0, 0x0)
/Users/akhil/Projects/go/src/cmd/internal/obj/plist.go:107 +0x6ab
main.main()
/Users/akhil/Projects/go/src/cmd/asm/main.go:75 +0x6e9
What version of Go are you using (
go version)?Tested with 1.10, 1.11beta2, and master
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env)?GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/akhil/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/akhil/work"
GOPROXY=""
GORACE=""
GOROOT="/Users/akhil/Projects/go"
GOTMPDIR=""
GOTOOLDIR="/Users/akhil/Projects/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/13/_hxzb_513nv2zh71188hsczr0000gn/T/go-build504608614=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
I tried to build the following files:
GOOS=linux GOARCH=s390x go buildmain.go
asm_s390x.s
What did you expect to see?
The following output is with master (52cc9e3)
What did you see instead?