x86: Remove the prefix byte from non-VEX/EVEX base_opcode
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 14 Oct 2020 11:17:54 +0000 (04:17 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 14 Oct 2020 11:20:55 +0000 (04:20 -0700)
commit8b65b8953af2d49ae1d2d7fcc5b49c5308febbc1
tree6787d9d057850f28f7fd940774843b80871ab90b
parent8c8bd0babc6039a4cef7d60d57b1b68e7a7f2e70
x86: Remove the prefix byte from non-VEX/EVEX base_opcode

Replace the prefix byte in non-VEX/EVEX base_opcode with PREFIX_0X66,
PREFIX_0XF2 or PREFIX_0XF3.

gas/

* config/tc-i386.c (load_insn_p): Check opcodeprefix == 0 for
base_opcode == 0xfc7.
(match_template): Likewise.
(process_suffix): Check opcodeprefix == PREFIX_0XF2 for CRC32.
(check_byte_reg): Likewise.
(output_insn): Don't add the 0xf3 prefix twice for PadLock
instructions.  Don't add prefix from non-VEX/EVEX base_opcode.

opcodes/

* i386-gen.c (process_i386_opcode_modifier): Return 1 for
non-VEX/EVEX/prefix encoding.
(output_i386_opcode): Fail if non-VEX/EVEX/prefix base_opcode
has a prefix byte.
* i386-opc.tbl: Replace the prefix byte in non-VEX/EVEX
base_opcode with PREFIX_0X66, PREFIX_0XF2 or PREFIX_0XF3.
* i386-tbl.h: Regenerated.
gas/ChangeLog
gas/config/tc-i386.c
opcodes/ChangeLog
opcodes/i386-gen.c
opcodes/i386-opc.tbl
opcodes/i386-tbl.h