The following instruction produced by objdump cannot be assembled with gas due to an error. Bytes: c5 ac 46 f5 Instruction: kxnorw %k5, k2, %k6 ERROR: operand size mismatch for `kxnorw' By changing the second operand to "%k2" instead of "k2", the output could be reassembled. I'm not sure if this should be reported to gas as well to allow the "k2" syntax in addition to "%k2", but I think objdump should be producing valid assembly regardless.
The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9889cbb14ebea4b281408afcfd94ad6646ab370a commit 9889cbb14ebea4b281408afcfd94ad6646ab370a Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Oct 20 15:07:42 2016 -0700 Check invalid mask registers In 32-bit, the REX_B bit in the 3-byte VEX prefix is ignored and the the highest bit in VEX.vvvv is either 1 or ignored. In 64-bit, we need to check invalid mask registers. gas/ PR binutis/20705 * testsuite/gas/i386/i386.exp: Run x86-64-opcode-bad. * testsuite/gas/i386/x86-64-opcode-bad.d: New file. * testsuite/gas/i386/x86-64-opcode-bad.s: Likewise. opcodes/ PR binutis/20705 * i386-dis.c (get_valid_dis386): Ignore the REX_B bit and the highest bit in VEX.vvvv for the 3-byte VEX prefix in 32-bit mode. Don't check vex.register_specifier in 32-bit mode. (OP_E_register): Check invalid mask registers. (OP_G): Likewise. (OP_VEX): Likewise.
Fixed.