From 2c735193b829aff44b37244205334bf71be9b814 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 3 Aug 2022 08:59:46 +0200 Subject: x86: also use D for MOVBE First of all rename the meanwhile misleading Opcode_SIMD_FloatD, as it has also been used for KMOV* and BNDMOV. Then simplify the condition selecting which form if "reversing" to use - except for the MOV to/from control/debug/test registers all extended opcode space insns use bit 0 (rather than bit 1) to indicate the direction (from/to memory) of an operation. With that, D can simply be set on the first of the two templates, while the other can be dropped. --- gas/config/tc-i386.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gas') diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 15520e5..78dad4e 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -3572,7 +3572,7 @@ build_vex_prefix (const insn_template *t) if (i.tm.opcode_modifier.d) i.tm.base_opcode ^= (i.tm.base_opcode & 0xee) != 0x6e - ? Opcode_SIMD_FloatD : Opcode_SIMD_IntD; + ? Opcode_ExtD : Opcode_SIMD_IntD; else /* Use the next insn. */ install_template (&t[1]); } @@ -6753,13 +6753,13 @@ match_template (char mnem_suffix) found_reverse_match = Opcode_VexW; goto check_operands_345; } - else if (operand_types[0].bitfield.xmmword - || operand_types[i.operands - 1].bitfield.xmmword - || operand_types[0].bitfield.class == RegMMX - || operand_types[i.operands - 1].bitfield.class == RegMMX - || is_any_vex_encoding(t)) + else if (t->opcode_modifier.opcodespace != SPACE_BASE + && (t->opcode_modifier.opcodespace != SPACE_0F + /* MOV to/from CR/DR/TR, as an exception, follow + the base opcode space encoding model. */ + || (t->base_opcode | 7) != 0x27)) found_reverse_match = (t->base_opcode & 0xee) != 0x6e - ? Opcode_SIMD_FloatD : Opcode_SIMD_IntD; + ? Opcode_ExtD : Opcode_SIMD_IntD; else found_reverse_match = Opcode_D; if (t->opcode_modifier.floatr) -- cgit v1.1