summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99378.patch
blob: aacf19b7c995ed02c1549e1bad810b7f34ee8862 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
2010-08-27  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config/arm/thumb2.md (thumb_andsi_not_shiftsi_si,
	thumb2_notsi_shiftsi, thumb2_notsi_shiftsi_compare0,
	thumb2_not_shiftsi_compare0_scratch, thumb2_cmpsi_shiftsi,
	thumb2_cmpsi_shiftsi_swp, thumb2_cmpsi_neg_shiftsi,
	thumb2_arith_shiftsi, thumb2_arith_shiftsi_compare0,
	thumb2_arith_shiftsi_compare0_scratch, thumb2_sub_shiftsi,
	thumb2_sub_shiftsi_compare0, thumb2_sub_shiftsi_compare0_scratch):
	Use const_shift_count predicate for "M" constraints.
	* config/arm/predicates.md (const_shift_operand): Remove.
	(const_shift_count): New.

	gcc/testsuite/
	* gcc.dg/long-long-shift-1.c: New test.

 2010-08-26  Paul Brook  <paul@codesourcery.com>
 
 	Merge from Sourcery G++ 4.3/4.4:

=== modified file 'gcc/config/arm/predicates.md'
--- old/gcc/config/arm/predicates.md	2010-08-12 13:35:39 +0000
+++ new/gcc/config/arm/predicates.md	2010-08-31 09:40:16 +0000
@@ -318,10 +318,9 @@
        (and (match_code "reg,subreg,mem")
 	    (match_operand 0 "nonimmediate_soft_df_operand"))))
 
-(define_predicate "const_shift_operand"
+(define_predicate "const_shift_count"
   (and (match_code "const_int")
-       (ior (match_operand 0 "power_of_two_operand")
-	    (match_test "((unsigned HOST_WIDE_INT) INTVAL (op)) < 32"))))
+       (match_test "((unsigned HOST_WIDE_INT) INTVAL (op)) < 32")))
 
 
 (define_special_predicate "load_multiple_operation"

=== modified file 'gcc/config/arm/thumb2.md'
--- old/gcc/config/arm/thumb2.md	2010-08-13 16:00:58 +0000
+++ new/gcc/config/arm/thumb2.md	2010-08-31 09:40:16 +0000
@@ -55,7 +55,7 @@
   [(set (match_operand:SI 0 "s_register_operand" "=r")
 	(and:SI (not:SI (match_operator:SI 4 "shift_operator"
 			 [(match_operand:SI 2 "s_register_operand" "r")
-			  (match_operand:SI 3 "const_int_operand" "M")]))
+			  (match_operand:SI 3 "const_shift_count" "M")]))
 		(match_operand:SI 1 "s_register_operand" "r")))]
   "TARGET_THUMB2"
   "bic%?\\t%0, %1, %2%S4"
@@ -124,7 +124,7 @@
   [(set (match_operand:SI 0 "s_register_operand" "=r")
 	(not:SI (match_operator:SI 3 "shift_operator"
 		 [(match_operand:SI 1 "s_register_operand" "r")
-		  (match_operand:SI 2 "const_int_operand"  "M")])))]
+		  (match_operand:SI 2 "const_shift_count"  "M")])))]
   "TARGET_THUMB2"
   "mvn%?\\t%0, %1%S3"
   [(set_attr "predicable" "yes")
@@ -136,7 +136,7 @@
   [(set (reg:CC_NOOV CC_REGNUM)
 	(compare:CC_NOOV (not:SI (match_operator:SI 3 "shift_operator"
 			  [(match_operand:SI 1 "s_register_operand" "r")
-			   (match_operand:SI 2 "const_int_operand"  "M")]))
+			   (match_operand:SI 2 "const_shift_count"  "M")]))
 			 (const_int 0)))
    (set (match_operand:SI 0 "s_register_operand" "=r")
 	(not:SI (match_op_dup 3 [(match_dup 1) (match_dup 2)])))]
@@ -151,7 +151,7 @@
   [(set (reg:CC_NOOV CC_REGNUM)
 	(compare:CC_NOOV (not:SI (match_operator:SI 3 "shift_operator"
 			  [(match_operand:SI 1 "s_register_operand" "r")
-			   (match_operand:SI 2 "const_int_operand"  "M")]))
+			   (match_operand:SI 2 "const_shift_count"  "M")]))
 			 (const_int 0)))
    (clobber (match_scratch:SI 0 "=r"))]
   "TARGET_THUMB2"
