diff options
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r-- | gcc/config/arm/arm.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index c151c83b3df..ebc00935b78 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -11573,11 +11573,18 @@ arm_print_operand (FILE *stream, rtx x, int code) case 'S': { HOST_WIDE_INT val; - const char * shift = shift_op (x, &val); + const char *shift; + if (!shift_operator (x, SImode)) + { + output_operand_lossage ("invalid shift operand"); + break; + } + + shift = shift_op (x, &val); if (shift) { - fprintf (stream, ", %s ", shift_op (x, &val)); + fprintf (stream, ", %s ", shift); if (val == -1) arm_print_operand (stream, XEXP (x, 1), 0); else |