Go version
go 1.24
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='s390x'
GOBIN='/root/go/bin'
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='s390x'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/root/go_compiler/dev/go_src'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/root/go_compiler/dev/go_src/pkg/tool/linux_s390x'
GOVCS=''
GOVERSION='devel go1.24-fc9f02c7ae Sun Sep 1 15:47:54 2024 +0000'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/root/.config/go/telemetry'
GCCGO='gccgo'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/root/go_compiler/dev/go_src/src/cmd/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -march=z196 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1827913230=/tmp/go-build -gno-record-gcc-switches'
What did you do?
- Add all possible VSTRC vector instructions to the go asm file
- go tool asm <*.s> -o
- go tool objdump -gnu
What did you see happen?
s390x assembler emitting incorrectly VSTRC vector instruction for few of extended mnemonics. VSTRC V2, V4, V6, V3 VSTRCB V2, V4, V6, V8 VSTRCH V2, V4, V6, V8 VSTRCF V2, V4, V6, V8 VSTRCBS V2, V4, V6, V8 VSTRCHS V2, V4, V6, V8 VSTRCFS V2, V4, V6, V8 VSTRCZB V2, V4, V6, V8 VSTRCZH V2, V4, V6, V8 VSTRCZF V2, V4, V6, V8 VSTRCZBS V2, V4, V6, V8 VSTRCZHS V2, V4, V6, V8 VSTRCZFS V2, V4, V6, V8
when we do assembly of go asm(*.s) file with above instructions(go tool asm
What did you expect to see?
Need to fix in the codegen part of s390x assembler which handles code emitting.
Comment From: gabyhelp
Related Issues and Documentation
- cmd/asm: VFMA and VFMS incorrectly encoded on s390x #17444 (closed)
- cmd/asm: s390x tests are suspicious #18295 (closed)
- cmd/compile: linux/s390x: inlining bug in s390x #64468 (closed)
- cmd/internal/obj/s390x: panic on assembling invalid FMA instruction #26700 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: srinivas-pokala
I have fixed the issue and verified locally on my machine, will the raise CL for the same.
Comment From: gopherbot
Change https://go.dev/cl/612315 mentions this issue: cmd/internal/obj/s390x: VSTRC vector instruction emits