diff options
author | carlos <carlos@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-01 03:43:00 +0000 |
---|---|---|
committer | carlos <carlos@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-01 03:43:00 +0000 |
commit | 35ba0a55711d92650af71a1307700bdbe7efdd5d (patch) | |
tree | 2b31c42e643cf23cb6ad516fc9b68972f35b145a | |
parent | 85f6e89eb333e73500d6ab1ac33f5be54d305277 (diff) |
2006-05-31 Carlos O'Donell <carlos@codesourcery.com>
Backport from mainline:
2006-05-31 Richard Earnshaw <richard.earnshaw@arm.com>
PR target/27829
* gcc/config/arm/arm.c (arm_print_operand case 'S'): Validate
that the operand is a shift operand before calling shift_op.
Avoid redundant call of shift_op.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@114294 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | ChangeLog.csl | 9 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 11 |
2 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl index 89e9e11c765..9e60fd4ee0b 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,12 @@ +2006-05-31 Carlos O'Donell <carlos@codesourcery.com> + + Backport from mainline: + 2006-05-31 Richard Earnshaw <richard.earnshaw@arm.com> + PR target/27829 + * gcc/config/arm/arm.c (arm_print_operand case 'S'): Validate + that the operand is a shift operand before calling shift_op. + Avoid redundant call of shift_op. + 2006-05-29 Kazu Hirata <kazu@codesourcery.com> Backport from mainline: 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 |