From d00f6ca670050d56c3ed5ef0c8ccdcce346e1cf2 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 5 Feb 2015 22:34:00 -0700 Subject: [PATCH] re PR target/43264 (Arithmetic expression error) PR target/43264 * config/h8300/h8300.c (get_shift_alg): Fix ASHIFTRT by 24 to 28 bits for the H8/300. From-SVN: r220471 --- gcc/ChangeLog | 6 ++++++ gcc/config/h8300/h8300.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90cee313a26..2bbfeb3fdd1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-05 Jeff Law + + PR target/43264 + * config/h8300/h8300.c (get_shift_alg): Fix ASHIFTRT by + 24 to 28 bits for the H8/300. + 2015-02-06 Alan Modra PR target/64876 diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 5968e5572b9..4bd4787fcdc 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -4384,7 +4384,7 @@ get_shift_alg (enum shift_type shift_type, enum shift_mode shift_mode, info->cc_inline = CC_SET_ZNV; goto end; case SHIFT_ASHIFTRT: - info->special = "mov.b\t%z0,%w0\n\tbld\t#7,%w0\n\tsubx\t%x0,%x0\n\tsubx\t%x0,%x0\n\tsubx\t%x0,%x0"; + info->special = "mov.b\t%z0,%w0\n\tbld\t#7,%w0\n\tsubx\t%x0,%x0\n\tsubx\t%y0,%y0\n\tsubx\t%z0,%z0"; info->shift1 = "shar.b\t%w0"; info->cc_inline = CC_SET_ZNV; goto end; -- 2.30.2