x86: use local variable in check_VecOperands()
authorJan Beulich <jbeulich@novell.com>
Thu, 22 Mar 2018 07:47:16 +0000 (08:47 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Mar 2018 07:47:16 +0000 (08:47 +0100)
This is just to make a subsequent change a little easier to read.

gas/ChangeLog
gas/config/tc-i386.c

index ace9839f508acd96f0bbbe1e75a15c22b27f0886..e1488d33ba17437897d142bc3e68ac84da52c711 100644 (file)
@@ -1,3 +1,8 @@
+2018-03-22  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-i386.c (check_VecOperands): Latch
+       i.broadcast->operand into op.
+
 2018-03-22  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (match_template): Special case base opcode
index 1a05f48e661bed8037e7b4db773d2a069d172a42..2163ac101d7836725cb622fb58bb2f1c82d8b236 100644 (file)
@@ -5053,14 +5053,15 @@ check_VecOperands (const insn_template *t)
       /* Check if specified broadcast is supported in this instruction,
         and it's applied to memory operand of DWORD or QWORD type,
         depending on VecESize.  */
+      op = i.broadcast->operand;
       if (i.broadcast->type != t->opcode_modifier.broadcast
-         || !i.types[i.broadcast->operand].bitfield.mem
+         || !i.types[op].bitfield.mem
          || (t->opcode_modifier.vecesize == 0
-             && !i.types[i.broadcast->operand].bitfield.dword
-             && !i.types[i.broadcast->operand].bitfield.unspecified)
+             && !i.types[op].bitfield.dword
+             && !i.types[op].bitfield.unspecified)
          || (t->opcode_modifier.vecesize == 1
-             && !i.types[i.broadcast->operand].bitfield.qword
-             && !i.types[i.broadcast->operand].bitfield.unspecified))
+             && !i.types[op].bitfield.qword
+             && !i.types[op].bitfield.unspecified))
        goto bad_broadcast;
 
       broadcasted_opnd_size = t->opcode_modifier.vecesize ? 64 : 32;
@@ -5076,9 +5077,9 @@ check_VecOperands (const insn_template *t)
        goto bad_broadcast;
 
       if ((broadcasted_opnd_size == 256
-          && !t->operand_types[i.broadcast->operand].bitfield.ymmword)
+          && !t->operand_types[op].bitfield.ymmword)
          || (broadcasted_opnd_size == 512
-             && !t->operand_types[i.broadcast->operand].bitfield.zmmword))
+             && !t->operand_types[op].bitfield.zmmword))
        {
        bad_broadcast:
          i.error = unsupported_broadcast;