[PATCH] i386: Check vector length for vshufXXX/vinsertXXX/vextractXXX

H.J. Lu hjl.tools@gmail.com
Mon Jun 17 17:12:00 GMT 2019


Since not all vector lengths are supported by vshufXXX, vinsertXXX and
vextractXXX, decode them only with supported vector lengths.

gas/

PR binutils/24691
* testsuite/gas/i386/disassem.s: Add tests for invalid vector
lengths for vshuff32x4.
* testsuite/gas/i386/x86-64-disassem.s: Likewise.
* testsuite/gas/i386/disassem.d: Updated.
* testsuite/gas/i386/x86-64-disassem.d: Likewise.

opcodes/

PR binutils/24691
* i386-dis-evex.h (evex_table): Update EVEX_W_0F3A23_P_2,
EVEX_W_0F3A38_P_2, EVEX_W_0F3A39_P_2, EVEX_W_0F3A3A_P_2,
EVEX_W_0F3A3B_P_2 and EVEX_W_0F3A43_P_2.
(evex_len_table): Add EVEX_LEN_0F3A23_P_2_W_0,
EVEX_LEN_0F3A23_P_2_W_1, EVEX_LEN_0F3A38_P_2_W_0,
EVEX_LEN_0F3A38_P_2_W_1, EVEX_LEN_0F3A39_P_2_W_0,
EVEX_LEN_0F3A39_P_2_W_1, EVEX_LEN_0F3A3A_P_2_W_0,
EVEX_LEN_0F3A3A_P_2_W_1, EVEX_LEN_0F3A3B_P_2_W_0,
EVEX_LEN_0F3A3B_P_2_W_1, EVEX_LEN_0F3A43_P_2_W_0 and
EVEX_LEN_0F3A43_P_2_W_1.
* i386-dis.c (EVEX_LEN_0F3A23_P_2_W_0): New enum.
(EVEX_LEN_0F3A23_P_2_W_1): Likewise.
(EVEX_LEN_0F3A38_P_2_W_0): Likewise.
(EVEX_LEN_0F3A38_P_2_W_1): Likewise.
(EVEX_LEN_0F3A39_P_2_W_0): Likewise.
(EVEX_LEN_0F3A39_P_2_W_1): Likewise.
(EVEX_LEN_0F3A3A_P_2_W_0): Likewise.
(EVEX_LEN_0F3A3A_P_2_W_1): Likewise.
(EVEX_LEN_0F3A3B_P_2_W_0): Likewise.
(EVEX_LEN_0F3A3B_P_2_W_1): Likewise.
(EVEX_LEN_0F3A43_P_2_W_0): Likewise.
(EVEX_LEN_0F3A43_P_2_W_1): Likewise.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-i386-Check-vector-length-for-vshufXXX-vinsertXXX-vex.patch
Type: text/x-patch
Size: 8774 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20190617/4b2fd5bc/attachment.bin>


More information about the Binutils mailing list