]> code.ossystems Code Review - openembedded-core.git/blob
97370d4fdda22455afbade8ad0c90e641d5d8000
[openembedded-core.git] /
1 From ac4ab0911ae869e3cd4c00629e3c4d4d0b7e7aa6 Mon Sep 17 00:00:00 2001
2 From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
3 Date: Thu, 7 Apr 2011 20:46:50 +0000
4 Subject: [PATCH 081/200]        * config/i386/sse.md: Update copyright year.
5         (avx_cmp<ssescalarmodesuffix><mode>3): Add missing output
6         register constraint.
7         (*vec_concatv2sf_avx): Fix wrong register constraint in
8         alternative 3 of operand 1.
9         (*vec_set<mode>_0_avx): Avoid combining registers from different
10         units in a single alternative.
11         (*vec_set<mode>_0_sse4_1): Ditto.
12         (*vec_set<mode>_0_sse2): Ditto.
13         (vec_set<mode>_0): Ditto.
14         (sse2_storehpd): Ditto.
15         (sse2_loadhpd): Ditto.
16         (sse4_1_insertps): Use nonimmediate_operand for operand 2.
17         * config/i386/predicates.md (sse_comparison_operator): Do not
18         define as special predicate.
19
20 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172126 138bc75d-0d04-0410-961f-82ee72b054a4
21
22 index 986856b..7cce9d4 100644
23 --- a/gcc/config/i386/predicates.md
24 +++ b/gcc/config/i386/predicates.md
25 @@ -969,13 +969,8 @@
26  ;; Return true if OP is a comparison that can be used in the CMPSS/CMPPS insns.
27  ;; The first set are supported directly; the second set can't be done with
28  ;; full IEEE support, i.e. NaNs.
29 -;;
30 -;; ??? It would seem that we have a lot of uses of this predicate that pass
31 -;; it the wrong mode.  We got away with this because the old function didn't
32 -;; check the mode at all.  Mirror that for now by calling this a special
33 -;; predicate.
34  
35 -(define_special_predicate "sse_comparison_operator"
36 +(define_predicate "sse_comparison_operator"
37    (match_code "eq,lt,le,unordered,ne,unge,ungt,ordered"))
38  
39  ;; Return true if OP is a comparison operator that can be issued by
40 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
41 index f4bea64..578ad82 100644
42 --- a/gcc/config/i386/sse.md
43 +++ b/gcc/config/i386/sse.md
44 @@ -1,5 +1,5 @@
45  ;; GCC machine description for SSE instructions
46 -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
47 +;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
48  ;; Free Software Foundation, Inc.
49  ;;
50  ;; This file is part of GCC.
51 @@ -1557,7 +1557,7 @@
52     (set_attr "mode" "<MODE>")])
53  
54  (define_insn "avx_cmp<ssescalarmodesuffix><mode>3"
55 -  [(set (match_operand:SSEMODEF2P 0 "register_operand" "")
56 +  [(set (match_operand:SSEMODEF2P 0 "register_operand" "=x")
57         (vec_merge:SSEMODEF2P
58           (unspec:SSEMODEF2P
59             [(match_operand:SSEMODEF2P 1 "register_operand" "x")
60 @@ -3846,7 +3846,7 @@
61  (define_insn "*vec_concatv2sf_avx"
62    [(set (match_operand:V2SF 0 "register_operand"     "=x,x,x,*y ,*y")
63         (vec_concat:V2SF
64 -         (match_operand:SF 1 "nonimmediate_operand" " x,x,m, x , m")
65 +         (match_operand:SF 1 "nonimmediate_operand" " x,x,m, 0 , m")
66           (match_operand:SF 2 "vector_move_operand"  " x,m,C,*ym, C")))]
67    "TARGET_AVX"
68    "@
69 @@ -3935,13 +3935,15 @@
70    DONE;
71  })
72  
73 +;; Avoid combining registers from different units in a single alternative,
74 +;; see comment above inline_secondary_memory_needed function in i386.c
75  (define_insn "*vec_set<mode>_0_avx"
76 -  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x, x,x,  x,m")
77 +  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x, x,x,  x,m, m,m")
78         (vec_merge:SSEMODE4S
79           (vec_duplicate:SSEMODE4S
80             (match_operand:<ssescalarmode> 2
81 -             "general_operand"                            " x,m,*r,x,*rm,x*rfF"))
82 -         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,x,  x,0")
83 +             "general_operand"                            " x,m,*r,x,*rm,x,*r,fF"))
84 +         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,x,  x,0, 0,0")
85           (const_int 1)))]
86    "TARGET_AVX"
87    "@
88 @@ -3950,20 +3952,24 @@
89     vmovd\t{%2, %0|%0, %2}
90     vmovss\t{%2, %1, %0|%0, %1, %2}
91     vpinsrd\t{$0, %2, %1, %0|%0, %1, %2, 0}
92 +   #
93 +   #
94     #"
95 -  [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*")
96 -   (set_attr "prefix_extra" "*,*,*,*,1,*")
97 -   (set_attr "length_immediate" "*,*,*,*,1,*")
98 +  [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*,*,*")
99 +   (set_attr "prefix_extra" "*,*,*,*,1,*,*,*")
100 +   (set_attr "length_immediate" "*,*,*,*,1,*,*,*")
101     (set_attr "prefix" "vex")
102 -   (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*")])
103 +   (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*,*,*")])
104  
105 +;; Avoid combining registers from different units in a single alternative,
106 +;; see comment above inline_secondary_memory_needed function in i386.c
107  (define_insn "*vec_set<mode>_0_sse4_1"
108 -  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x, x,x,  x,m")
109 +  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x, x,x,  x, m,m")
110         (vec_merge:SSEMODE4S
111           (vec_duplicate:SSEMODE4S
112             (match_operand:<ssescalarmode> 2
113 -             "general_operand"                            " x,m,*r,x,*rm,*rfF"))
114 -         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,0,  0,0")
115 +             "general_operand"                            " x,m,*r,x,*rm,*r,fF"))
116 +         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,C, C,0,  0, 0,0")
117           (const_int 1)))]
118    "TARGET_SSE4_1"
119    "@
120 @@ -3972,44 +3978,53 @@
121     movd\t{%2, %0|%0, %2}
122     movss\t{%2, %0|%0, %2}
123     pinsrd\t{$0, %2, %0|%0, %2, 0}
124 +   #
125     #"
126 -  [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*")
127 -   (set_attr "prefix_extra" "*,*,*,*,1,*")
128 -   (set_attr "length_immediate" "*,*,*,*,1,*")
129 -   (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*")])
130 +  [(set_attr "type" "sselog,ssemov,ssemov,ssemov,sselog,*,*")
131 +   (set_attr "prefix_extra" "*,*,*,*,1,*,*")
132 +   (set_attr "length_immediate" "*,*,*,*,1,*,*")
133 +   (set_attr "mode" "SF,<ssescalarmode>,SI,SF,TI,*,*")])
134  
135 +;; Avoid combining registers from different units in a single alternative,
136 +;; see comment above inline_secondary_memory_needed function in i386.c
137  (define_insn "*vec_set<mode>_0_sse2"
138 -  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x, x,x,m")
139 +  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x, x,x,m, m,m")
140         (vec_merge:SSEMODE4S
141           (vec_duplicate:SSEMODE4S
142             (match_operand:<ssescalarmode> 2
143 -             "general_operand"                            " m,*r,x,x*rfF"))
144 -         (match_operand:SSEMODE4S 1 "vector_move_operand" " C, C,0,0")
145 +             "general_operand"                            " m,*r,x,x,*r,fF"))
146 +         (match_operand:SSEMODE4S 1 "vector_move_operand" " C, C,0,0, 0,0")
147           (const_int 1)))]
148    "TARGET_SSE2"
149    "@
150     mov<ssescalarmodesuffix>\t{%2, %0|%0, %2}
151     movd\t{%2, %0|%0, %2}
152     movss\t{%2, %0|%0, %2}
153 +   #
154 +   #
155     #"
156    [(set_attr "type" "ssemov")
157 -   (set_attr "mode" "<ssescalarmode>,SI,SF,*")])
158 +   (set_attr "mode" "<ssescalarmode>,SI,SF,*,*,*")])
159  
160 +;; Avoid combining registers from different units in a single alternative,
161 +;; see comment above inline_secondary_memory_needed function in i386.c
162  (define_insn "vec_set<mode>_0"
163 -  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x,m")
164 +  [(set (match_operand:SSEMODE4S 0 "nonimmediate_operand"  "=x,x,m, m,m")
165         (vec_merge:SSEMODE4S
166           (vec_duplicate:SSEMODE4S
167             (match_operand:<ssescalarmode> 2
168 -             "general_operand"                            " m,x,x*rfF"))
169 -         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,0,0")
170 +             "general_operand"                            " m,x,x,*r,fF"))
171 +         (match_operand:SSEMODE4S 1 "vector_move_operand" " C,0,0, 0,0")
172           (const_int 1)))]
173    "TARGET_SSE"
174    "@
175     movss\t{%2, %0|%0, %2}
176     movss\t{%2, %0|%0, %2}
177 +   #
178 +   #
179     #"
180    [(set_attr "type" "ssemov")
181 -   (set_attr "mode" "SF,SF,*")])
182 +   (set_attr "mode" "SF,SF,*,*,*")])
183  
184  ;; A subset is vec_setv4sf.
185  (define_insn "*vec_setv4sf_avx"
186 @@ -4064,7 +4079,7 @@
187  
188  (define_insn "sse4_1_insertps"
189    [(set (match_operand:V4SF 0 "register_operand" "=x")
190 -       (unspec:V4SF [(match_operand:V4SF 2 "register_operand" "x")
191 +       (unspec:V4SF [(match_operand:V4SF 2 "nonimmediate_operand" "xm")
192                       (match_operand:V4SF 1 "register_operand" "0")
193                       (match_operand:SI 3 "const_0_to_255_operand" "n")]
194                      UNSPEC_INSERTPS))]
195 @@ -4811,6 +4826,8 @@
196     (set_attr "prefix" "vex")
197     (set_attr "mode" "V1DF,V2DF,DF,DF,DF")])
198  
199 +;; Avoid combining registers from different units in a single alternative,
200 +;; see comment above inline_secondary_memory_needed function in i386.c
201  (define_insn "sse2_storehpd"
202    [(set (match_operand:DF 0 "nonimmediate_operand"     "=m,x,x,*f,r")
203         (vec_select:DF
204 @@ -4912,6 +4929,8 @@
205     (set_attr "prefix" "vex")
206     (set_attr "mode" "V1DF,V2DF,DF,DF,DF")])
207  
208 +;; Avoid combining registers from different units in a single alternative,
209 +;; see comment above inline_secondary_memory_needed function in i386.c
210  (define_insn "sse2_loadhpd"
211    [(set (match_operand:V2DF 0 "nonimmediate_operand"     "=x,x,x,o,o,o")
212         (vec_concat:V2DF
213 @@ -4983,6 +5002,8 @@
214     (set_attr "prefix" "vex")
215     (set_attr "mode" "DF,V1DF,V1DF,V1DF,DF,DF,DF")])
216  
217 +;; Avoid combining registers from different units in a single alternative,
218 +;; see comment above inline_secondary_memory_needed function in i386.c
219  (define_insn "sse2_loadlpd"
220    [(set (match_operand:V2DF 0 "nonimmediate_operand"    "=x,x,x,x,x,m,m,m")
221         (vec_concat:V2DF
222 -- 
223 1.7.0.4
224