Commit 46fc2305 by Ulrich Weigand Committed by Ulrich Weigand

spu.md ("mov<mode>"): Use nonimmediate_operand predicate for destination operand.

	* config/spu/spu.md ("mov<mode>"): Use nonimmediate_operand
	predicate for destination operand.
	* config/spu/spu.c (spu_expand_mov): If move destination is an
	invalid subreg, perform move in the subreg's inner mode instead.

From-SVN: r168169
parent 32aa622c
2010-12-22 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* config/spu/spu.md ("mov<mode>"): Use nonimmediate_operand
predicate for destination operand.
* config/spu/spu.c (spu_expand_mov): If move destination is an
invalid subreg, perform move in the subreg's inner mode instead.
2010-12-22 Martin Jambor <mjambor@suse.cz> 2010-12-22 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/45934 PR tree-optimization/45934
...@@ -4608,7 +4608,13 @@ int ...@@ -4608,7 +4608,13 @@ int
spu_expand_mov (rtx * ops, enum machine_mode mode) spu_expand_mov (rtx * ops, enum machine_mode mode)
{ {
if (GET_CODE (ops[0]) == SUBREG && !valid_subreg (ops[0])) if (GET_CODE (ops[0]) == SUBREG && !valid_subreg (ops[0]))
abort (); {
/* Perform the move in the destination SUBREG's inner mode. */
ops[0] = SUBREG_REG (ops[0]);
mode = GET_MODE (ops[0]);
ops[1] = gen_lowpart_common (mode, ops[1]);
gcc_assert (ops[1]);
}
if (GET_CODE (ops[1]) == SUBREG && !valid_subreg (ops[1])) if (GET_CODE (ops[1]) == SUBREG && !valid_subreg (ops[1]))
{ {
......
...@@ -269,8 +269,8 @@ ...@@ -269,8 +269,8 @@
;; mov ;; mov
(define_expand "mov<mode>" (define_expand "mov<mode>"
[(set (match_operand:ALL 0 "spu_nonimm_operand" "=r,r,r,m") [(set (match_operand:ALL 0 "nonimmediate_operand" "")
(match_operand:ALL 1 "general_operand" "r,i,m,r"))] (match_operand:ALL 1 "general_operand" ""))]
"" ""
{ {
if (spu_expand_mov(operands, <MODE>mode)) if (spu_expand_mov(operands, <MODE>mode))
......
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