Commit d2c68bb6 authored by isharipo's avatar isharipo Committed by Ilya Tocar

cmd/internal/obj/x86: fix VPERMQ and VPERMPD ytab

Fixes invalid encoding of VPERMQ and VPERMPD that use
negative immediate argument.

Fixes #25418
Updates #25420

Change-Id: Idd8180c4c632a76b76f3a68efd5f930d94431994
Reviewed-on: https://go-review.googlesource.com/113615
Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
Reviewed-by: default avatarIlya Tocar <ilya.tocar@intel.com>
parent 74604bb5
...@@ -294,8 +294,11 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0 ...@@ -294,8 +294,11 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0
SHA256MSG2 X2, X11 // 440f38cdda SHA256MSG2 X2, X11 // 440f38cdda
SHA256MSG2 X11, X11 // 450f38cddb SHA256MSG2 X11, X11 // 450f38cddb
// Test VPERMQ with both uint8 and int8 immediate args // Test VPERMQ with both uint8 and int8 immediate args
VPERMQ $-40, Y8, Y8 // c4407800c0d8 VPERMQ $-40, Y8, Y8 // c443fd00c0d8
VPERMQ $216, Y8, Y8 // c443fd00c0d8 VPERMQ $216, Y8, Y8 // c443fd00c0d8
// Test that VPERMPD that shares ytab list with VPERMQ continues to work too.
VPERMPD $-40, Y7, Y7 // c4e3fd01ffd8
VPERMPD $216, Y7, Y7 // c4e3fd01ffd8
// Check that LEAL is permitted to use overflowing offset. // Check that LEAL is permitted to use overflowing offset.
LEAL 2400959708(BP)(R10*1), BP // 428dac15dcbc1b8f LEAL 2400959708(BP)(R10*1), BP // 428dac15dcbc1b8f
LEAL 3395469782(AX)(R10*1), AX // 428d8410d6c162ca LEAL 3395469782(AX)(R10*1), AX // 428d8410d6c162ca
......
...@@ -931,7 +931,7 @@ var yvex_xi3 = []ytab{ ...@@ -931,7 +931,7 @@ var yvex_xi3 = []ytab{
} }
var yvex_vpermpd = []ytab{ var yvex_vpermpd = []ytab{
{Zvex_i_rm_r, 2, argList{Yu8, Yym, Yyr}}, {Zvex_i_rm_r, 0, argList{Yu8, Yym, Yyr}},
// Allow int8 for backwards compatibility with negative values // Allow int8 for backwards compatibility with negative values
// like $-1. // like $-1.
{Zvex_i_rm_r, 2, argList{Yi8, Yym, Yyr}}, {Zvex_i_rm_r, 2, argList{Yi8, Yym, Yyr}},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment