From 94342ec38bc47cba884a975e37c74f20b598ca25 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 13 Jun 2011 09:57:35 +0000 Subject: 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. --- gas/config/tc-arm.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gas/config/tc-arm.c') 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 { -- cgit v1.1