x86: Set EVex=2 on EVEX.128 only vmovd and vmovq
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 17 Sep 2018 16:33:20 +0000 (09:33 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 17 Sep 2018 16:33:35 +0000 (09:33 -0700)
commit04e2a1829ea137ac23ac96e98fd60f9d720dcdcb
tree6d9faae8d1067468634733e7b98c690cf8eae58d
parentd5f787c2bc90793c1d781b7291758e77067daad5
x86: Set EVex=2 on EVEX.128 only vmovd and vmovq

EVEX "VMOVD xmm1, r32/m32", "VMOVD r32/m32, xmm2", "VMOVQ xmm1, r64/m64",
"VMOVD r64/m64, xmm2", "VMOVQ xmm1, xmm2/m64" and "VMOVQ xmm1/m64, xmm2"
can only be encoded with EVEX.128.  Set EVex=2 on EVEX.128 only vmovd and
vmovq.

gas/

PR gas/23670
* testsuite/gas/i386/evex-lig-2.d: New file.
* testsuite/gas/i386/evex-lig-2.s: Likewise.
* testsuite/gas/i386/x86-64-evex-lig-2.d: Likewise.
* testsuite/gas/i386/x86-64-evex-lig-2.s: Likewise.
* testsuite/gas/i386/i386.exp: Run evex-lig-2 and
x86-64-evex-lig-2.

opcodes/

PR gas/23670
* i386-dis-evex.h (evex_table): Use EVEX_LEN_0F6E_P_2,
EVEX_LEN_0F7E_P_1, EVEX_LEN_0F7E_P_2 and EVEX_LEN_0FD6_P_2.
(EVEX_LEN_0F6E_P_2): New EVEX_LEN_TABLE entry.
(EVEX_LEN_0F7E_P_1): Likewise.
(EVEX_LEN_0F7E_P_2): Likewise.
(EVEX_LEN_0FD6_P_2): Likewise.
* i386-dis.c (USE_EVEX_LEN_TABLE): New.
(EVEX_LEN_TABLE): Likewise.
(EVEX_LEN_0F6E_P_2): New enum.
(EVEX_LEN_0F7E_P_1): Likewise.
(EVEX_LEN_0F7E_P_2): Likewise.
(EVEX_LEN_0FD6_P_2): Likewise.
(evex_len_table): New.
(get_valid_dis386): Handle USE_EVEX_LEN_TABLE.
* i386-opc.tbl: Set EVex=2 on EVEX.128 only vmovd and vmovq.
* i386-tbl.h: Regenerated.
gas/ChangeLog
gas/testsuite/gas/i386/evex-lig-2.d [new file with mode: 0644]
gas/testsuite/gas/i386/evex-lig-2.s [new file with mode: 0644]
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/x86-64-evex-lig-2.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-evex-lig-2.s [new file with mode: 0644]
opcodes/ChangeLog
opcodes/i386-dis-evex.h
opcodes/i386-dis.c
opcodes/i386-opc.tbl
opcodes/i386-tbl.h