i386: Check for reserved VEX.vvvv and EVEX.vvvv
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 4 Jun 2019 19:45:20 +0000 (12:45 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 4 Jun 2019 19:45:33 +0000 (12:45 -0700)
commit63c6fc6cacf82e6b39f7373d44c1e1e1a0a757fa
tree3e831fa004f9e57c096800067866fa1fd16107c6
parentad118caa9f690114d11384b0813f30980cc333f3
i386: Check for reserved VEX.vvvv and EVEX.vvvv

If VEX.vvvv and EVEX.vvvv are reserved, they must be all 1s, which are
all 0s in inverted form.  Add check for unused VEX.vvvv and EVEX.vvvv
when disassembling VEX and EVEX instructions.

gas/

PR binutils/24626
* testsuite/gas/i386/disassem.s: Add tests for reserved VEX.vvvv
and EVEX.vvvv.
* 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/24626
* i386-dis.c (print_insn): Check for unused VEX.vvvv and
EVEX.vvvv when disassembling VEX and EVEX instructions.
(OP_VEX): Set vex.register_specifier to 0 after readding
vex.register_specifier.
(OP_Vex_2src_1): Likewise.
(OP_Vex_2src_2): Likewise.
(OP_LWP_E): Likewise.
(OP_EX_Vex): Don't check vex.register_specifier.
(OP_XMM_Vex): Likewise.
gas/ChangeLog
gas/testsuite/gas/i386/disassem.d
gas/testsuite/gas/i386/disassem.s
gas/testsuite/gas/i386/x86-64-disassem.d
gas/testsuite/gas/i386/x86-64-disassem.s
opcodes/ChangeLog
opcodes/i386-dis.c