diff options
author | Matthew Gretton-Dann <matthew.gretton-dann@arm.com> | 2011-12-07 16:46:35 +0000 |
---|---|---|
committer | Matthew Gretton-Dann <matthew.gretton-dann@arm.com> | 2011-12-07 16:46:35 +0000 |
commit | ad6cec4372cbd9c17151f4b6b84759a2fb30f2b2 (patch) | |
tree | d5ec56812b705da8f66e10985d40956d05319691 /gas/config/tc-arm.c | |
parent | 1b11b49fe420e2d2699f1763ab51aa7a9f26d63a (diff) | |
download | gdb-ad6cec4372cbd9c17151f4b6b84759a2fb30f2b2.zip gdb-ad6cec4372cbd9c17151f4b6b84759a2fb30f2b2.tar.gz gdb-ad6cec4372cbd9c17151f4b6b84759a2fb30f2b2.tar.bz2 |
* gas/config/tc-arm.c (ARM_IT_MAX_OPERANDS): New define.
(arm_it): Use ARM_IT_MAX_OPERANDS.
(neon_select_shape): Ensure we have matched all operands.
* gas/testsuite/gas/arm/neon-suffix-bad.l: Add testcase.
* gas/testsuite/gas/arm/neon-suffix-bad.s: Likewise.
Diffstat (limited to 'gas/config/tc-arm.c')
-rw-r--r-- | gas/config/tc-arm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 52a9030..064267e 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -351,6 +351,9 @@ enum it_instruction_type IT_INSN /* The IT insn has been parsed. */ }; +/* The maximum number of operands we need. */ +#define ARM_IT_MAX_OPERANDS 6 + struct arm_it { const char * error; @@ -402,7 +405,7 @@ struct arm_it unsigned negative : 1; /* Index register was negated. */ unsigned shifted : 1; /* Shift applied to operation. */ unsigned shift_kind : 3; /* Shift operation (enum shift_kind). */ - } operands[6]; + } operands[ARM_IT_MAX_OPERANDS]; }; static struct arm_it inst; @@ -12415,7 +12418,9 @@ neon_select_shape (enum neon_shape shape, ...) if (!matches) break; } - if (matches) + if (matches && (j >= ARM_IT_MAX_OPERANDS || !inst.operands[j].present)) + /* We've matched all the entries in the shape table, and we don't + have any left over operands which have not been matched. */ break; } |