1 |
709 |
jeremybenn |
;; PowerPC paired single and double hummer description
|
2 |
|
|
;; Copyright (C) 2007, 2009, 2010, 2011
|
3 |
|
|
;; Free Software Foundation, Inc.
|
4 |
|
|
;; Contributed by David Edelsohn and Revital Eres
|
5 |
|
|
;;
|
6 |
|
|
|
7 |
|
|
;; This file is part of GCC.
|
8 |
|
|
|
9 |
|
|
;; GCC is free software; you can redistribute it and/or modify it
|
10 |
|
|
;; under the terms of the GNU General Public License as published
|
11 |
|
|
;; by the Free Software Foundation; either version 3, or (at your
|
12 |
|
|
;; option) any later version.
|
13 |
|
|
|
14 |
|
|
;; GCC is distributed in the hope that it will be useful, but WITHOUT
|
15 |
|
|
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
16 |
|
|
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
17 |
|
|
;; License for more details.
|
18 |
|
|
;;
|
19 |
|
|
;; You should have received a copy of the GNU General Public License
|
20 |
|
|
;; along with this program; see the file COPYING3. If not see
|
21 |
|
|
;; .
|
22 |
|
|
|
23 |
|
|
(define_c_enum "unspec"
|
24 |
|
|
[UNSPEC_INTERHI_V2SF
|
25 |
|
|
UNSPEC_INTERLO_V2SF
|
26 |
|
|
UNSPEC_EXTEVEN_V2SF
|
27 |
|
|
UNSPEC_EXTODD_V2SF
|
28 |
|
|
])
|
29 |
|
|
|
30 |
|
|
(define_insn "paired_negv2sf2"
|
31 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
32 |
|
|
(neg:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "f")))]
|
33 |
|
|
"TARGET_PAIRED_FLOAT"
|
34 |
|
|
"ps_neg %0,%1"
|
35 |
|
|
[(set_attr "type" "fp")])
|
36 |
|
|
|
37 |
|
|
(define_insn "sqrtv2sf2"
|
38 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
39 |
|
|
(sqrt:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "f")))]
|
40 |
|
|
"TARGET_PAIRED_FLOAT"
|
41 |
|
|
"ps_rsqrte %0,%1"
|
42 |
|
|
[(set_attr "type" "fp")])
|
43 |
|
|
|
44 |
|
|
(define_insn "paired_absv2sf2"
|
45 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
46 |
|
|
(abs:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "f")))]
|
47 |
|
|
"TARGET_PAIRED_FLOAT"
|
48 |
|
|
"ps_abs %0,%1"
|
49 |
|
|
[(set_attr "type" "fp")])
|
50 |
|
|
|
51 |
|
|
(define_insn "nabsv2sf2"
|
52 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
53 |
|
|
(neg:V2SF (abs:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "f"))))]
|
54 |
|
|
"TARGET_PAIRED_FLOAT"
|
55 |
|
|
"ps_nabs %0,%1"
|
56 |
|
|
[(set_attr "type" "fp")])
|
57 |
|
|
|
58 |
|
|
(define_insn "paired_addv2sf3"
|
59 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
60 |
|
|
(plus:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "%f")
|
61 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")))]
|
62 |
|
|
"TARGET_PAIRED_FLOAT"
|
63 |
|
|
"ps_add %0,%1,%2"
|
64 |
|
|
[(set_attr "type" "fp")])
|
65 |
|
|
|
66 |
|
|
(define_insn "paired_subv2sf3"
|
67 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
68 |
|
|
(minus:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "f")
|
69 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")))]
|
70 |
|
|
"TARGET_PAIRED_FLOAT"
|
71 |
|
|
"ps_sub %0,%1,%2"
|
72 |
|
|
[(set_attr "type" "fp")])
|
73 |
|
|
|
74 |
|
|
(define_insn "paired_mulv2sf3"
|
75 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
76 |
|
|
(mult:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "%f")
|
77 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")))]
|
78 |
|
|
"TARGET_PAIRED_FLOAT"
|
79 |
|
|
"ps_mul %0,%1,%2"
|
80 |
|
|
[(set_attr "type" "fp")])
|
81 |
|
|
|
82 |
|
|
(define_insn "resv2sf2"
|
83 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
84 |
|
|
(unspec:V2SF [(match_operand:V2SF 1 "gpc_reg_operand" "f")] UNSPEC_FRES))]
|
85 |
|
|
"TARGET_PAIRED_FLOAT && flag_finite_math_only"
|
86 |
|
|
"ps_res %0,%1"
|
87 |
|
|
[(set_attr "type" "fp")])
|
88 |
|
|
|
89 |
|
|
(define_insn "paired_divv2sf3"
|
90 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
91 |
|
|
(div:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "f")
|
92 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")))]
|
93 |
|
|
"TARGET_PAIRED_FLOAT"
|
94 |
|
|
"ps_div %0,%1,%2"
|
95 |
|
|
[(set_attr "type" "sdiv")])
|
96 |
|
|
|
97 |
|
|
(define_insn "paired_madds0"
|
98 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
99 |
|
|
(vec_concat:V2SF
|
100 |
|
|
(fma:SF
|
101 |
|
|
(vec_select:SF (match_operand:V2SF 1 "gpc_reg_operand" "f")
|
102 |
|
|
(parallel [(const_int 0)]))
|
103 |
|
|
(vec_select:SF (match_operand:V2SF 2 "gpc_reg_operand" "f")
|
104 |
|
|
(parallel [(const_int 0)]))
|
105 |
|
|
(vec_select:SF (match_operand:V2SF 3 "gpc_reg_operand" "f")
|
106 |
|
|
(parallel [(const_int 0)])))
|
107 |
|
|
(fma:SF
|
108 |
|
|
(vec_select:SF (match_dup 1)
|
109 |
|
|
(parallel [(const_int 1)]))
|
110 |
|
|
(vec_select:SF (match_dup 2)
|
111 |
|
|
(parallel [(const_int 0)]))
|
112 |
|
|
(vec_select:SF (match_dup 3)
|
113 |
|
|
(parallel [(const_int 1)])))))]
|
114 |
|
|
"TARGET_PAIRED_FLOAT"
|
115 |
|
|
"ps_madds0 %0,%1,%2,%3"
|
116 |
|
|
[(set_attr "type" "fp")])
|
117 |
|
|
|
118 |
|
|
(define_insn "paired_madds1"
|
119 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
120 |
|
|
(vec_concat:V2SF
|
121 |
|
|
(fma:SF
|
122 |
|
|
(vec_select:SF (match_operand:V2SF 1 "gpc_reg_operand" "f")
|
123 |
|
|
(parallel [(const_int 0)]))
|
124 |
|
|
(vec_select:SF (match_operand:V2SF 2 "gpc_reg_operand" "f")
|
125 |
|
|
(parallel [(const_int 1)]))
|
126 |
|
|
(vec_select:SF (match_operand:V2SF 3 "gpc_reg_operand" "f")
|
127 |
|
|
(parallel [(const_int 0)])))
|
128 |
|
|
(fma:SF
|
129 |
|
|
(vec_select:SF (match_dup 1)
|
130 |
|
|
(parallel [(const_int 1)]))
|
131 |
|
|
(vec_select:SF (match_dup 2)
|
132 |
|
|
(parallel [(const_int 1)]))
|
133 |
|
|
(vec_select:SF (match_dup 3)
|
134 |
|
|
(parallel [(const_int 1)])))))]
|
135 |
|
|
"TARGET_PAIRED_FLOAT"
|
136 |
|
|
"ps_madds1 %0,%1,%2,%3"
|
137 |
|
|
[(set_attr "type" "fp")])
|
138 |
|
|
|
139 |
|
|
(define_insn "*paired_madd"
|
140 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
141 |
|
|
(fma:V2SF
|
142 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
143 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")
|
144 |
|
|
(match_operand:V2SF 3 "gpc_reg_operand" "f")))]
|
145 |
|
|
"TARGET_PAIRED_FLOAT"
|
146 |
|
|
"ps_madd %0,%1,%2,%3"
|
147 |
|
|
[(set_attr "type" "fp")])
|
148 |
|
|
|
149 |
|
|
(define_insn "*paired_msub"
|
150 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
151 |
|
|
(fma:V2SF
|
152 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
153 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")
|
154 |
|
|
(neg:V2SF (match_operand:V2SF 3 "gpc_reg_operand" "f"))))]
|
155 |
|
|
"TARGET_PAIRED_FLOAT"
|
156 |
|
|
"ps_msub %0,%1,%2,%3"
|
157 |
|
|
[(set_attr "type" "fp")])
|
158 |
|
|
|
159 |
|
|
(define_insn "*paired_nmadd"
|
160 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
161 |
|
|
(neg:V2SF
|
162 |
|
|
(fma:V2SF
|
163 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
164 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")
|
165 |
|
|
(match_operand:V2SF 3 "gpc_reg_operand" "f"))))]
|
166 |
|
|
"TARGET_PAIRED_FLOAT"
|
167 |
|
|
"ps_nmadd %0,%1,%2,%3"
|
168 |
|
|
[(set_attr "type" "fp")])
|
169 |
|
|
|
170 |
|
|
(define_insn "*paired_nmsub"
|
171 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
172 |
|
|
(neg:V2SF
|
173 |
|
|
(fma:V2SF
|
174 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
175 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")
|
176 |
|
|
(neg:V2SF (match_operand:V2SF 3 "gpc_reg_operand" "f")))))]
|
177 |
|
|
"TARGET_PAIRED_FLOAT"
|
178 |
|
|
"ps_nmsub %0,%1,%2,%3"
|
179 |
|
|
[(set_attr "type" "dmul")])
|
180 |
|
|
|
181 |
|
|
(define_insn "selv2sf4"
|
182 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
183 |
|
|
(vec_concat:V2SF
|
184 |
|
|
(if_then_else:SF (ge (vec_select:SF (match_operand:V2SF 1 "gpc_reg_operand" "f")
|
185 |
|
|
(parallel [(const_int 0)]))
|
186 |
|
|
(match_operand:SF 4 "zero_fp_constant" "F"))
|
187 |
|
|
(vec_select:SF (match_operand:V2SF 2 "gpc_reg_operand" "f")
|
188 |
|
|
(parallel [(const_int 0)]))
|
189 |
|
|
(vec_select:SF (match_operand:V2SF 3 "gpc_reg_operand" "f")
|
190 |
|
|
(parallel [(const_int 0)])))
|
191 |
|
|
(if_then_else:SF (ge (vec_select:SF (match_dup 1)
|
192 |
|
|
(parallel [(const_int 1)]))
|
193 |
|
|
(match_dup 4))
|
194 |
|
|
(vec_select:SF (match_dup 2)
|
195 |
|
|
(parallel [(const_int 1)]))
|
196 |
|
|
(vec_select:SF (match_dup 3)
|
197 |
|
|
(parallel [(const_int 1)])))))]
|
198 |
|
|
|
199 |
|
|
"TARGET_PAIRED_FLOAT"
|
200 |
|
|
"ps_sel %0,%1,%2,%3"
|
201 |
|
|
[(set_attr "type" "fp")])
|
202 |
|
|
|
203 |
|
|
(define_insn "*movv2sf_paired"
|
204 |
|
|
[(set (match_operand:V2SF 0 "nonimmediate_operand" "=Z,f,f,o,r,r,f")
|
205 |
|
|
(match_operand:V2SF 1 "input_operand" "f,Z,f,r,o,r,W"))]
|
206 |
|
|
"TARGET_PAIRED_FLOAT
|
207 |
|
|
&& (register_operand (operands[0], V2SFmode)
|
208 |
|
|
|| register_operand (operands[1], V2SFmode))"
|
209 |
|
|
{
|
210 |
|
|
switch (which_alternative)
|
211 |
|
|
{
|
212 |
|
|
case 0: return "psq_stx %1,%y0,0,0";
|
213 |
|
|
case 1: return "psq_lx %0,%y1,0,0";
|
214 |
|
|
case 2: return "ps_mr %0,%1";
|
215 |
|
|
case 3: return "#";
|
216 |
|
|
case 4: return "#";
|
217 |
|
|
case 5: return "#";
|
218 |
|
|
case 6: return "#";
|
219 |
|
|
default: gcc_unreachable ();
|
220 |
|
|
}
|
221 |
|
|
}
|
222 |
|
|
[(set_attr "type" "fpstore,fpload,fp,*,*,*,*")])
|
223 |
|
|
|
224 |
|
|
(define_insn "paired_stx"
|
225 |
|
|
[(set (match_operand:V2SF 0 "memory_operand" "=Z")
|
226 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f"))]
|
227 |
|
|
"TARGET_PAIRED_FLOAT"
|
228 |
|
|
"psq_stx %1,%y0,0,0"
|
229 |
|
|
[(set_attr "type" "fpstore")])
|
230 |
|
|
|
231 |
|
|
(define_insn "paired_lx"
|
232 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
233 |
|
|
(match_operand:V2SF 1 "memory_operand" "Z"))]
|
234 |
|
|
"TARGET_PAIRED_FLOAT"
|
235 |
|
|
"psq_lx %0,%y1,0,0"
|
236 |
|
|
[(set_attr "type" "fpload")])
|
237 |
|
|
|
238 |
|
|
|
239 |
|
|
(define_split
|
240 |
|
|
[(set (match_operand:V2SF 0 "nonimmediate_operand" "")
|
241 |
|
|
(match_operand:V2SF 1 "input_operand" ""))]
|
242 |
|
|
"TARGET_PAIRED_FLOAT && reload_completed
|
243 |
|
|
&& gpr_or_gpr_p (operands[0], operands[1])"
|
244 |
|
|
[(pc)]
|
245 |
|
|
{
|
246 |
|
|
rs6000_split_multireg_move (operands[0], operands[1]); DONE;
|
247 |
|
|
})
|
248 |
|
|
|
249 |
|
|
(define_insn "paired_cmpu0"
|
250 |
|
|
[(set (match_operand:CCFP 0 "cc_reg_operand" "=y")
|
251 |
|
|
(compare:CCFP (vec_select:SF
|
252 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
253 |
|
|
(parallel [(const_int 0)]))
|
254 |
|
|
(vec_select:SF
|
255 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")
|
256 |
|
|
(parallel [(const_int 0)]))))]
|
257 |
|
|
"TARGET_PAIRED_FLOAT"
|
258 |
|
|
"ps_cmpu0 %0,%1,%2"
|
259 |
|
|
[(set_attr "type" "fpcompare")])
|
260 |
|
|
|
261 |
|
|
(define_insn "paired_cmpu1"
|
262 |
|
|
[(set (match_operand:CCFP 0 "cc_reg_operand" "=y")
|
263 |
|
|
(compare:CCFP (vec_select:SF
|
264 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
265 |
|
|
(parallel [(const_int 1)]))
|
266 |
|
|
(vec_select:SF
|
267 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")
|
268 |
|
|
(parallel [(const_int 1)]))))]
|
269 |
|
|
"TARGET_PAIRED_FLOAT"
|
270 |
|
|
"ps_cmpu1 %0,%1,%2"
|
271 |
|
|
[(set_attr "type" "fpcompare")])
|
272 |
|
|
|
273 |
|
|
(define_insn "paired_merge00"
|
274 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
275 |
|
|
(vec_select:V2SF
|
276 |
|
|
(vec_concat:V4SF
|
277 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
278 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f"))
|
279 |
|
|
(parallel [(const_int 0) (const_int 2)])))]
|
280 |
|
|
"TARGET_PAIRED_FLOAT"
|
281 |
|
|
"ps_merge00 %0, %1, %2"
|
282 |
|
|
[(set_attr "type" "fp")])
|
283 |
|
|
|
284 |
|
|
(define_insn "paired_merge01"
|
285 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
286 |
|
|
(vec_select:V2SF
|
287 |
|
|
(vec_concat:V4SF
|
288 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
289 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f"))
|
290 |
|
|
(parallel [(const_int 0) (const_int 3)])))]
|
291 |
|
|
"TARGET_PAIRED_FLOAT"
|
292 |
|
|
"ps_merge01 %0, %1, %2"
|
293 |
|
|
[(set_attr "type" "fp")])
|
294 |
|
|
|
295 |
|
|
(define_insn "paired_merge10"
|
296 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
297 |
|
|
(vec_select:V2SF
|
298 |
|
|
(vec_concat:V4SF
|
299 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
300 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f"))
|
301 |
|
|
(parallel [(const_int 1) (const_int 2)])))]
|
302 |
|
|
"TARGET_PAIRED_FLOAT"
|
303 |
|
|
"ps_merge10 %0, %1, %2"
|
304 |
|
|
[(set_attr "type" "fp")])
|
305 |
|
|
|
306 |
|
|
(define_insn "paired_merge11"
|
307 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
308 |
|
|
(vec_select:V2SF
|
309 |
|
|
(vec_concat:V4SF
|
310 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
311 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f"))
|
312 |
|
|
(parallel [(const_int 1) (const_int 3)])))]
|
313 |
|
|
"TARGET_PAIRED_FLOAT"
|
314 |
|
|
"ps_merge11 %0, %1, %2"
|
315 |
|
|
[(set_attr "type" "fp")])
|
316 |
|
|
|
317 |
|
|
(define_expand "vec_perm_constv2sf"
|
318 |
|
|
[(match_operand:V2SF 0 "gpc_reg_operand" "")
|
319 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "")
|
320 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "")
|
321 |
|
|
(match_operand:V2SI 3 "" "")]
|
322 |
|
|
"TARGET_PAIRED_FLOAT"
|
323 |
|
|
{
|
324 |
|
|
if (rs6000_expand_vec_perm_const (operands))
|
325 |
|
|
DONE;
|
326 |
|
|
else
|
327 |
|
|
FAIL;
|
328 |
|
|
})
|
329 |
|
|
|
330 |
|
|
(define_insn "paired_sum0"
|
331 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
332 |
|
|
(vec_concat:V2SF (plus:SF (vec_select:SF
|
333 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
334 |
|
|
(parallel [(const_int 0)]))
|
335 |
|
|
(vec_select:SF
|
336 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")
|
337 |
|
|
(parallel [(const_int 1)])))
|
338 |
|
|
(vec_select:SF
|
339 |
|
|
(match_operand:V2SF 3 "gpc_reg_operand" "f")
|
340 |
|
|
(parallel [(const_int 1)]))))]
|
341 |
|
|
"TARGET_PAIRED_FLOAT"
|
342 |
|
|
"ps_sum0 %0,%1,%2,%3"
|
343 |
|
|
[(set_attr "type" "fp")])
|
344 |
|
|
|
345 |
|
|
(define_insn "paired_sum1"
|
346 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
347 |
|
|
(vec_concat:V2SF (vec_select:SF
|
348 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")
|
349 |
|
|
(parallel [(const_int 1)]))
|
350 |
|
|
(plus:SF (vec_select:SF
|
351 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
352 |
|
|
(parallel [(const_int 0)]))
|
353 |
|
|
(vec_select:SF
|
354 |
|
|
(match_operand:V2SF 3 "gpc_reg_operand" "f")
|
355 |
|
|
(parallel [(const_int 1)])))))]
|
356 |
|
|
"TARGET_PAIRED_FLOAT"
|
357 |
|
|
"ps_sum1 %0,%1,%2,%3"
|
358 |
|
|
[(set_attr "type" "fp")])
|
359 |
|
|
|
360 |
|
|
(define_insn "paired_muls0"
|
361 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
362 |
|
|
(mult:V2SF (match_operand:V2SF 2 "gpc_reg_operand" "f")
|
363 |
|
|
(vec_duplicate:V2SF
|
364 |
|
|
(vec_select:SF (match_operand:V2SF 1 "gpc_reg_operand" "f")
|
365 |
|
|
(parallel [(const_int 0)])))))]
|
366 |
|
|
"TARGET_PAIRED_FLOAT"
|
367 |
|
|
"ps_muls0 %0, %1, %2"
|
368 |
|
|
[(set_attr "type" "fp")])
|
369 |
|
|
|
370 |
|
|
|
371 |
|
|
(define_insn "paired_muls1"
|
372 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
373 |
|
|
(mult:V2SF (match_operand:V2SF 2 "gpc_reg_operand" "f")
|
374 |
|
|
(vec_duplicate:V2SF
|
375 |
|
|
(vec_select:SF (match_operand:V2SF 1 "gpc_reg_operand" "f")
|
376 |
|
|
(parallel [(const_int 1)])))))]
|
377 |
|
|
"TARGET_PAIRED_FLOAT"
|
378 |
|
|
"ps_muls1 %0, %1, %2"
|
379 |
|
|
[(set_attr "type" "fp")])
|
380 |
|
|
|
381 |
|
|
(define_expand "vec_initv2sf"
|
382 |
|
|
[(match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
383 |
|
|
(match_operand 1 "" "")]
|
384 |
|
|
"TARGET_PAIRED_FLOAT"
|
385 |
|
|
{
|
386 |
|
|
paired_expand_vector_init (operands[0], operands[1]);
|
387 |
|
|
DONE;
|
388 |
|
|
})
|
389 |
|
|
|
390 |
|
|
(define_insn "*vconcatsf"
|
391 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
392 |
|
|
(vec_concat:V2SF
|
393 |
|
|
(match_operand:SF 1 "gpc_reg_operand" "f")
|
394 |
|
|
(match_operand:SF 2 "gpc_reg_operand" "f")))]
|
395 |
|
|
"TARGET_PAIRED_FLOAT"
|
396 |
|
|
"ps_merge00 %0, %1, %2"
|
397 |
|
|
[(set_attr "type" "fp")])
|
398 |
|
|
|
399 |
|
|
(define_expand "sminv2sf3"
|
400 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
401 |
|
|
(smin:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "f")
|
402 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")))]
|
403 |
|
|
"TARGET_PAIRED_FLOAT"
|
404 |
|
|
{
|
405 |
|
|
rtx tmp = gen_reg_rtx (V2SFmode);
|
406 |
|
|
|
407 |
|
|
emit_insn (gen_subv2sf3 (tmp, operands[1], operands[2]));
|
408 |
|
|
emit_insn (gen_selv2sf4 (operands[0], tmp, operands[2], operands[1], CONST0_RTX (SFmode)));
|
409 |
|
|
DONE;
|
410 |
|
|
})
|
411 |
|
|
|
412 |
|
|
(define_expand "smaxv2sf3"
|
413 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
414 |
|
|
(smax:V2SF (match_operand:V2SF 1 "gpc_reg_operand" "f")
|
415 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")))]
|
416 |
|
|
"TARGET_PAIRED_FLOAT"
|
417 |
|
|
{
|
418 |
|
|
rtx tmp = gen_reg_rtx (V2SFmode);
|
419 |
|
|
|
420 |
|
|
emit_insn (gen_subv2sf3 (tmp, operands[1], operands[2]));
|
421 |
|
|
emit_insn (gen_selv2sf4 (operands[0], tmp, operands[1], operands[2], CONST0_RTX (SFmode)));
|
422 |
|
|
DONE;
|
423 |
|
|
})
|
424 |
|
|
|
425 |
|
|
(define_expand "reduc_smax_v2sf"
|
426 |
|
|
[(match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
427 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")]
|
428 |
|
|
"TARGET_PAIRED_FLOAT"
|
429 |
|
|
{
|
430 |
|
|
rtx tmp_swap = gen_reg_rtx (V2SFmode);
|
431 |
|
|
rtx tmp = gen_reg_rtx (V2SFmode);
|
432 |
|
|
|
433 |
|
|
emit_insn (gen_paired_merge10 (tmp_swap, operands[1], operands[1]));
|
434 |
|
|
emit_insn (gen_subv2sf3 (tmp, operands[1], tmp_swap));
|
435 |
|
|
emit_insn (gen_selv2sf4 (operands[0], tmp, operands[1], tmp_swap, CONST0_RTX (SFmode)));
|
436 |
|
|
|
437 |
|
|
DONE;
|
438 |
|
|
})
|
439 |
|
|
|
440 |
|
|
(define_expand "reduc_smin_v2sf"
|
441 |
|
|
[(match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
442 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")]
|
443 |
|
|
"TARGET_PAIRED_FLOAT"
|
444 |
|
|
{
|
445 |
|
|
rtx tmp_swap = gen_reg_rtx (V2SFmode);
|
446 |
|
|
rtx tmp = gen_reg_rtx (V2SFmode);
|
447 |
|
|
|
448 |
|
|
emit_insn (gen_paired_merge10 (tmp_swap, operands[1], operands[1]));
|
449 |
|
|
emit_insn (gen_subv2sf3 (tmp, operands[1], tmp_swap));
|
450 |
|
|
emit_insn (gen_selv2sf4 (operands[0], tmp, tmp_swap, operands[1], CONST0_RTX (SFmode)));
|
451 |
|
|
|
452 |
|
|
DONE;
|
453 |
|
|
})
|
454 |
|
|
|
455 |
|
|
(define_expand "reduc_splus_v2sf"
|
456 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
457 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f"))]
|
458 |
|
|
"TARGET_PAIRED_FLOAT"
|
459 |
|
|
"
|
460 |
|
|
{
|
461 |
|
|
emit_insn (gen_paired_sum1 (operands[0], operands[1], operands[1], operands[1]));
|
462 |
|
|
DONE;
|
463 |
|
|
}")
|
464 |
|
|
|
465 |
|
|
(define_expand "movmisalignv2sf"
|
466 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
467 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f"))]
|
468 |
|
|
"TARGET_PAIRED_FLOAT"
|
469 |
|
|
{
|
470 |
|
|
paired_expand_vector_move (operands);
|
471 |
|
|
DONE;
|
472 |
|
|
})
|
473 |
|
|
|
474 |
|
|
(define_expand "vcondv2sfv2sf"
|
475 |
|
|
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
|
476 |
|
|
(if_then_else:V2SF
|
477 |
|
|
(match_operator 3 "gpc_reg_operand"
|
478 |
|
|
[(match_operand:V2SF 4 "gpc_reg_operand" "f")
|
479 |
|
|
(match_operand:V2SF 5 "gpc_reg_operand" "f")])
|
480 |
|
|
(match_operand:V2SF 1 "gpc_reg_operand" "f")
|
481 |
|
|
(match_operand:V2SF 2 "gpc_reg_operand" "f")))]
|
482 |
|
|
"TARGET_PAIRED_FLOAT && flag_unsafe_math_optimizations"
|
483 |
|
|
{
|
484 |
|
|
if (paired_emit_vector_cond_expr (operands[0], operands[1], operands[2],
|
485 |
|
|
operands[3], operands[4], operands[5]))
|
486 |
|
|
DONE;
|
487 |
|
|
else
|
488 |
|
|
FAIL;
|
489 |
|
|
})
|