diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2010-12-22 15:09:17 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2010-12-22 15:09:17 +0000 |
commit | 46fc230528907c9adc42104c73819415de8d0a6c (patch) | |
tree | 1b72cab3ee737423f6461c6ecd0dfeadccb67568 | |
parent | 32aa622ca800f92d7250e1ab4be08d3e174ef953 (diff) | |
download | gcc-46fc230528907c9adc42104c73819415de8d0a6c.zip gcc-46fc230528907c9adc42104c73819415de8d0a6c.tar.gz gcc-46fc230528907c9adc42104c73819415de8d0a6c.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/spu/spu.c | 8 | ||||
-rw-r--r-- | gcc/config/spu/spu.md | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cbbd5ae..9fb3152 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +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> PR tree-optimization/45934 diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index bbe6edd..045fc87 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -4608,7 +4608,13 @@ int spu_expand_mov (rtx * ops, enum machine_mode mode) { 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])) { diff --git a/gcc/config/spu/spu.md b/gcc/config/spu/spu.md index c9bf3c8..1aab660 100644 --- a/gcc/config/spu/spu.md +++ b/gcc/config/spu/spu.md @@ -269,8 +269,8 @@ ;; mov (define_expand "mov<mode>" - [(set (match_operand:ALL 0 "spu_nonimm_operand" "=r,r,r,m") - (match_operand:ALL 1 "general_operand" "r,i,m,r"))] + [(set (match_operand:ALL 0 "nonimmediate_operand" "") + (match_operand:ALL 1 "general_operand" ""))] "" { if (spu_expand_mov(operands, <MODE>mode)) |