This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Wed, Jan 22, 2014 at 10:18 AM, Michael Zolotukhin
<michael.v.zolotukhin@gmail.com> wrote:
> Oops, it seems that web-interface broke tabs in the letter. I'll
> resend it tomorrow correctly.
>
> Best regards,
> Michael
>
> On 22 January 2014 22:06, Michael Zolotukhin
> <michael.v.zolotukhin@gmail.com> wrote:
>> 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.
>

I fixed the tabs and checked it in for you.

Thanks.

-- 
H.J.
---
commit 7c84a0ca904a7a80262506f70ccbe09f99a68535
Author: Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
Date:   Wed Jan 22 11:39:02 2014 -0800

    Remove regzmm from AVX2 gather assert

    Since regzmm can't be used in AVX2 gather instructions, there is no need
    to check regzmm in AVX2 gather assert.

    2014-01-22  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>

    * config/tc-i386.c (check_VecOperands): Remove regzmm from AVX2
    gather assert.

diff --git a/gas/ChangeLog b/gas/ChangeLog
index a79ceb9..6a64141 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
 2014-01-22  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>

+ * config/tc-i386.c (check_VecOperands): Remove regzmm from AVX2
+ gather assert.
+
+2014-01-22  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>
+
  PR gas/16489
  * config/tc-i386.c (check_VecOperands): Add check for invalid
  register set in AVX512 gathers.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 34af1a1..7f35f05 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]