diff options
author | Jan Beulich <jbeulich@novell.com> | 2018-03-28 14:25:07 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2018-03-28 14:25:07 +0200 |
commit | c39e5b267180a5d61a6434b24bcc7888bf3c0ca7 (patch) | |
tree | 1e3fea41146db8fd596670f6387c5ded332488b0 /gas/config | |
parent | 8e6e0792d17be5d4321def520d12c1764dc0ba2a (diff) | |
download | gdb-c39e5b267180a5d61a6434b24bcc7888bf3c0ca7.zip gdb-c39e5b267180a5d61a6434b24bcc7888bf3c0ca7.tar.gz gdb-c39e5b267180a5d61a6434b24bcc7888bf3c0ca7.tar.bz2 |
x86: drop VecESize
It again can be inferred from other information.
The vpopcntd templates all need to have Dword added to their memory
operands; the lack thereof was actually a bug preventing certain Intel
syntax code to assemble, so test cases get extended.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 0e4126e..dd7660d 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5051,17 +5051,14 @@ check_VecOperands (const insn_template *t) i386_operand_type type, overlap; /* Check if specified broadcast is supported in this instruction, - and it's applied to memory operand of DWORD or QWORD type, - depending on VecESize. */ + and it's applied to memory operand of DWORD or QWORD type. */ op = i.broadcast->operand; if (!t->opcode_modifier.broadcast || !i.types[op].bitfield.mem - || (t->opcode_modifier.vecesize == 0 - && !i.types[op].bitfield.dword - && !i.types[op].bitfield.unspecified) - || (t->opcode_modifier.vecesize == 1 - && !i.types[op].bitfield.qword - && !i.types[op].bitfield.unspecified)) + || (!i.types[op].bitfield.unspecified + && (t->operand_types[op].bitfield.dword + ? !i.types[op].bitfield.dword + : !i.types[op].bitfield.qword))) { bad_broadcast: i.error = unsupported_broadcast; @@ -5069,7 +5066,7 @@ check_VecOperands (const insn_template *t) } operand_type_set (&type, 0); - switch ((t->opcode_modifier.vecesize ? 8 : 4) * i.broadcast->type) + switch ((t->operand_types[op].bitfield.dword ? 4 : 8) * i.broadcast->type) { case 8: type.bitfield.qword = 1; @@ -5116,15 +5113,16 @@ check_VecOperands (const insn_template *t) break; gas_assert (op < i.operands); /* Check size of the memory operand. */ - if ((t->opcode_modifier.vecesize == 0 - && i.types[op].bitfield.dword) - || (t->opcode_modifier.vecesize == 1 - && i.types[op].bitfield.qword)) + if (t->operand_types[op].bitfield.dword + ? i.types[op].bitfield.dword + : i.types[op].bitfield.qword) { i.error = broadcast_needed; return 1; } } + else + op = MAX_OPERANDS - 1; /* Avoid uninitialized variable warning. */ /* Check if requested masking is supported. */ if (i.mask @@ -5171,7 +5169,7 @@ check_VecOperands (const insn_template *t) && i.disp_encoding != disp_encoding_32bit) { if (i.broadcast) - i.memshift = t->opcode_modifier.vecesize ? 3 : 2; + i.memshift = t->operand_types[op].bitfield.dword ? 2 : 3; else i.memshift = t->opcode_modifier.disp8memshift; |