This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] GAS: fix assert in check_VecOperands for AVX2 gathers case
- From: Michael Zolotukhin <michael dot v dot zolotukhin at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Jan Beulich <JBeulich at suse dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 22 Jan 2014 22:06:22 +0400
- Subject: [PATCH] GAS: fix assert in check_VecOperands for AVX2 gathers case
- Authentication-results: sourceware.org; auth=none
Hi,
This patch fixes assert in check_VecOperands. Currently, for AVX2 gathers the
assert allows XMM,YMM, and ZMM registers, but ZMM-registers aren't allowed in
AVX2 instructions, so the assert should allow only XMM and YMM.
This patch changes nothing in the gas behaviour, just makes the assert more
accurate and correct.
Ok for trunk?
gas/Changelog:
2014-01-22 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
* config/tc-i386.c (check_VecOperands): Fix assert.
Thanks,
Michael
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 147acdf..77cc0f9 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4374,11 +4374,9 @@ check_VecOperands (const insn_template *t)
if (i.reg_operands == 2 && !i.mask)
{
gas_assert (i.types[0].bitfield.regxmm
- || i.types[0].bitfield.regymm
- || i.types[0].bitfield.regzmm);
+ || i.types[0].bitfield.regymm);
gas_assert (i.types[2].bitfield.regxmm
- || i.types[2].bitfield.regymm
- || i.types[2].bitfield.regzmm);
+ || i.types[2].bitfield.regymm);
if (operand_check == check_none)
return 0;
if (register_number (i.op[0].regs)