aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-02-10 08:14:27 +0100
committerJan Beulich <jbeulich@suse.com>2023-02-10 08:14:27 +0100
commitba3ffa6de0510892bf8020188d834f24ea8b7f75 (patch)
tree0da07011127495904de23202f5cac9255d08ae4b /gas
parentddb62495930cc8adf4986334b49104d623b0217d (diff)
downloadgdb-ba3ffa6de0510892bf8020188d834f24ea8b7f75.zip
gdb-ba3ffa6de0510892bf8020188d834f24ea8b7f75.tar.gz
gdb-ba3ffa6de0510892bf8020188d834f24ea8b7f75.tar.bz2
x86: limit use of XOP2SOURCES
The VPROT* forms with an immediate operand are entirely standard in the way their ModR/M bytes are built. There's no reason to invoke special case code. With that the handling of an immediate there can also be dropped; it was partially bogus anyway, as in its "no memory operands" portion it ignores the possibility of an immediate operand (which was okay only because that case was already handled by more generic code).
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 79ca9e1..01b10c1 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -8620,17 +8620,11 @@ build_modrm_byte (void)
if (i.tm.opcode_modifier.vexsources == XOP2SOURCES)
{
- if (operand_type_check (i.types[0], imm))
- i.vex.register_specifier = NULL;
+ /* VEX.vvvv encodes one of the sources. */
+ if (i.tm.opcode_modifier.vexw == VEXW0)
+ i.vex.register_specifier = i.op[0].regs;
else
- {
- /* VEX.vvvv encodes one of the sources when the first
- operand is not an immediate. */
- if (i.tm.opcode_modifier.vexw == VEXW0)
- i.vex.register_specifier = i.op[0].regs;
- else
- i.vex.register_specifier = i.op[1].regs;
- }
+ i.vex.register_specifier = i.op[1].regs;
/* Destination is a XMM register encoded in the ModRM.reg
and VEX.R bit. */