summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99451.patch
blob: d87c312d070fa994aad004b41f2dc5de7cdd2832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
2010-12-22  Ulrich Weigand  <uweigand@de.ibm.com>

	LP: #693425
	Backport from mainline:

	gcc/
	* 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.

=== modified file 'gcc/config/spu/spu.c'
--- old/gcc/config/spu/spu.c	2010-08-04 09:53:04 +0000
+++ new/gcc/config/spu/spu.c	2010-12-22 15:20:44 +0000
@@ -4572,7 +4572,13 @@
 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]))
     {

=== modified file 'gcc/config/spu/spu.md'
--- old/gcc/config/spu/spu.md	2009-05-23 01:28:14 +0000
+++ new/gcc/config/spu/spu.md	2010-12-22 15:20:44 +0000
@@ -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))