aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-06-13 09:57:35 +0000
committerNick Clifton <nickc@redhat.com>2011-06-13 09:57:35 +0000
commit94342ec38bc47cba884a975e37c74f20b598ca25 (patch)
tree661569bd82994e1699220ba6c9490e02050fec3f /gas/config/tc-arm.c
parentf9e53abc4afe20d97606c6898a9a465b69920066 (diff)
downloadgdb-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.c7
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
{