1 ;; Patterns for the Intel Wireless MMX technology architecture.
2 ;; Copyright (C) 2011-2013 Free Software Foundation, Inc.
3 ;; Written by Marvell, Inc.
5 ;; This file is part of GCC.
7 ;; GCC is free software; you can redistribute it and/or modify it
8 ;; under the terms of the GNU General Public License as published
9 ;; by the Free Software Foundation; either version 3, or (at your
10 ;; option) any later version.
12 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
13 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 ;; License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GCC; see the file COPYING3. If not see
19 ;; <http://www.gnu.org/licenses/>.
21 (define_insn "iwmmxt_wabs<mode>3"
22 [(set (match_operand:VMMX 0 "register_operand" "=y")
23 (unspec:VMMX [(match_operand:VMMX 1 "register_operand" "y")] UNSPEC_WABS))]
24 "TARGET_REALLY_IWMMXT"
25 "wabs<MMX_char>%?\\t%0, %1"
26 [(set_attr "predicable" "yes")
27 (set_attr "wtype" "wabs")]
30 (define_insn "iwmmxt_wabsdiffb"
31 [(set (match_operand:V8QI 0 "register_operand" "=y")
35 (zero_extend:V8HI (match_operand:V8QI 1 "register_operand" "y"))
36 (zero_extend:V8HI (match_operand:V8QI 2 "register_operand" "y"))))))]
37 "TARGET_REALLY_IWMMXT"
38 "wabsdiffb%?\\t%0, %1, %2"
39 [(set_attr "predicable" "yes")
40 (set_attr "wtype" "wabsdiff")]
43 (define_insn "iwmmxt_wabsdiffh"
44 [(set (match_operand:V4HI 0 "register_operand" "=y")
48 (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y"))
49 (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))))))]
50 "TARGET_REALLY_IWMMXT"
51 "wabsdiffh%?\\t%0, %1, %2"
52 [(set_attr "predicable" "yes")
53 (set_attr "wtype" "wabsdiff")]
56 (define_insn "iwmmxt_wabsdiffw"
57 [(set (match_operand:V2SI 0 "register_operand" "=y")
61 (zero_extend:V2DI (match_operand:V2SI 1 "register_operand" "y"))
62 (zero_extend:V2DI (match_operand:V2SI 2 "register_operand" "y"))))))]
63 "TARGET_REALLY_IWMMXT"
64 "wabsdiffw%?\\t%0, %1, %2"
65 [(set_attr "predicable" "yes")
66 (set_attr "wtype" "wabsdiff")]
69 (define_insn "iwmmxt_waddsubhx"
70 [(set (match_operand:V4HI 0 "register_operand" "=y")
73 (match_operand:V4HI 1 "register_operand" "y")
74 (vec_select:V4HI (match_operand:V4HI 2 "register_operand" "y")
75 (parallel [(const_int 1) (const_int 0) (const_int 3) (const_int 2)])))
78 (vec_select:V4HI (match_dup 2)
79 (parallel [(const_int 1) (const_int 0) (const_int 3) (const_int 2)])))
81 "TARGET_REALLY_IWMMXT"
82 "waddsubhx%?\\t%0, %1, %2"
83 [(set_attr "predicable" "yes")
84 (set_attr "wtype" "waddsubhx")]
87 (define_insn "iwmmxt_wsubaddhx"
88 [(set (match_operand:V4HI 0 "register_operand" "=y")
91 (match_operand:V4HI 1 "register_operand" "y")
92 (vec_select:V4HI (match_operand:V4HI 2 "register_operand" "y")
93 (parallel [(const_int 1) (const_int 0) (const_int 3) (const_int 2)])))
96 (vec_select:V4HI (match_dup 2)
97 (parallel [(const_int 1) (const_int 0) (const_int 3) (const_int 2)])))
99 "TARGET_REALLY_IWMMXT"
100 "wsubaddhx%?\\t%0, %1, %2"
101 [(set_attr "predicable" "yes")
102 (set_attr "wtype" "wsubaddhx")]
105 (define_insn "addc<mode>3"
106 [(set (match_operand:VMMX2 0 "register_operand" "=y")
109 (match_operand:VMMX2 1 "register_operand" "y")
110 (match_operand:VMMX2 2 "register_operand" "y"))] UNSPEC_WADDC))]
111 "TARGET_REALLY_IWMMXT"
112 "wadd<MMX_char>c%?\\t%0, %1, %2"
113 [(set_attr "predicable" "yes")
114 (set_attr "wtype" "wadd")]
117 (define_insn "iwmmxt_avg4"
118 [(set (match_operand:V8QI 0 "register_operand" "=y")
127 (zero_extend:V8HI (match_operand:V8QI 1 "register_operand" "y"))
128 (zero_extend:V8HI (match_operand:V8QI 2 "register_operand" "y")))
129 (vec_select:V8HI (zero_extend:V8HI (match_dup 1))
130 (parallel [(const_int 7) (const_int 0) (const_int 1) (const_int 2)
131 (const_int 3) (const_int 4) (const_int 5) (const_int 6)])))
132 (vec_select:V8HI (zero_extend:V8HI (match_dup 2))
133 (parallel [(const_int 7) (const_int 0) (const_int 1) (const_int 2)
134 (const_int 3) (const_int 4) (const_int 5) (const_int 6)])))
135 (const_vector:V8HI [(const_int 1) (const_int 1) (const_int 1) (const_int 1)
136 (const_int 1) (const_int 1) (const_int 1) (const_int 1)]))
138 (const_vector:V8HI [(const_int 0) (const_int 0) (const_int 0) (const_int 0)
139 (const_int 0) (const_int 0) (const_int 0) (const_int 0)])
141 (parallel [(const_int 1) (const_int 2) (const_int 3) (const_int 4)
142 (const_int 5) (const_int 6) (const_int 7) (const_int 0)]))))]
143 "TARGET_REALLY_IWMMXT"
144 "wavg4%?\\t%0, %1, %2"
145 [(set_attr "predicable" "yes")
146 (set_attr "wtype" "wavg4")]
149 (define_insn "iwmmxt_avg4r"
150 [(set (match_operand:V8QI 0 "register_operand" "=y")
159 (zero_extend:V8HI (match_operand:V8QI 1 "register_operand" "y"))
160 (zero_extend:V8HI (match_operand:V8QI 2 "register_operand" "y")))
161 (vec_select:V8HI (zero_extend:V8HI (match_dup 1))
162 (parallel [(const_int 7) (const_int 0) (const_int 1) (const_int 2)
163 (const_int 3) (const_int 4) (const_int 5) (const_int 6)])))
164 (vec_select:V8HI (zero_extend:V8HI (match_dup 2))
165 (parallel [(const_int 7) (const_int 0) (const_int 1) (const_int 2)
166 (const_int 3) (const_int 4) (const_int 5) (const_int 6)])))
167 (const_vector:V8HI [(const_int 2) (const_int 2) (const_int 2) (const_int 2)
168 (const_int 2) (const_int 2) (const_int 2) (const_int 2)]))
170 (const_vector:V8HI [(const_int 0) (const_int 0) (const_int 0) (const_int 0)
171 (const_int 0) (const_int 0) (const_int 0) (const_int 0)])
173 (parallel [(const_int 1) (const_int 2) (const_int 3) (const_int 4)
174 (const_int 5) (const_int 6) (const_int 7) (const_int 0)]))))]
175 "TARGET_REALLY_IWMMXT"
176 "wavg4r%?\\t%0, %1, %2"
177 [(set_attr "predicable" "yes")
178 (set_attr "wtype" "wavg4")]
181 (define_insn "iwmmxt_wmaddsx"
182 [(set (match_operand:V2SI 0 "register_operand" "=y")
185 (vec_select:V2SI (sign_extend:V4SI (match_operand:V4HI 1 "register_operand" "y"))
186 (parallel [(const_int 1) (const_int 3)]))
187 (vec_select:V2SI (sign_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))
188 (parallel [(const_int 0) (const_int 2)])))
190 (vec_select:V2SI (sign_extend:V4SI (match_dup 1))
191 (parallel [(const_int 0) (const_int 2)]))
192 (vec_select:V2SI (sign_extend:V4SI (match_dup 2))
193 (parallel [(const_int 1) (const_int 3)])))))]
194 "TARGET_REALLY_IWMMXT"
195 "wmaddsx%?\\t%0, %1, %2"
196 [(set_attr "predicable" "yes")
197 (set_attr "wtype" "wmadd")]
200 (define_insn "iwmmxt_wmaddux"
201 [(set (match_operand:V2SI 0 "register_operand" "=y")
204 (vec_select:V2SI (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y"))
205 (parallel [(const_int 1) (const_int 3)]))
206 (vec_select:V2SI (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))
207 (parallel [(const_int 0) (const_int 2)])))
209 (vec_select:V2SI (zero_extend:V4SI (match_dup 1))
210 (parallel [(const_int 0) (const_int 2)]))
211 (vec_select:V2SI (zero_extend:V4SI (match_dup 2))
212 (parallel [(const_int 1) (const_int 3)])))))]
213 "TARGET_REALLY_IWMMXT"
214 "wmaddux%?\\t%0, %1, %2"
215 [(set_attr "predicable" "yes")
216 (set_attr "wtype" "wmadd")]
219 (define_insn "iwmmxt_wmaddsn"
220 [(set (match_operand:V2SI 0 "register_operand" "=y")
223 (vec_select:V2SI (sign_extend:V4SI (match_operand:V4HI 1 "register_operand" "y"))
224 (parallel [(const_int 0) (const_int 2)]))
225 (vec_select:V2SI (sign_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))
226 (parallel [(const_int 0) (const_int 2)])))
228 (vec_select:V2SI (sign_extend:V4SI (match_dup 1))
229 (parallel [(const_int 1) (const_int 3)]))
230 (vec_select:V2SI (sign_extend:V4SI (match_dup 2))
231 (parallel [(const_int 1) (const_int 3)])))))]
232 "TARGET_REALLY_IWMMXT"
233 "wmaddsn%?\\t%0, %1, %2"
234 [(set_attr "predicable" "yes")
235 (set_attr "wtype" "wmadd")]
238 (define_insn "iwmmxt_wmaddun"
239 [(set (match_operand:V2SI 0 "register_operand" "=y")
242 (vec_select:V2SI (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y"))
243 (parallel [(const_int 0) (const_int 2)]))
244 (vec_select:V2SI (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))
245 (parallel [(const_int 0) (const_int 2)])))
247 (vec_select:V2SI (zero_extend:V4SI (match_dup 1))
248 (parallel [(const_int 1) (const_int 3)]))
249 (vec_select:V2SI (zero_extend:V4SI (match_dup 2))
250 (parallel [(const_int 1) (const_int 3)])))))]
251 "TARGET_REALLY_IWMMXT"
252 "wmaddun%?\\t%0, %1, %2"
253 [(set_attr "predicable" "yes")
254 (set_attr "wtype" "wmadd")]
257 (define_insn "iwmmxt_wmulwsm"
258 [(set (match_operand:V2SI 0 "register_operand" "=y")
262 (sign_extend:V2DI (match_operand:V2SI 1 "register_operand" "y"))
263 (sign_extend:V2DI (match_operand:V2SI 2 "register_operand" "y")))
265 "TARGET_REALLY_IWMMXT"
266 "wmulwsm%?\\t%0, %1, %2"
267 [(set_attr "predicable" "yes")
268 (set_attr "wtype" "wmulw")]
271 (define_insn "iwmmxt_wmulwum"
272 [(set (match_operand:V2SI 0 "register_operand" "=y")
276 (zero_extend:V2DI (match_operand:V2SI 1 "register_operand" "y"))
277 (zero_extend:V2DI (match_operand:V2SI 2 "register_operand" "y")))
279 "TARGET_REALLY_IWMMXT"
280 "wmulwum%?\\t%0, %1, %2"
281 [(set_attr "predicable" "yes")
282 (set_attr "wtype" "wmulw")]
285 (define_insn "iwmmxt_wmulsmr"
286 [(set (match_operand:V4HI 0 "register_operand" "=y")
291 (sign_extend:V4SI (match_operand:V4HI 1 "register_operand" "y"))
292 (sign_extend:V4SI (match_operand:V4HI 2 "register_operand" "y")))
293 (const_vector:V4SI [(const_int 32768)
297 "TARGET_REALLY_IWMMXT"
298 "wmulsmr%?\\t%0, %1, %2"
299 [(set_attr "predicable" "yes")
300 (set_attr "wtype" "wmul")]
303 (define_insn "iwmmxt_wmulumr"
304 [(set (match_operand:V4HI 0 "register_operand" "=y")
309 (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y"))
310 (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y")))
311 (const_vector:V4SI [(const_int 32768)
316 "TARGET_REALLY_IWMMXT"
317 "wmulumr%?\\t%0, %1, %2"
318 [(set_attr "predicable" "yes")
319 (set_attr "wtype" "wmul")]
322 (define_insn "iwmmxt_wmulwsmr"
323 [(set (match_operand:V2SI 0 "register_operand" "=y")
328 (sign_extend:V2DI (match_operand:V2SI 1 "register_operand" "y"))
329 (sign_extend:V2DI (match_operand:V2SI 2 "register_operand" "y")))
330 (const_vector:V2DI [(const_int 2147483648)
331 (const_int 2147483648)]))
333 "TARGET_REALLY_IWMMXT"
334 "wmulwsmr%?\\t%0, %1, %2"
335 [(set_attr "predicable" "yes")
336 (set_attr "wtype" "wmul")]
339 (define_insn "iwmmxt_wmulwumr"
340 [(set (match_operand:V2SI 0 "register_operand" "=y")
345 (zero_extend:V2DI (match_operand:V2SI 1 "register_operand" "y"))
346 (zero_extend:V2DI (match_operand:V2SI 2 "register_operand" "y")))
347 (const_vector:V2DI [(const_int 2147483648)
348 (const_int 2147483648)]))
350 "TARGET_REALLY_IWMMXT"
351 "wmulwumr%?\\t%0, %1, %2"
352 [(set_attr "predicable" "yes")
353 (set_attr "wtype" "wmulw")]
356 (define_insn "iwmmxt_wmulwl"
357 [(set (match_operand:V2SI 0 "register_operand" "=y")
359 (match_operand:V2SI 1 "register_operand" "y")
360 (match_operand:V2SI 2 "register_operand" "y")))]
361 "TARGET_REALLY_IWMMXT"
362 "wmulwl%?\\t%0, %1, %2"
363 [(set_attr "predicable" "yes")
364 (set_attr "wtype" "wmulw")]
367 (define_insn "iwmmxt_wqmulm"
368 [(set (match_operand:V4HI 0 "register_operand" "=y")
369 (unspec:V4HI [(match_operand:V4HI 1 "register_operand" "y")
370 (match_operand:V4HI 2 "register_operand" "y")] UNSPEC_WQMULM))]
371 "TARGET_REALLY_IWMMXT"
372 "wqmulm%?\\t%0, %1, %2"
373 [(set_attr "predicable" "yes")
374 (set_attr "wtype" "wqmulm")]
377 (define_insn "iwmmxt_wqmulwm"
378 [(set (match_operand:V2SI 0 "register_operand" "=y")
379 (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "y")
380 (match_operand:V2SI 2 "register_operand" "y")] UNSPEC_WQMULWM))]
381 "TARGET_REALLY_IWMMXT"
382 "wqmulwm%?\\t%0, %1, %2"
383 [(set_attr "predicable" "yes")
384 (set_attr "wtype" "wqmulwm")]
387 (define_insn "iwmmxt_wqmulmr"
388 [(set (match_operand:V4HI 0 "register_operand" "=y")
389 (unspec:V4HI [(match_operand:V4HI 1 "register_operand" "y")
390 (match_operand:V4HI 2 "register_operand" "y")] UNSPEC_WQMULMR))]
391 "TARGET_REALLY_IWMMXT"
392 "wqmulmr%?\\t%0, %1, %2"
393 [(set_attr "predicable" "yes")
394 (set_attr "wtype" "wqmulm")]
397 (define_insn "iwmmxt_wqmulwmr"
398 [(set (match_operand:V2SI 0 "register_operand" "=y")
399 (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "y")
400 (match_operand:V2SI 2 "register_operand" "y")] UNSPEC_WQMULWMR))]
401 "TARGET_REALLY_IWMMXT"
402 "wqmulwmr%?\\t%0, %1, %2"
403 [(set_attr "predicable" "yes")
404 (set_attr "wtype" "wqmulwm")]
407 (define_insn "iwmmxt_waddbhusm"
408 [(set (match_operand:V8QI 0 "register_operand" "=y")
410 (const_vector:V4QI [(const_int 0) (const_int 0) (const_int 0) (const_int 0)])
413 (match_operand:V4HI 1 "register_operand" "y")
415 (vec_select:V4QI (match_operand:V8QI 2 "register_operand" "y")
416 (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7)])))))))]
417 "TARGET_REALLY_IWMMXT"
418 "waddbhusm%?\\t%0, %1, %2"
419 [(set_attr "predicable" "yes")
420 (set_attr "wtype" "waddbhus")]
423 (define_insn "iwmmxt_waddbhusl"
424 [(set (match_operand:V8QI 0 "register_operand" "=y")
428 (match_operand:V4HI 1 "register_operand" "y")
430 (vec_select:V4QI (match_operand:V8QI 2 "register_operand" "y")
431 (parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)])))))
432 (const_vector:V4QI [(const_int 0) (const_int 0) (const_int 0) (const_int 0)])))]
433 "TARGET_REALLY_IWMMXT"
434 "waddbhusl%?\\t%0, %1, %2"
435 [(set_attr "predicable" "yes")
436 (set_attr "wtype" "waddbhus")]
439 (define_insn "iwmmxt_wqmiabb"
440 [(set (match_operand:V2SI 0 "register_operand" "=y")
441 (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0")
442 (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 0))
443 (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 32))
444 (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 0))
445 (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 32))] UNSPEC_WQMIAxy))]
446 "TARGET_REALLY_IWMMXT"
447 "wqmiabb%?\\t%0, %2, %3"
448 [(set_attr "predicable" "yes")
449 (set_attr "wtype" "wqmiaxy")]
452 (define_insn "iwmmxt_wqmiabt"
453 [(set (match_operand:V2SI 0 "register_operand" "=y")
454 (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0")
455 (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 0))
456 (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 32))
457 (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 16))
458 (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 48))] UNSPEC_WQMIAxy))]
459 "TARGET_REALLY_IWMMXT"
460 "wqmiabt%?\\t%0, %2, %3"
461 [(set_attr "predicable" "yes")
462 (set_attr "wtype" "wqmiaxy")]
465 (define_insn "iwmmxt_wqmiatb"
466 [(set (match_operand:V2SI 0 "register_operand" "=y")
467 (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0")
468 (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 16))
469 (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 48))
470 (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 0))
471 (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 32))] UNSPEC_WQMIAxy))]
472 "TARGET_REALLY_IWMMXT"
473 "wqmiatb%?\\t%0, %2, %3"
474 [(set_attr "predicable" "yes")
475 (set_attr "wtype" "wqmiaxy")]
478 (define_insn "iwmmxt_wqmiatt"
479 [(set (match_operand:V2SI 0 "register_operand" "=y")
480 (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0")
481 (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 16))
482 (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 48))
483 (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 16))
484 (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 48))] UNSPEC_WQMIAxy))]
485 "TARGET_REALLY_IWMMXT"
486 "wqmiatt%?\\t%0, %2, %3"
487 [(set_attr "predicable" "yes")
488 (set_attr "wtype" "wqmiaxy")]
491 (define_insn "iwmmxt_wqmiabbn"
492 [(set (match_operand:V2SI 0 "register_operand" "=y")
493 (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0")
494 (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 0))
495 (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 32))
496 (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 0))
497 (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 32))] UNSPEC_WQMIAxyn))]
498 "TARGET_REALLY_IWMMXT"
499 "wqmiabbn%?\\t%0, %2, %3"
500 [(set_attr "predicable" "yes")
501 (set_attr "wtype" "wqmiaxy")]
504 (define_insn "iwmmxt_wqmiabtn"
505 [(set (match_operand:V2SI 0 "register_operand" "=y")
506 (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0")
507 (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 0))
508 (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 32))
509 (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 16))
510 (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 48))] UNSPEC_WQMIAxyn))]
511 "TARGET_REALLY_IWMMXT"
512 "wqmiabtn%?\\t%0, %2, %3"
513 [(set_attr "predicable" "yes")
514 (set_attr "wtype" "wqmiaxy")]
517 (define_insn "iwmmxt_wqmiatbn"
518 [(set (match_operand:V2SI 0 "register_operand" "=y")
519 (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0")
520 (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 16))
521 (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 48))
522 (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 0))
523 (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 32))] UNSPEC_WQMIAxyn))]
524 "TARGET_REALLY_IWMMXT"
525 "wqmiatbn%?\\t%0, %2, %3"
526 [(set_attr "predicable" "yes")
527 (set_attr "wtype" "wqmiaxy")]
530 (define_insn "iwmmxt_wqmiattn"
531 [(set (match_operand:V2SI 0 "register_operand" "=y")
532 (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0")
533 (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 16))
534 (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 48))
535 (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 16))
536 (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 48))] UNSPEC_WQMIAxyn))]
537 "TARGET_REALLY_IWMMXT"
538 "wqmiattn%?\\t%0, %2, %3"
539 [(set_attr "predicable" "yes")
540 (set_attr "wtype" "wqmiaxy")]
543 (define_insn "iwmmxt_wmiabb"
544 [(set (match_operand:DI 0 "register_operand" "=y")
545 (plus:DI (match_operand:DI 1 "register_operand" "0")
549 (vec_select:HI (match_operand:V4HI 2 "register_operand" "y")
550 (parallel [(const_int 0)])))
552 (vec_select:HI (match_operand:V4HI 3 "register_operand" "y")
553 (parallel [(const_int 0)]))))
556 (vec_select:HI (match_dup 2)
557 (parallel [(const_int 2)])))
559 (vec_select:HI (match_dup 3)
560 (parallel [(const_int 2)])))))))]
561 "TARGET_REALLY_IWMMXT"
562 "wmiabb%?\\t%0, %2, %3"
563 [(set_attr "predicable" "yes")
564 (set_attr "wtype" "wmiaxy")]
567 (define_insn "iwmmxt_wmiabt"
568 [(set (match_operand:DI 0 "register_operand" "=y")
569 (plus:DI (match_operand:DI 1 "register_operand" "0")
573 (vec_select:HI (match_operand:V4HI 2 "register_operand" "y")
574 (parallel [(const_int 0)])))
576 (vec_select:HI (match_operand:V4HI 3 "register_operand" "y")
577 (parallel [(const_int 1)]))))
580 (vec_select:HI (match_dup 2)
581 (parallel [(const_int 2)])))
583 (vec_select:HI (match_dup 3)
584 (parallel [(const_int 3)])))))))]
585 "TARGET_REALLY_IWMMXT"
586 "wmiabt%?\\t%0, %2, %3"
587 [(set_attr "predicable" "yes")
588 (set_attr "wtype" "wmiaxy")]
591 (define_insn "iwmmxt_wmiatb"
592 [(set (match_operand:DI 0 "register_operand" "=y")
593 (plus:DI (match_operand:DI 1 "register_operand" "0")
597 (vec_select:HI (match_operand:V4HI 2 "register_operand" "y")
598 (parallel [(const_int 1)])))
600 (vec_select:HI (match_operand:V4HI 3 "register_operand" "y")
601 (parallel [(const_int 0)]))))
604 (vec_select:HI (match_dup 2)
605 (parallel [(const_int 3)])))
607 (vec_select:HI (match_dup 3)
608 (parallel [(const_int 2)])))))))]
609 "TARGET_REALLY_IWMMXT"
610 "wmiatb%?\\t%0, %2, %3"
611 [(set_attr "predicable" "yes")
612 (set_attr "wtype" "wmiaxy")]
615 (define_insn "iwmmxt_wmiatt"
616 [(set (match_operand:DI 0 "register_operand" "=y")
617 (plus:DI (match_operand:DI 1 "register_operand" "0")
621 (vec_select:HI (match_operand:V4HI 2 "register_operand" "y")
622 (parallel [(const_int 1)])))
624 (vec_select:HI (match_operand:V4HI 3 "register_operand" "y")
625 (parallel [(const_int 1)]))))
628 (vec_select:HI (match_dup 2)
629 (parallel [(const_int 3)])))
631 (vec_select:HI (match_dup 3)
632 (parallel [(const_int 3)])))))))]
633 "TARGET_REALLY_IWMMXT"
634 "wmiatt%?\\t%0, %2, %3"
635 [(set_attr "predicable" "yes")
636 (set_attr "wtype" "wmiaxy")]
639 (define_insn "iwmmxt_wmiabbn"
640 [(set (match_operand:DI 0 "register_operand" "=y")
641 (minus:DI (match_operand:DI 1 "register_operand" "0")
645 (vec_select:HI (match_operand:V4HI 2 "register_operand" "y")
646 (parallel [(const_int 0)])))
648 (vec_select:HI (match_operand:V4HI 3 "register_operand" "y")
649 (parallel [(const_int 0)]))))
652 (vec_select:HI (match_dup 2)
653 (parallel [(const_int 2)])))
655 (vec_select:HI (match_dup 3)
656 (parallel [(const_int 2)])))))))]
657 "TARGET_REALLY_IWMMXT"
658 "wmiabbn%?\\t%0, %2, %3"
659 [(set_attr "predicable" "yes")
660 (set_attr "wtype" "wmiaxy")]
663 (define_insn "iwmmxt_wmiabtn"
664 [(set (match_operand:DI 0 "register_operand" "=y")
665 (minus:DI (match_operand:DI 1 "register_operand" "0")
669 (vec_select:HI (match_operand:V4HI 2 "register_operand" "y")
670 (parallel [(const_int 0)])))
672 (vec_select:HI (match_operand:V4HI 3 "register_operand" "y")
673 (parallel [(const_int 1)]))))
676 (vec_select:HI (match_dup 2)
677 (parallel [(const_int 2)])))
679 (vec_select:HI (match_dup 3)
680 (parallel [(const_int 3)])))))))]
681 "TARGET_REALLY_IWMMXT"
682 "wmiabtn%?\\t%0, %2, %3"
683 [(set_attr "predicable" "yes")
684 (set_attr "wtype" "wmiaxy")]
687 (define_insn "iwmmxt_wmiatbn"
688 [(set (match_operand:DI 0 "register_operand" "=y")
689 (minus:DI (match_operand:DI 1 "register_operand" "0")
693 (vec_select:HI (match_operand:V4HI 2 "register_operand" "y")
694 (parallel [(const_int 1)])))
696 (vec_select:HI (match_operand:V4HI 3 "register_operand" "y")
697 (parallel [(const_int 0)]))))
700 (vec_select:HI (match_dup 2)
701 (parallel [(const_int 3)])))
703 (vec_select:HI (match_dup 3)
704 (parallel [(const_int 2)])))))))]
705 "TARGET_REALLY_IWMMXT"
706 "wmiatbn%?\\t%0, %2, %3"
707 [(set_attr "predicable" "yes")
708 (set_attr "wtype" "wmiaxy")]
711 (define_insn "iwmmxt_wmiattn"
712 [(set (match_operand:DI 0 "register_operand" "=y")
713 (minus:DI (match_operand:DI 1 "register_operand" "0")
717 (vec_select:HI (match_operand:V4HI 2 "register_operand" "y")
718 (parallel [(const_int 1)])))
720 (vec_select:HI (match_operand:V4HI 3 "register_operand" "y")
721 (parallel [(const_int 1)]))))
724 (vec_select:HI (match_dup 2)
725 (parallel [(const_int 3)])))
727 (vec_select:HI (match_dup 3)
728 (parallel [(const_int 3)])))))))]
729 "TARGET_REALLY_IWMMXT"
730 "wmiattn%?\\t%0, %2, %3"
731 [(set_attr "predicable" "yes")
732 (set_attr "wtype" "wmiaxy")]
735 (define_insn "iwmmxt_wmiawbb"
736 [(set (match_operand:DI 0 "register_operand" "=y")
738 (match_operand:DI 1 "register_operand" "0")
740 (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 0)])))
741 (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 0)]))))))]
742 "TARGET_REALLY_IWMMXT"
743 "wmiawbb%?\\t%0, %2, %3"
744 [(set_attr "predicable" "yes")
745 (set_attr "wtype" "wmiawxy")]
748 (define_insn "iwmmxt_wmiawbt"
749 [(set (match_operand:DI 0 "register_operand" "=y")
751 (match_operand:DI 1 "register_operand" "0")
753 (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 0)])))
754 (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 1)]))))))]
755 "TARGET_REALLY_IWMMXT"
756 "wmiawbt%?\\t%0, %2, %3"
757 [(set_attr "predicable" "yes")
758 (set_attr "wtype" "wmiawxy")]
761 (define_insn "iwmmxt_wmiawtb"
762 [(set (match_operand:DI 0 "register_operand" "=y")
764 (match_operand:DI 1 "register_operand" "0")
766 (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 1)])))
767 (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 0)]))))))]
768 "TARGET_REALLY_IWMMXT"
769 "wmiawtb%?\\t%0, %2, %3"
770 [(set_attr "predicable" "yes")
771 (set_attr "wtype" "wmiawxy")]
774 (define_insn "iwmmxt_wmiawtt"
775 [(set (match_operand:DI 0 "register_operand" "=y")
777 (match_operand:DI 1 "register_operand" "0")
779 (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 1)])))
780 (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 1)]))))))]
781 "TARGET_REALLY_IWMMXT"
782 "wmiawtt%?\\t%0, %2, %3"
783 [(set_attr "predicable" "yes")
784 (set_attr "wtype" "wmiawxy")]
787 (define_insn "iwmmxt_wmiawbbn"
788 [(set (match_operand:DI 0 "register_operand" "=y")
790 (match_operand:DI 1 "register_operand" "0")
792 (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 0)])))
793 (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 0)]))))))]
794 "TARGET_REALLY_IWMMXT"
795 "wmiawbbn%?\\t%0, %2, %3"
796 [(set_attr "predicable" "yes")
797 (set_attr "wtype" "wmiawxy")]
800 (define_insn "iwmmxt_wmiawbtn"
801 [(set (match_operand:DI 0 "register_operand" "=y")
803 (match_operand:DI 1 "register_operand" "0")
805 (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 0)])))
806 (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 1)]))))))]
807 "TARGET_REALLY_IWMMXT"
808 "wmiawbtn%?\\t%0, %2, %3"
809 [(set_attr "predicable" "yes")
810 (set_attr "wtype" "wmiawxy")]
813 (define_insn "iwmmxt_wmiawtbn"
814 [(set (match_operand:DI 0 "register_operand" "=y")
816 (match_operand:DI 1 "register_operand" "0")
818 (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 1)])))
819 (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 0)]))))))]
820 "TARGET_REALLY_IWMMXT"
821 "wmiawtbn%?\\t%0, %2, %3"
822 [(set_attr "predicable" "yes")
823 (set_attr "wtype" "wmiawxy")]
826 (define_insn "iwmmxt_wmiawttn"
827 [(set (match_operand:DI 0 "register_operand" "=y")
829 (match_operand:DI 1 "register_operand" "0")
831 (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 1)])))
832 (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 1)]))))))]
833 "TARGET_REALLY_IWMMXT"
834 "wmiawttn%?\\t%0, %2, %3"
835 [(set_attr "predicable" "yes")
836 (set_attr "wtype" "wmiawxy")]
839 (define_insn "iwmmxt_wmerge"
840 [(set (match_operand:DI 0 "register_operand" "=y")
843 (match_operand:DI 2 "register_operand" "y")
847 (match_operand:SI 3 "immediate_operand" "i")
851 (match_operand:DI 1 "register_operand" "y")
858 "TARGET_REALLY_IWMMXT"
859 "wmerge%?\\t%0, %1, %2, %3"
860 [(set_attr "predicable" "yes")
861 (set_attr "wtype" "wmerge")]
864 (define_insn "iwmmxt_tandc<mode>3"
865 [(set (reg:CC CC_REGNUM)
866 (subreg:CC (unspec:VMMX [(const_int 0)] UNSPEC_TANDC) 0))
867 (unspec:CC [(reg:SI 15)] UNSPEC_TANDC)]
868 "TARGET_REALLY_IWMMXT"
869 "tandc<MMX_char>%?\\t r15"
870 [(set_attr "predicable" "yes")
871 (set_attr "wtype" "tandc")]
874 (define_insn "iwmmxt_torc<mode>3"
875 [(set (reg:CC CC_REGNUM)
876 (subreg:CC (unspec:VMMX [(const_int 0)] UNSPEC_TORC) 0))
877 (unspec:CC [(reg:SI 15)] UNSPEC_TORC)]
878 "TARGET_REALLY_IWMMXT"
879 "torc<MMX_char>%?\\t r15"
880 [(set_attr "predicable" "yes")
881 (set_attr "wtype" "torc")]
884 (define_insn "iwmmxt_torvsc<mode>3"
885 [(set (reg:CC CC_REGNUM)
886 (subreg:CC (unspec:VMMX [(const_int 0)] UNSPEC_TORVSC) 0))
887 (unspec:CC [(reg:SI 15)] UNSPEC_TORVSC)]
888 "TARGET_REALLY_IWMMXT"
889 "torvsc<MMX_char>%?\\t r15"
890 [(set_attr "predicable" "yes")
891 (set_attr "wtype" "torvsc")]
894 (define_insn "iwmmxt_textrc<mode>3"
895 [(set (reg:CC CC_REGNUM)
896 (subreg:CC (unspec:VMMX [(const_int 0)
897 (match_operand:SI 0 "immediate_operand" "i")] UNSPEC_TEXTRC) 0))
898 (unspec:CC [(reg:SI 15)] UNSPEC_TEXTRC)]
899 "TARGET_REALLY_IWMMXT"
900 "textrc<MMX_char>%?\\t r15, %0"
901 [(set_attr "predicable" "yes")
902 (set_attr "wtype" "textrc")]