]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj/x86: fix VPERMQ and VPERMPD ytab
authorisharipo <iskander.sharipov@intel.com>
Thu, 17 May 2018 15:20:53 +0000 (18:20 +0300)
committerIlya Tocar <ilya.tocar@intel.com>
Thu, 17 May 2018 16:20:25 +0000 (16:20 +0000)
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: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
src/cmd/asm/internal/asm/testdata/amd64enc_extra.s
src/cmd/internal/obj/x86/asm6.go

index 8839704ae0b956b62ec4571c4e321da74c927751..7fd481abf3275e9aacc068ff8e926aae6a468b55 100644 (file)
@@ -294,8 +294,11 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0
        SHA256MSG2 X2, X11       // 440f38cdda
        SHA256MSG2 X11, X11      // 450f38cddb
        // Test VPERMQ with both uint8 and int8 immediate args
-       VPERMQ $-40, Y8, Y8 // c4407800c0d8
+       VPERMQ $-40, 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.
        LEAL 2400959708(BP)(R10*1), BP // 428dac15dcbc1b8f
        LEAL 3395469782(AX)(R10*1), AX // 428d8410d6c162ca
index 8da842340f19b196e3fd91a339501bb1bfd7f1a2..3a7689e28d2822569b2e422c044e73e9721869ff 100644 (file)
@@ -931,7 +931,7 @@ var yvex_xi3 = []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
        // like $-1.
        {Zvex_i_rm_r, 2, argList{Yi8, Yym, Yyr}},