diff options
author | Nick Clifton <nickc@redhat.com> | 2011-06-13 09:57:35 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2011-06-13 09:57:35 +0000 |
commit | 94342ec38bc47cba884a975e37c74f20b598ca25 (patch) | |
tree | 661569bd82994e1699220ba6c9490e02050fec3f /gas/config/tc-arm.c | |
parent | f9e53abc4afe20d97606c6898a9a465b69920066 (diff) | |
download | gdb-94342ec38bc47cba884a975e37c74f20b598ca25.zip gdb-94342ec38bc47cba884a975e37c74f20b598ca25.tar.gz gdb-94342ec38bc47cba884a975e37c74f20b598ca25.tar.bz2 |
PR gas/12854
* gas/arm/shift-bad.s: New test.
* gas/arm/shift-bad.l: Expcted error output.
* gas/arm/shift-bad.s: New control file.
* config/tc-arm.c (do_shift): Do not allow shift operations at the
end of a register based shift insn.
(do_t_shift): Likewise.
Diffstat (limited to 'gas/config/tc-arm.c')
-rw-r--r-- | gas/config/tc-arm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index d4262a9..a34dcec 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -8343,6 +8343,9 @@ do_shift (void) { inst.instruction |= inst.operands[2].reg << 8; inst.instruction |= SHIFT_BY_REG; + /* PR 12854: Error on extraneous shifts. */ + constraint (inst.operands[2].shifted, + _("extraneous shift as part of operand to shift insn")); } else inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM; @@ -11535,6 +11538,10 @@ do_t_shift (void) inst.instruction |= inst.operands[0].reg << 8; inst.instruction |= inst.operands[1].reg << 16; inst.instruction |= inst.operands[2].reg; + + /* PR 12854: Error on extraneous shifts. */ + constraint (inst.operands[2].shifted, + _("extraneous shift as part of operand to shift insn")); } else { |