From c3f707fc954f479984a03666365273f902332988 Mon Sep 17 00:00:00 2001 From: kkojima Date: Thu, 8 Jan 2015 09:05:06 +0000 Subject: [PATCH] PR target/64533 * config/sh/sh.md (*addsi3_compact): Use u constraint instead of r for the second alternative of the destination operand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219338 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/sh/sh.md | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5eb1bc6..55ffb7b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-01-08 Kaz Kojima + + PR target/64533 + * config/sh/sh.md (*addsi3_compact): Use u constraint instead + of r for the second alternative of the destination operand. + 2015-01-07 Segher Boessenkool PR target/36557 diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 37d2a20..6e0b97f 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -2061,9 +2061,10 @@ ;; The problem is that LRA expects something like ;; (set rA (plus rB (const_int N))) ;; to work. We can do that, but we have to split out an additional reg-reg -;; copy before the actual add insn. +;; copy before the actual add insn. Use u constraint for that case to avoid +;; the invalid value in the stack pointer. (define_insn_and_split "*addsi3_compact" - [(set (match_operand:SI 0 "arith_reg_dest" "=r,&r") + [(set (match_operand:SI 0 "arith_reg_dest" "=r,&u") (plus:SI (match_operand:SI 1 "arith_operand" "%0,r") (match_operand:SI 2 "arith_or_int_operand" "rI08,rn")))] "TARGET_SH1 -- 2.7.4