1 ;; Copyright (C) 2007, 2010, 2012 Free Software Foundation, Inc.
3 ;; This file is part of GCC.
5 ;; GCC is free software; you can redistribute it and/or modify
6 ;; it under the terms of the GNU General Public License as published by
7 ;; the Free Software Foundation; either version 3, or (at your option)
10 ;; GCC is distributed in the hope that it will be useful,
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ;; GNU General Public License for more details.
15 ;; You should have received a copy of the GNU General Public License
16 ;; along with GCC; see the file COPYING3. If not see
17 ;; <http://www.gnu.org/licenses/>.
19 ; MIPS DSP ASE REV 2 Revision 0.02 11/24/2006
21 (define_c_enum "unspec" [
48 UNSPEC_PRECR_SRA_R_PH_W
73 (define_insn "mips_absq_s_qb"
75 [(set (match_operand:V4QI 0 "register_operand" "=d")
76 (unspec:V4QI [(match_operand:V4QI 1 "reg_or_0_operand" "dYG")]
78 (set (reg:CCDSP CCDSP_OU_REGNUM)
79 (unspec:CCDSP [(match_dup 1)] UNSPEC_ABSQ_S_QB))])]
82 [(set_attr "type" "dspalusat")
83 (set_attr "mode" "SI")])
85 (define_insn "mips_addu_ph"
87 [(set (match_operand:V2HI 0 "register_operand" "=d")
88 (plus:V2HI (match_operand:V2HI 1 "reg_or_0_operand" "dYG")
89 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")))
90 (set (reg:CCDSP CCDSP_OU_REGNUM)
91 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_ADDU_PH))])]
94 [(set_attr "type" "dspalu")
95 (set_attr "mode" "SI")])
97 (define_insn "mips_addu_s_ph"
99 [(set (match_operand:V2HI 0 "register_operand" "=d")
100 (unspec:V2HI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG")
101 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")]
103 (set (reg:CCDSP CCDSP_OU_REGNUM)
104 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_ADDU_S_PH))])]
106 "addu_s.ph\t%0,%z1,%z2"
107 [(set_attr "type" "dspalusat")
108 (set_attr "mode" "SI")])
110 (define_insn "mips_adduh_qb"
111 [(set (match_operand:V4QI 0 "register_operand" "=d")
112 (unspec:V4QI [(match_operand:V4QI 1 "reg_or_0_operand" "dYG")
113 (match_operand:V4QI 2 "reg_or_0_operand" "dYG")]
116 "adduh.qb\t%0,%z1,%z2"
117 [(set_attr "type" "dspalu")
118 (set_attr "mode" "SI")])
120 (define_insn "mips_adduh_r_qb"
121 [(set (match_operand:V4QI 0 "register_operand" "=d")
122 (unspec:V4QI [(match_operand:V4QI 1 "reg_or_0_operand" "dYG")
123 (match_operand:V4QI 2 "reg_or_0_operand" "dYG")]
126 "adduh_r.qb\t%0,%z1,%z2"
127 [(set_attr "type" "dspalusat")
128 (set_attr "mode" "SI")])
130 (define_insn "mips_append"
131 [(set (match_operand:SI 0 "register_operand" "=d")
132 (unspec:SI [(match_operand:SI 1 "register_operand" "0")
133 (match_operand:SI 2 "reg_or_0_operand" "dJ")
134 (match_operand:SI 3 "const_int_operand" "n")]
138 if (INTVAL (operands[3]) & ~(unsigned HOST_WIDE_INT) 31)
139 operands[2] = GEN_INT (INTVAL (operands[2]) & 31);
140 return "append\t%0,%z2,%3";
142 [(set_attr "type" "dspalu")
143 (set_attr "mode" "SI")])
145 (define_insn "mips_balign"
146 [(set (match_operand:SI 0 "register_operand" "=d")
147 (unspec:SI [(match_operand:SI 1 "register_operand" "0")
148 (match_operand:SI 2 "reg_or_0_operand" "dJ")
149 (match_operand:SI 3 "const_int_operand" "n")]
153 if (INTVAL (operands[3]) & ~(unsigned HOST_WIDE_INT) 3)
154 operands[2] = GEN_INT (INTVAL (operands[2]) & 3);
155 return "balign\t%0,%z2,%3";
157 [(set_attr "type" "dspalu")
158 (set_attr "mode" "SI")])
160 (define_insn "mips_cmpgdu_eq_qb"
162 [(set (match_operand:SI 0 "register_operand" "=d")
163 (unspec:SI [(match_operand:V4QI 1 "reg_or_0_operand" "dYG")
164 (match_operand:V4QI 2 "reg_or_0_operand" "dYG")]
165 UNSPEC_CMPGDU_EQ_QB))
166 (set (reg:CCDSP CCDSP_CC_REGNUM)
167 (unspec:CCDSP [(match_dup 1) (match_dup 2)
168 (reg:CCDSP CCDSP_CC_REGNUM)]
169 UNSPEC_CMPGDU_EQ_QB))])]
171 "cmpgdu.eq.qb\t%0,%z1,%z2"
172 [(set_attr "type" "dspalu")
173 (set_attr "mode" "SI")])
175 (define_insn "mips_cmpgdu_lt_qb"
177 [(set (match_operand:SI 0 "register_operand" "=d")
178 (unspec:SI [(match_operand:V4QI 1 "reg_or_0_operand" "dYG")
179 (match_operand:V4QI 2 "reg_or_0_operand" "dYG")]
180 UNSPEC_CMPGDU_LT_QB))
181 (set (reg:CCDSP CCDSP_CC_REGNUM)
182 (unspec:CCDSP [(match_dup 1) (match_dup 2)
183 (reg:CCDSP CCDSP_CC_REGNUM)]
184 UNSPEC_CMPGDU_LT_QB))])]
186 "cmpgdu.lt.qb\t%0,%z1,%z2"
187 [(set_attr "type" "dspalu")
188 (set_attr "mode" "SI")])
190 (define_insn "mips_cmpgdu_le_qb"
192 [(set (match_operand:SI 0 "register_operand" "=d")
193 (unspec:SI [(match_operand:V4QI 1 "reg_or_0_operand" "dYG")
194 (match_operand:V4QI 2 "reg_or_0_operand" "dYG")]
195 UNSPEC_CMPGDU_LE_QB))
196 (set (reg:CCDSP CCDSP_CC_REGNUM)
197 (unspec:CCDSP [(match_dup 1) (match_dup 2)
198 (reg:CCDSP CCDSP_CC_REGNUM)]
199 UNSPEC_CMPGDU_LE_QB))])]
201 "cmpgdu.le.qb\t%0,%z1,%z2"
202 [(set_attr "type" "dspalu")
203 (set_attr "mode" "SI")])
205 (define_insn "mips_dpa_w_ph"
206 [(set (match_operand:DI 0 "register_operand" "=a")
207 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
208 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")
209 (match_operand:V2HI 3 "reg_or_0_operand" "dYG")]
211 "ISA_HAS_DSPR2 && !TARGET_64BIT"
212 "dpa.w.ph\t%q0,%z2,%z3"
213 [(set_attr "type" "dspmac")
214 (set_attr "accum_in" "1")
215 (set_attr "mode" "SI")])
217 (define_insn "mips_dps_w_ph"
218 [(set (match_operand:DI 0 "register_operand" "=a")
219 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
220 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")
221 (match_operand:V2HI 3 "reg_or_0_operand" "dYG")]
223 "ISA_HAS_DSPR2 && !TARGET_64BIT"
224 "dps.w.ph\t%q0,%z2,%z3"
225 [(set_attr "type" "dspmac")
226 (set_attr "accum_in" "1")
227 (set_attr "mode" "SI")])
229 (define_insn "mulv2hi3"
231 [(set (match_operand:V2HI 0 "register_operand" "=d")
232 (mult:V2HI (match_operand:V2HI 1 "register_operand" "d")
233 (match_operand:V2HI 2 "register_operand" "d")))
234 (set (reg:CCDSP CCDSP_OU_REGNUM)
235 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_MUL_PH))
236 (clobber (match_scratch:DI 3 "=x"))])]
239 [(set_attr "type" "imul3")
240 (set_attr "mode" "SI")])
242 (define_insn "mips_mul_s_ph"
244 [(set (match_operand:V2HI 0 "register_operand" "=d")
245 (unspec:V2HI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG")
246 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")]
248 (set (reg:CCDSP CCDSP_OU_REGNUM)
249 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_MUL_S_PH))
250 (clobber (match_scratch:DI 3 "=x"))])]
252 "mul_s.ph\t%0,%z1,%z2"
253 [(set_attr "type" "imul3")
254 (set_attr "mode" "SI")])
256 (define_insn "mips_mulq_rs_w"
258 [(set (match_operand:SI 0 "register_operand" "=d")
259 (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "dJ")
260 (match_operand:SI 2 "reg_or_0_operand" "dJ")]
262 (set (reg:CCDSP CCDSP_OU_REGNUM)
263 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_MULQ_RS_W))
264 (clobber (match_scratch:DI 3 "=x"))])]
266 "mulq_rs.w\t%0,%z1,%z2"
267 [(set_attr "type" "imul3")
268 (set_attr "mode" "SI")])
270 (define_insn "mips_mulq_s_ph"
272 [(set (match_operand:V2HI 0 "register_operand" "=d")
273 (unspec:V2HI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG")
274 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")]
276 (set (reg:CCDSP CCDSP_OU_REGNUM)
277 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_MULQ_S_PH))
278 (clobber (match_scratch:DI 3 "=x"))])]
280 "mulq_s.ph\t%0,%z1,%z2"
281 [(set_attr "type" "imul3")
282 (set_attr "mode" "SI")])
284 (define_insn "mips_mulq_s_w"
286 [(set (match_operand:SI 0 "register_operand" "=d")
287 (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "dJ")
288 (match_operand:SI 2 "reg_or_0_operand" "dJ")]
290 (set (reg:CCDSP CCDSP_OU_REGNUM)
291 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_MULQ_S_W))
292 (clobber (match_scratch:DI 3 "=x"))])]
294 "mulq_s.w\t%0,%z1,%z2"
295 [(set_attr "type" "imul3")
296 (set_attr "mode" "SI")])
298 (define_insn "mips_mulsa_w_ph"
299 [(set (match_operand:DI 0 "register_operand" "=a")
300 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
301 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")
302 (match_operand:V2HI 3 "reg_or_0_operand" "dYG")]
304 "ISA_HAS_DSPR2 && !TARGET_64BIT"
305 "mulsa.w.ph\t%q0,%z2,%z3"
306 [(set_attr "type" "dspmac")
307 (set_attr "accum_in" "1")
308 (set_attr "mode" "SI")])
310 (define_insn "mips_precr_qb_ph"
311 [(set (match_operand:V4QI 0 "register_operand" "=d")
312 (unspec:V4QI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG")
313 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")]
314 UNSPEC_PRECR_QB_PH))]
316 "precr.qb.ph\t%0,%z1,%z2"
317 [(set_attr "type" "dspalu")
318 (set_attr "mode" "SI")])
320 (define_insn "mips_precr_sra_ph_w"
321 [(set (match_operand:V2HI 0 "register_operand" "=d")
322 (unspec:V2HI [(match_operand:SI 1 "register_operand" "0")
323 (match_operand:SI 2 "reg_or_0_operand" "dJ")
324 (match_operand:SI 3 "const_int_operand" "n")]
325 UNSPEC_PRECR_SRA_PH_W))]
328 if (INTVAL (operands[3]) & ~(unsigned HOST_WIDE_INT) 31)
329 operands[2] = GEN_INT (INTVAL (operands[2]) & 31);
330 return "precr_sra.ph.w\t%0,%z2,%3";
332 [(set_attr "type" "dspalu")
333 (set_attr "mode" "SI")])
335 (define_insn "mips_precr_sra_r_ph_w"
336 [(set (match_operand:V2HI 0 "register_operand" "=d")
337 (unspec:V2HI [(match_operand:SI 1 "register_operand" "0")
338 (match_operand:SI 2 "reg_or_0_operand" "dJ")
339 (match_operand:SI 3 "const_int_operand" "n")]
340 UNSPEC_PRECR_SRA_R_PH_W))]
343 if (INTVAL (operands[3]) & ~(unsigned HOST_WIDE_INT) 31)
344 operands[2] = GEN_INT (INTVAL (operands[2]) & 31);
345 return "precr_sra_r.ph.w\t%0,%z2,%3";
347 [(set_attr "type" "dspalu")
348 (set_attr "mode" "SI")])
350 (define_insn "mips_prepend"
351 [(set (match_operand:SI 0 "register_operand" "=d")
352 (unspec:SI [(match_operand:SI 1 "register_operand" "0")
353 (match_operand:SI 2 "reg_or_0_operand" "dJ")
354 (match_operand:SI 3 "const_int_operand" "n")]
358 if (INTVAL (operands[3]) & ~(unsigned HOST_WIDE_INT) 31)
359 operands[3] = GEN_INT (INTVAL (operands[3]) & 31);
360 return "prepend\t%0,%z2,%3";
362 [(set_attr "type" "dspalu")
363 (set_attr "mode" "SI")])
365 (define_insn "mips_shra_qb"
366 [(set (match_operand:V4QI 0 "register_operand" "=d,d")
367 (unspec:V4QI [(match_operand:V4QI 1 "reg_or_0_operand" "dYG,dYG")
368 (match_operand:SI 2 "arith_operand" "I,d")]
372 if (which_alternative == 0)
374 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 7)
375 operands[2] = GEN_INT (INTVAL (operands[2]) & 7);
376 return "shra.qb\t%0,%z1,%2";
378 return "shrav.qb\t%0,%z1,%2";
380 [(set_attr "type" "dspalu")
381 (set_attr "mode" "SI")])
384 (define_insn "mips_shra_r_qb"
385 [(set (match_operand:V4QI 0 "register_operand" "=d,d")
386 (unspec:V4QI [(match_operand:V4QI 1 "reg_or_0_operand" "dYG,dYG")
387 (match_operand:SI 2 "arith_operand" "I,d")]
391 if (which_alternative == 0)
393 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 7)
394 operands[2] = GEN_INT (INTVAL (operands[2]) & 7);
395 return "shra_r.qb\t%0,%z1,%2";
397 return "shrav_r.qb\t%0,%z1,%2";
399 [(set_attr "type" "dspalu")
400 (set_attr "mode" "SI")])
402 (define_insn "mips_shrl_ph"
403 [(set (match_operand:V2HI 0 "register_operand" "=d,d")
404 (unspec:V2HI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG,dYG")
405 (match_operand:SI 2 "arith_operand" "I,d")]
409 if (which_alternative == 0)
411 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 15)
412 operands[2] = GEN_INT (INTVAL (operands[2]) & 15);
413 return "shrl.ph\t%0,%z1,%2";
415 return "shrlv.ph\t%0,%z1,%2";
417 [(set_attr "type" "dspalu")
418 (set_attr "mode" "SI")])
420 (define_insn "mips_subu_ph"
422 [(set (match_operand:V2HI 0 "register_operand" "=d")
423 (unspec:V2HI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG")
424 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")]
426 (set (reg:CCDSP CCDSP_OU_REGNUM)
427 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_SUBU_PH))])]
429 "subu.ph\t%0,%z1,%z2"
430 [(set_attr "type" "dspalu")
431 (set_attr "mode" "SI")])
433 (define_insn "mips_subu_s_ph"
435 [(set (match_operand:V2HI 0 "register_operand" "=d")
436 (unspec:V2HI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG")
437 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")]
439 (set (reg:CCDSP CCDSP_OU_REGNUM)
440 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_SUBU_S_PH))])]
442 "subu_s.ph\t%0,%z1,%z2"
443 [(set_attr "type" "dspalusat")
444 (set_attr "mode" "SI")])
446 (define_insn "mips_subuh_qb"
447 [(set (match_operand:V4QI 0 "register_operand" "=d")
448 (unspec:V4QI [(match_operand:V4QI 1 "reg_or_0_operand" "dYG")
449 (match_operand:V4QI 2 "reg_or_0_operand" "dYG")]
452 "subuh.qb\t%0,%z1,%z2"
453 [(set_attr "type" "dspalu")
454 (set_attr "mode" "SI")])
456 (define_insn "mips_subuh_r_qb"
457 [(set (match_operand:V4QI 0 "register_operand" "=d")
458 (unspec:V4QI [(match_operand:V4QI 1 "reg_or_0_operand" "dYG")
459 (match_operand:V4QI 2 "reg_or_0_operand" "dYG")]
462 "subuh_r.qb\t%0,%z1,%z2"
463 [(set_attr "type" "dspalu")
464 (set_attr "mode" "SI")])
466 (define_insn "mips_addqh_ph"
467 [(set (match_operand:V2HI 0 "register_operand" "=d")
468 (unspec:V2HI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG")
469 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")]
472 "addqh.ph\t%0,%z1,%z2"
473 [(set_attr "type" "dspalu")
474 (set_attr "mode" "SI")])
476 (define_insn "mips_addqh_r_ph"
477 [(set (match_operand:V2HI 0 "register_operand" "=d")
478 (unspec:V2HI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG")
479 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")]
482 "addqh_r.ph\t%0,%z1,%z2"
483 [(set_attr "type" "dspalu")
484 (set_attr "mode" "SI")])
486 (define_insn "mips_addqh_w"
487 [(set (match_operand:SI 0 "register_operand" "=d")
488 (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "dJ")
489 (match_operand:SI 2 "reg_or_0_operand" "dJ")]
492 "addqh.w\t%0,%z1,%z2"
493 [(set_attr "type" "dspalu")
494 (set_attr "mode" "SI")])
496 (define_insn "mips_addqh_r_w"
497 [(set (match_operand:SI 0 "register_operand" "=d")
498 (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "dJ")
499 (match_operand:SI 2 "reg_or_0_operand" "dJ")]
502 "addqh_r.w\t%0,%z1,%z2"
503 [(set_attr "type" "dspalu")
504 (set_attr "mode" "SI")])
506 (define_insn "mips_subqh_ph"
507 [(set (match_operand:V2HI 0 "register_operand" "=d")
508 (unspec:V2HI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG")
509 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")]
512 "subqh.ph\t%0,%z1,%z2"
513 [(set_attr "type" "dspalu")
514 (set_attr "mode" "SI")])
516 (define_insn "mips_subqh_r_ph"
517 [(set (match_operand:V2HI 0 "register_operand" "=d")
518 (unspec:V2HI [(match_operand:V2HI 1 "reg_or_0_operand" "dYG")
519 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")]
522 "subqh_r.ph\t%0,%z1,%z2"
523 [(set_attr "type" "dspalu")
524 (set_attr "mode" "SI")])
526 (define_insn "mips_subqh_w"
527 [(set (match_operand:SI 0 "register_operand" "=d")
528 (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "dJ")
529 (match_operand:SI 2 "reg_or_0_operand" "dJ")]
532 "subqh.w\t%0,%z1,%z2"
533 [(set_attr "type" "dspalu")
534 (set_attr "mode" "SI")])
536 (define_insn "mips_subqh_r_w"
537 [(set (match_operand:SI 0 "register_operand" "=d")
538 (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "dJ")
539 (match_operand:SI 2 "reg_or_0_operand" "dJ")]
542 "subqh_r.w\t%0,%z1,%z2"
543 [(set_attr "type" "dspalu")
544 (set_attr "mode" "SI")])
546 (define_insn "mips_dpax_w_ph"
547 [(set (match_operand:DI 0 "register_operand" "=a")
548 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
549 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")
550 (match_operand:V2HI 3 "reg_or_0_operand" "dYG")]
552 "ISA_HAS_DSPR2 && !TARGET_64BIT"
553 "dpax.w.ph\t%q0,%z2,%z3"
554 [(set_attr "type" "dspmac")
555 (set_attr "accum_in" "1")
556 (set_attr "mode" "SI")])
558 (define_insn "mips_dpsx_w_ph"
559 [(set (match_operand:DI 0 "register_operand" "=a")
560 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
561 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")
562 (match_operand:V2HI 3 "reg_or_0_operand" "dYG")]
564 "ISA_HAS_DSPR2 && !TARGET_64BIT"
565 "dpsx.w.ph\t%q0,%z2,%z3"
566 [(set_attr "type" "dspmac")
567 (set_attr "accum_in" "1")
568 (set_attr "mode" "SI")])
570 (define_insn "mips_dpaqx_s_w_ph"
572 [(set (match_operand:DI 0 "register_operand" "=a")
573 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
574 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")
575 (match_operand:V2HI 3 "reg_or_0_operand" "dYG")]
576 UNSPEC_DPAQX_S_W_PH))
577 (set (reg:CCDSP CCDSP_OU_REGNUM)
578 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
579 UNSPEC_DPAQX_S_W_PH))])]
580 "ISA_HAS_DSPR2 && !TARGET_64BIT"
581 "dpaqx_s.w.ph\t%q0,%z2,%z3"
582 [(set_attr "type" "dspmac")
583 (set_attr "accum_in" "1")
584 (set_attr "mode" "SI")])
586 (define_insn "mips_dpaqx_sa_w_ph"
588 [(set (match_operand:DI 0 "register_operand" "=a")
589 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
590 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")
591 (match_operand:V2HI 3 "reg_or_0_operand" "dYG")]
592 UNSPEC_DPAQX_SA_W_PH))
593 (set (reg:CCDSP CCDSP_OU_REGNUM)
594 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
595 UNSPEC_DPAQX_SA_W_PH))])]
596 "ISA_HAS_DSPR2 && !TARGET_64BIT"
597 "dpaqx_sa.w.ph\t%q0,%z2,%z3"
598 [(set_attr "type" "dspmacsat")
599 (set_attr "accum_in" "1")
600 (set_attr "mode" "SI")])
602 (define_insn "mips_dpsqx_s_w_ph"
604 [(set (match_operand:DI 0 "register_operand" "=a")
605 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
606 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")
607 (match_operand:V2HI 3 "reg_or_0_operand" "dYG")]
608 UNSPEC_DPSQX_S_W_PH))
609 (set (reg:CCDSP CCDSP_OU_REGNUM)
610 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
611 UNSPEC_DPSQX_S_W_PH))])]
612 "ISA_HAS_DSPR2 && !TARGET_64BIT"
613 "dpsqx_s.w.ph\t%q0,%z2,%z3"
614 [(set_attr "type" "dspmac")
615 (set_attr "accum_in" "1")
616 (set_attr "mode" "SI")])
618 (define_insn "mips_dpsqx_sa_w_ph"
620 [(set (match_operand:DI 0 "register_operand" "=a")
621 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
622 (match_operand:V2HI 2 "reg_or_0_operand" "dYG")
623 (match_operand:V2HI 3 "reg_or_0_operand" "dYG")]
624 UNSPEC_DPSQX_SA_W_PH))
625 (set (reg:CCDSP CCDSP_OU_REGNUM)
626 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
627 UNSPEC_DPSQX_SA_W_PH))])]
628 "ISA_HAS_DSPR2 && !TARGET_64BIT"
629 "dpsqx_sa.w.ph\t%q0,%z2,%z3"
630 [(set_attr "type" "dspmacsat")
631 (set_attr "accum_in" "1")
632 (set_attr "mode" "SI")])