]> Cypherpunks repositories - gostls13.git/commit
cmd/asm: VPERMQ's imm8 arg is an uint8
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 13 Mar 2018 20:37:05 +0000 (20:37 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 13 Mar 2018 21:29:45 +0000 (21:29 +0000)
commit1178e51a374f055e986c9a878500dd4136107076
treea1753d4c72beabfa89c2f9b31c705f54dac6108a
parent0dfc740e6837b9ae14951f3b3b973879a3070ac7
cmd/asm: VPERMQ's imm8 arg is an uint8

The imm8 argument consists of 4 2-bit indices, so it can take values up
to $255. However, the assembler was treating it as Yi8, which reads
"fits in int8". Add a Yu8 variant, to also keep backwards compatibility
with negative values possible with Yi8.

Fixes #24378.

Change-Id: I24ddb19c219b54d039a6c1bcdb903717d1c7c3b8
Reviewed-on: https://go-review.googlesource.com/100475
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/asm/internal/asm/testdata/amd64enc.s
src/cmd/internal/obj/x86/asm6.go