aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-09-06 08:35:42 +0200
committerJan Beulich <jbeulich@suse.com>2024-09-06 08:35:42 +0200
commit4eb59a5243cbca011c58274a20235a163243f97f (patch)
tree3a3f44977a22caa310fb6f0ceedb3d55bc40278c /gas
parent6b8ed67d6e53aa2c5527b73848c97a8a40c07e17 (diff)
downloadgdb-4eb59a5243cbca011c58274a20235a163243f97f.zip
gdb-4eb59a5243cbca011c58274a20235a163243f97f.tar.gz
gdb-4eb59a5243cbca011c58274a20235a163243f97f.tar.bz2
x86/APX: use D for 2-operand CFCMOVcc
There's no need to have 30 redundant templates when we can easily take care of the operand swapping like we do for various other insns.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 50c6f03..6cd57d9 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -8878,7 +8878,10 @@ match_template (char mnem_suffix)
found_reverse_match = Opcode_D;
goto check_operands_345;
}
- else if (t->opcode_modifier.commutative)
+ else if (t->opcode_modifier.commutative
+ /* CFCMOVcc also wants its major opcode unaltered. */
+ || (t->opcode_space == SPACE_EVEXMAP4
+ && (t->base_opcode | 0xf) == 0x4f))
found_reverse_match = ~0;
else if (t->opcode_space != SPACE_BASE
&& (t->opcode_space != SPACE_EVEXMAP4
@@ -9178,6 +9181,9 @@ match_template (char mnem_suffix)
/* Fall through. */
case ~0:
+ if (i.tm.opcode_space == SPACE_EVEXMAP4
+ && !t->opcode_modifier.commutative)
+ i.tm.opcode_modifier.operandconstraint = EVEX_NF;
i.tm.operand_types[0] = operand_types[i.operands - 1];
i.tm.operand_types[i.operands - 1] = operand_types[0];
break;