@@ -328,7 +328,7 @@
 	(compare:CC (match_operand:SI   0 "s_register_operand" "r")
 		    (match_operator:SI  3 "shift_operator"
 		     [(match_operand:SI 1 "s_register_operand" "r")
-		      (match_operand:SI 2 "const_int_operand"  "M")])))]
+		      (match_operand:SI 2 "const_shift_count"  "M")])))]
   "TARGET_THUMB2"
   "cmp%?\\t%0, %1%S3"
   [(set_attr "conds" "set")
@@ -340,7 +340,7 @@
   [(set (reg:CC_SWP CC_REGNUM)
 	(compare:CC_SWP (match_operator:SI 3 "shift_operator"
 			 [(match_operand:SI 1 "s_register_operand" "r")
-			  (match_operand:SI 2 "const_int_operand" "M")])
+			  (match_operand:SI 2 "const_shift_count" "M")])
 			(match_operand:SI 0 "s_register_operand" "r")))]
   "TARGET_THUMB2"
   "cmp%?\\t%0, %1%S3"
@@ -354,7 +354,7 @@
 	(compare:CC (match_operand:SI 0 "s_register_operand" "r")
 		    (neg:SI (match_operator:SI 3 "shift_operator"
 			     [(match_operand:SI 1 "s_register_operand" "r")
-			      (match_operand:SI 2 "const_int_operand" "M")]))))]
+			      (match_operand:SI 2 "const_shift_count" "M")]))))]
   "TARGET_THUMB2"
   "cmn%?\\t%0, %1%S3"
   [(set_attr "conds" "set")
@@ -466,7 +466,7 @@
         (match_operator:SI 1 "shiftable_operator"
           [(match_operator:SI 3 "shift_operator"
              [(match_operand:SI 4 "s_register_operand" "r")
-              (match_operand:SI 5 "const_int_operand" "M")])
+              (match_operand:SI 5 "const_shift_count" "M")])
            (match_operand:SI 2 "s_register_operand" "r")]))]
   "TARGET_THUMB2"
   "%i1%?\\t%0, %2, %4%S3"
@@ -499,7 +499,7 @@
         (compare:CC_NOOV (match_operator:SI 1 "shiftable_operator"
 		          [(match_operator:SI 3 "shift_operator"
 		            [(match_operand:SI 4 "s_register_operand" "r")
-		             (match_operand:SI 5 "const_int_operand" "M")])
+		             (match_operand:SI 5 "const_shift_count" "M")])
 		           (match_operand:SI 2 "s_register_operand" "r")])
 			 (const_int 0)))
    (set (match_operand:SI 0 "s_register_operand" "=r")
@@ -517,7 +517,7 @@
         (compare:CC_NOOV (match_operator:SI 1 "shiftable_operator"
 		          [(match_operator:SI 3 "shift_operator"
 		            [(match_operand:SI 4 "s_register_operand" "r")
-		             (match_operand:SI 5 "const_int_operand" "M")])
+		             (match_operand:SI 5 "const_shift_count" "M")])
 		           (match_operand:SI 2 "s_register_operand" "r")])
 			 (const_int 0)))
    (clobber (match_scratch:SI 0 "=r"))]
@@ -533,7 +533,7 @@
 	(minus:SI (match_operand:SI 1 "s_register_operand" "r")
 		  (match_operator:SI 2 "shift_operator"
 		   [(match_operand:SI 3 "s_register_operand" "r")
-		    (match_operand:SI 4 "const_int_operand" "M")])))]
+		    (match_operand:SI 4 "const_shift_count" "M")])))]
   "TARGET_THUMB2"
   "sub%?\\t%0, %1, %3%S2"
   [(set_attr "predicable" "yes")
@@ -547,7 +547,7 @@
 	 (minus:SI (match_operand:SI 1 "s_register_operand" "r")
 		   (match_operator:SI 2 "shift_operator"
 		    [(match_operand:SI 3 "s_register_operand" "r")
-		     (match_operand:SI 4 "const_int_operand" "M")]))
+		     (match_operand:SI 4 "const_shift_count" "M")]))
 	 (const_int 0)))
    (set (match_operand:SI 0 "s_register_operand" "=r")
 	(minus:SI (match_dup 1) (match_op_dup 2 [(match_dup 3)
@@ -565,7 +565,7 @@
 	 (minus:SI (match_operand:SI 1 "s_register_operand" "r")
 		   (match_operator:SI 2 "shift_operator"
 		    [(match_operand:SI 3 "s_register_operand" "r")
-		     (match_operand:SI 4 "const_int_operand" "M")]))
+		     (match_operand:SI 4 "const_shift_count" "M")]))
 	 (const_int 0)))
    (clobber (match_scratch:SI 0 "=r"))]
   "TARGET_THUMB2"

OpenPOWER on IntegriCloud