aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-01-04 10:05:53 +0100
committerJan Beulich <jbeulich@suse.com>2022-01-04 10:05:53 +0100
commit125ff8197df74cd3108e36d271267c798cd0e15f (patch)
tree694afa99f47a2f6212eb1d6ace96a956d7180b6b /gas/config
parent5ed4d49d107c46670a7994711f0284776a35284e (diff)
downloadgdb-125ff8197df74cd3108e36d271267c798cd0e15f.zip
gdb-125ff8197df74cd3108e36d271267c798cd0e15f.tar.gz
gdb-125ff8197df74cd3108e36d271267c798cd0e15f.tar.bz2
x86/Intel: correct VFPCLASSP{S,D} handling when displacement is present
fits_in_disp8() can be called before ambiguous operands get resolved or rejected (in process_suffix()), which requires that i.memshift be non-negative to avoid an internal error. This case wasn't covered by 6c0946d0d28d ("x86: correct VFPCLASSP{S,D} operand size handling").
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 98c0bf0..66a2e0f 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -6327,7 +6327,7 @@ check_VecOperands (const insn_template *t)
i.memshift = t->opcode_modifier.disp8memshift;
else
{
- const i386_operand_type *type = NULL;
+ const i386_operand_type *type = NULL, *fallback = NULL;
i.memshift = 0;
for (op = 0; op < i.operands; op++)
@@ -6341,6 +6341,8 @@ check_VecOperands (const insn_template *t)
type = &t->operand_types[op];
else if (!i.types[op].bitfield.unspecified)
type = &i.types[op];
+ else /* Ambiguities get resolved elsewhere. */
+ fallback = &t->operand_types[op];
}
else if (i.types[op].bitfield.class == RegSIMD
&& t->opcode_modifier.evex != EVEXLIG)
@@ -6353,6 +6355,8 @@ check_VecOperands (const insn_template *t)
i.memshift = 4;
}
+ if (!type && !i.memshift)
+ type = fallback;
if (type)
{
if (type->bitfield.zmmword)