[PATCH] GAS: fix assert in check_VecOperands for AVX2 gathers case

Michael Zolotukhin michael.v.zolotukhin@gmail.com
Wed Jan 22 18:06:00 GMT 2014


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)



More information about the Binutils mailing list