Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/internal: AVX2 instruction VPERMQ does not accept 8 bit constant #24516

Closed
aead opened this issue Mar 24, 2018 · 1 comment
Closed

cmd/internal: AVX2 instruction VPERMQ does not accept 8 bit constant #24516

aead opened this issue Mar 24, 2018 · 1 comment

Comments

@aead
Copy link
Contributor

aead commented Mar 24, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/andreas/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/andreas/go"
GORACE=""
GOROOT="/home/andreas/.go/1.10"
GOTMPDIR=""
GOTOOLDIR="/home/andreas/.go/1.10/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build007157077=/tmp/go-build -gno-record-gcc-switches"

What did you do?

TEXT ·foo(SB),4,$0-8
         VPERMQ $-40, Y0, Y0
         VPERMQ $216, Y0, Y0
         RET

What did you expect to see?

Assembler should generate valid op-codes.

What did you see instead?

Assembler fails with:
asm: invalid instruction: 00117 (foo_amd64.s:336) VPERMQ $216, Y0, Y0

Background

Both instructions are semantically equal: VPERMQ $-40, Y0, Y0 == VPERMQ $216, Y0, Y0
It seems to be similar to #16499 since negative constants work and produce correct results.

/cc @TocarIP

@mvdan
Copy link
Member

mvdan commented Mar 24, 2018

Duplicate of #24378, which is already fixed in tip.

@mvdan mvdan closed this as completed Mar 24, 2018
@golang golang locked and limited conversation to collaborators Mar 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants