summaryrefslogtreecommitdiffstats
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorMichael Zolotukhin <michael.v.zolotukhin@gmail.com>2013-11-15 05:22:32 -0800
committerH.J. Lu <hjl.tools@gmail.com>2013-11-15 05:27:32 -0800
commitd65dd51541230afb775ad9ec2f04f23a00dbe94c (patch)
tree42947991e47153555a57ac51f23d27d809715ddd /gas/config/tc-i386.c
parent484649796420f367ff1b9d192125a78ced97ec40 (diff)
downloadppe42-binutils-d65dd51541230afb775ad9ec2f04f23a00dbe94c.tar.gz
ppe42-binutils-d65dd51541230afb775ad9ec2f04f23a00dbe94c.zip
Reorder invalid default mask check
gas/ 2013-11-15 Michael Zolotukhin <michael.v.zolotukhin@gmail.com> * config/tc-i386.c (check_VecOperands): Reorder checks. gas/testsuite/ 2013-11-15 Michael Zolotukhin <michael.v.zolotukhin@gmail.com> * gas/i386/inval-avx512f.s: Add invalid test for gather instruction with default mask. * gas/i386/inval-avx512f.l: Update correspondingly.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index d12ca22ef7..23c49f0cb6 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4343,6 +4343,14 @@ check_VecOperands (const insn_template *t)
return 1;
}
+ /* Check if default mask is allowed. */
+ if (t->opcode_modifier.nodefmask
+ && (!i.mask || i.mask->mask->reg_num == 0))
+ {
+ i.error = no_default_mask;
+ return 1;
+ }
+
/* For VSIB byte, we need a vector register for index, and all vector
registers must be distinct. */
if (t->opcode_modifier.vecsib)
@@ -4460,14 +4468,6 @@ check_VecOperands (const insn_template *t)
return 1;
}
- /* Check if default mask is allowed. */
- if (t->opcode_modifier.nodefmask
- && (!i.mask || i.mask->mask->reg_num == 0))
- {
- i.error = no_default_mask;
- return 1;
- }
-
/* Check RC/SAE. */
if (i.rounding)
{
OpenPOWER on IntegriCloud