aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-08-03 08:59:46 +0200
committerJan Beulich <jbeulich@suse.com>2022-08-03 08:59:46 +0200
commit2c735193b829aff44b37244205334bf71be9b814 (patch)
tree619913e5ccd9959b8868ee013b74bdd9d869837b /gas
parent8aaafe957ceee581e691d2f7f984cb40c58f2b5e (diff)
downloadbinutils-2c735193b829aff44b37244205334bf71be9b814.zip
binutils-2c735193b829aff44b37244205334bf71be9b814.tar.gz
binutils-2c735193b829aff44b37244205334bf71be9b814.tar.bz2
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.c14
1 files changed, 7 insertions, 7 deletions
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)