summaryrefslogtreecommitdiff
path: root/gcc/config/spu
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-22 15:09:17 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-22 15:09:17 +0000
commitabe960bb057b24c4cdf03e44f0e3afbab502bd1e (patch)
tree1b72cab3ee737423f6461c6ecd0dfeadccb67568 /gcc/config/spu
parent131e3e564cdbfb3c634c45769fff4c0038c8ed5b (diff)
downloadgcc-abe960bb057b24c4cdf03e44f0e3afbab502bd1e.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168169 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/spu')
-rw-r--r--gcc/config/spu/spu.c8
-rw-r--r--gcc/config/spu/spu.md4
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index bbe6eddde2a..045fc8794ed 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 c9bf3c828d5..1aab660a8d2 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))