Commit ae6b8666 by Kaz Kojima

re PR target/64533 ([SH] alloca generates unsafe code)

PR target/64533
* config/sh/sh.md (*addsi3_compact): Use u constraint instead
of r for the second alternative of the destination operand.

From-SVN: r219338
parent 946695b7
2015-01-08 Kaz Kojima <kkojima@gcc.gnu.org>
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 <segher@kernel.crashing.org>
PR target/36557
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment