OSDN Git Service

* config/mips/mips.md (UNSPEC_MOVE_TF_PS): New.
[pf3gnuchains/gcc-fork.git] / gcc / config / mips / mips-ps-3d.md
1 ;; MIPS Paired-Single Floating and MIPS-3D Instructions.
2 ;; Copyright (C) 2004 Free Software Foundation, Inc.
3 ;;
4 ;; This file is part of GCC.
5 ;;
6 ;; GCC is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 2, or (at your option)
9 ;; any later version.
10 ;;
11 ;; GCC is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ;; GNU General Public License for more details.
15 ;;
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING.  If not, write to
18 ;; the Free Software Foundation, 59 Temple Place - Suite 330,
19 ;; Boston, MA 02111-1307, USA.
20
21 (define_insn "*movcc_v2sf_di"
22   [(set (match_operand:V2SF 0 "register_operand" "=f,f")
23         (if_then_else:V2SF
24          (match_operator:DI 4 "equality_operator"
25                          [(match_operand:DI 1 "register_operand" "d,d")
26                           (const_int 0)])
27          (match_operand:V2SF 2 "register_operand" "f,0")
28          (match_operand:V2SF 3 "register_operand" "0,f")))]
29   "TARGET_PAIRED_SINGLE_FLOAT"
30   "@
31     mov%T4.ps\t%0,%2,%1
32     mov%t4.ps\t%0,%3,%1"
33   [(set_attr "type" "condmove")
34    (set_attr "mode" "SF")])
35
36 (define_insn "*movcc_v2sf_si"
37   [(set (match_operand:V2SF 0 "register_operand" "=f,f")
38         (if_then_else:V2SF
39          (match_operator:SI 4 "equality_operator"
40                          [(match_operand:SI 1 "register_operand" "d,d")
41                           (const_int 0)])
42          (match_operand:V2SF 2 "register_operand" "f,0")
43          (match_operand:V2SF 3 "register_operand" "0,f")))]
44   "TARGET_PAIRED_SINGLE_FLOAT"
45   "@
46     mov%T4.ps\t%0,%2,%1
47     mov%t4.ps\t%0,%3,%1"
48   [(set_attr "type" "condmove")
49    (set_attr "mode" "SF")])
50
51 (define_insn "mips_cond_move_tf_ps"
52   [(set (match_operand:V2SF 0 "register_operand" "=f,f")
53         (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f,0")
54                       (match_operand:V2SF 2 "register_operand" "0,f")
55                       (match_operand:CCV2 3 "register_operand" "z,z")]
56                      UNSPEC_MOVE_TF_PS))]
57   "TARGET_PAIRED_SINGLE_FLOAT"
58   "@
59     movt.ps\t%0,%1,%y3
60     movf.ps\t%0,%2,%y3"
61   [(set_attr "type" "condmove")
62    (set_attr "mode" "SF")])
63
64 (define_expand "movv2sfcc"
65   [(set (match_dup 4) (match_operand 1 "comparison_operator"))
66    (set (match_operand:V2SF 0 "register_operand")
67         (if_then_else:V2SF (match_dup 5)
68                            (match_operand:V2SF 2 "register_operand")
69                            (match_operand:V2SF 3 "register_operand")))]
70   "TARGET_PAIRED_SINGLE_FLOAT"
71 {
72   /* We can only support MOVN.PS and MOVZ.PS.
73      NOTE: MOVT.PS and MOVF.PS have different semantics from MOVN.PS and 
74            MOVZ.PS.  MOVT.PS and MOVF.PS depend on two CC values and move 
75            each item independently.  */
76
77   if (GET_MODE_CLASS (GET_MODE (cmp_operands[0])) != MODE_INT)
78     FAIL;
79
80   gen_conditional_move (operands);
81   DONE;
82 })
83
84 ; pul.ps - Pair Upper Lower
85 (define_insn "mips_pul_ps"
86   [(set (match_operand:V2SF 0 "register_operand" "=f")
87         (vec_merge:V2SF
88          (match_operand:V2SF 1 "register_operand" "f")
89          (match_operand:V2SF 2 "register_operand" "f")
90          (const_int 2)))]
91   "TARGET_PAIRED_SINGLE_FLOAT"
92   "pul.ps\t%0,%1,%2"
93   [(set_attr "type" "fmove")
94    (set_attr "mode" "SF")])
95
96 ; puu.ps - Pair upper upper
97 (define_insn "mips_puu_ps"
98   [(set (match_operand:V2SF 0 "register_operand" "=f")
99         (vec_merge:V2SF
100          (match_operand:V2SF 1 "register_operand" "f")
101          (vec_select:V2SF (match_operand:V2SF 2 "register_operand" "f")
102                           (parallel [(const_int 1)
103                                      (const_int 0)]))
104          (const_int 2)))]
105   "TARGET_PAIRED_SINGLE_FLOAT"
106   "puu.ps\t%0,%1,%2"
107   [(set_attr "type" "fmove")
108    (set_attr "mode" "SF")])
109
110 ; pll.ps - Pair Lower Lower
111 (define_insn "mips_pll_ps"
112   [(set (match_operand:V2SF 0 "register_operand" "=f")
113         (vec_merge:V2SF
114          (vec_select:V2SF (match_operand:V2SF 1 "register_operand" "f")
115                           (parallel [(const_int 1)
116                                      (const_int 0)]))
117          (match_operand:V2SF 2 "register_operand" "f")
118          (const_int 2)))]
119   "TARGET_PAIRED_SINGLE_FLOAT"
120   "pll.ps\t%0,%1,%2"
121   [(set_attr "type" "fmove")
122    (set_attr "mode" "SF")])
123
124 ; plu.ps - Pair Lower Upper
125 (define_insn "mips_plu_ps"
126   [(set (match_operand:V2SF 0 "register_operand" "=f")
127         (vec_merge:V2SF
128          (vec_select:V2SF (match_operand:V2SF 1 "register_operand" "f")
129                           (parallel [(const_int 1)
130                                      (const_int 0)]))
131          (vec_select:V2SF (match_operand:V2SF 2 "register_operand" "f")
132                           (parallel [(const_int 1)
133                                      (const_int 0)]))
134          (const_int 2)))]
135   "TARGET_PAIRED_SINGLE_FLOAT"
136   "plu.ps\t%0,%1,%2"
137   [(set_attr "type" "fmove")
138    (set_attr "mode" "SF")])
139
140 ; vec_init
141 (define_expand "vec_initv2sf"
142   [(match_operand:V2SF 0 "register_operand")
143    (match_operand:V2SF 1 "")]
144   "TARGET_PAIRED_SINGLE_FLOAT"
145 {
146   rtx op0 = force_reg (SFmode, XVECEXP (operands[1], 0, 0));
147   rtx op1 = force_reg (SFmode, XVECEXP (operands[1], 0, 1));
148   emit_insn (gen_vec_initv2sf_internal (operands[0], op0, op1));
149   DONE;
150 })
151
152 (define_insn "vec_initv2sf_internal"
153   [(set (match_operand:V2SF 0 "register_operand" "=f")
154         (vec_concat:V2SF
155          (match_operand:SF 1 "register_operand" "f")
156          (match_operand:SF 2 "register_operand" "f")))]
157   "TARGET_PAIRED_SINGLE_FLOAT"
158 {
159   if (BYTES_BIG_ENDIAN)
160     return "cvt.ps.s\t%0,%1,%2";
161   else
162     return "cvt.ps.s\t%0,%2,%1";
163 }
164   [(set_attr "type" "fcvt")
165    (set_attr "mode" "SF")])
166
167 ;; ??? This is only generated if we perform a vector operation that has to be
168 ;; emulated.  There is no other way to get a vector mode bitfield extract
169 ;; currently.
170
171 (define_insn "vec_extractv2sf"
172   [(set (match_operand:SF 0 "register_operand" "=f")
173         (vec_select:SF (match_operand:V2SF 1 "register_operand" "f")
174                        (parallel
175                         [(match_operand 2 "const_0_or_1_operand" "")])))]
176   "TARGET_PAIRED_SINGLE_FLOAT"
177 {
178   if (INTVAL (operands[2]) == !BYTES_BIG_ENDIAN)
179     return "cvt.s.pu\t%0,%1";
180   else
181     return "cvt.s.pl\t%0,%1";
182 }
183   [(set_attr "type" "fcvt")
184    (set_attr "mode" "SF")])
185
186 ;; ??? This is only generated if we disable the vec_init pattern.  There is
187 ;; no other way to get a vector mode bitfield store currently.
188
189 (define_expand "vec_setv2sf"
190   [(match_operand:V2SF 0 "register_operand")
191    (match_operand:SF 1 "register_operand")
192    (match_operand 2 "const_0_or_1_operand")]
193   "TARGET_PAIRED_SINGLE_FLOAT"
194 {
195   rtx temp;
196
197   /* We don't have an insert instruction, so we duplicate the float, and
198      then use a PUL instruction.  */
199   temp = gen_reg_rtx (V2SFmode);
200   emit_insn (gen_mips_cvt_ps_s (temp, operands[1], operands[1]));
201   if (INTVAL (operands[2]) == !BYTES_BIG_ENDIAN)
202     emit_insn (gen_mips_pul_ps (operands[0], temp, operands[0]));
203   else
204     emit_insn (gen_mips_pul_ps (operands[0], operands[0], temp));
205   DONE;
206 })
207
208 ; cvt.ps.s - Floating Point Convert Pair to Paired Single
209 (define_expand "mips_cvt_ps_s"
210   [(match_operand:V2SF 0 "register_operand")
211    (match_operand:SF 1 "register_operand")
212    (match_operand:SF 2 "register_operand")]
213   "TARGET_PAIRED_SINGLE_FLOAT"
214 {
215   if (BYTES_BIG_ENDIAN)
216     emit_insn (gen_vec_initv2sf_internal (operands[0], operands[1],
217                operands[2]));
218   else
219     emit_insn (gen_vec_initv2sf_internal (operands[0], operands[2],
220                operands[1]));
221   DONE;
222 })
223
224 ; cvt.s.pl - Floating Point Convert Pair Lower to Single Floating Point
225 (define_expand "mips_cvt_s_pl"
226   [(set (match_operand:SF 0 "register_operand")
227         (vec_select:SF (match_operand:V2SF 1 "register_operand")
228                        (parallel [(match_dup 2)])))]
229   "TARGET_PAIRED_SINGLE_FLOAT"
230   { operands[2] = GEN_INT (BYTES_BIG_ENDIAN); })
231
232 ; cvt.s.pu - Floating Point Convert Pair Upper to Single Floating Point
233 (define_expand "mips_cvt_s_pu"
234   [(set (match_operand:SF 0 "register_operand")
235         (vec_select:SF (match_operand:V2SF 1 "register_operand")
236                        (parallel [(match_dup 2)])))]
237   "TARGET_PAIRED_SINGLE_FLOAT"
238   { operands[2] = GEN_INT (!BYTES_BIG_ENDIAN); })
239
240 ; alnv.ps - Floating Point Align Variable
241 (define_insn "mips_alnv_ps"
242   [(set (match_operand:V2SF 0 "register_operand" "=f")
243         (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")
244                       (match_operand:V2SF 2 "register_operand" "f")
245                       (match_operand:SI 3 "register_operand" "d")]
246                      UNSPEC_ALNV_PS))]
247   "TARGET_PAIRED_SINGLE_FLOAT"
248   "alnv.ps\t%0,%1,%2,%3"
249   [(set_attr "type" "fmove")
250    (set_attr "mode" "SF")])
251
252 ; addr.ps - Floating Point Reduction Add
253 (define_insn "mips_addr_ps"
254   [(set (match_operand:V2SF 0 "register_operand" "=f")
255         (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")
256                       (match_operand:V2SF 2 "register_operand" "f")]
257                      UNSPEC_ADDR_PS))]
258   "TARGET_MIPS3D"
259   "addr.ps\t%0,%1,%2"
260   [(set_attr "type" "fadd")
261    (set_attr "mode" "SF")])
262
263 ; cvt.pw.ps - Floating Point Convert Paired Single to Paired Word
264 (define_insn "mips_cvt_pw_ps"
265   [(set (match_operand:V2SF 0 "register_operand" "=f")
266         (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")]
267                      UNSPEC_CVT_PW_PS))]
268   "TARGET_MIPS3D"
269   "cvt.pw.ps\t%0,%1"
270   [(set_attr "type" "fcvt")
271    (set_attr "mode" "SF")])
272
273 ; cvt.ps.pw - Floating Point Convert Paired Word to Paired Single
274 (define_insn "mips_cvt_ps_pw"
275   [(set (match_operand:V2SF 0 "register_operand" "=f")
276         (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")]
277                      UNSPEC_CVT_PS_PW))]
278   "TARGET_MIPS3D"
279   "cvt.ps.pw\t%0,%1"
280   [(set_attr "type" "fcvt")
281    (set_attr "mode" "SF")])
282
283 ; mulr.ps - Floating Point Reduction Multiply
284 (define_insn "mips_mulr_ps"
285   [(set (match_operand:V2SF 0 "register_operand" "=f")
286         (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")
287                       (match_operand:V2SF 2 "register_operand" "f")]
288                      UNSPEC_MULR_PS))]
289   "TARGET_MIPS3D"
290   "mulr.ps\t%0,%1,%2"
291   [(set_attr "type" "fmul")
292    (set_attr "mode" "SF")])
293
294 ;----------------------------------------------------------------------------
295 ; Floating Point Absolute Comparisions for Singles
296 ;----------------------------------------------------------------------------
297
298 (define_insn "mips_cabs_f_s"
299   [(set (match_operand:CC 0 "register_operand" "=z")
300         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
301                     (match_operand:SF 2 "register_operand" "f")]
302                    UNSPEC_CABS_F))]
303   "TARGET_MIPS3D"
304   "cabs.f.s\t%Q0,%1,%2"
305   [(set_attr "type" "fcmp")
306    (set_attr "mode" "FPSW")])
307
308 (define_insn "mips_cabs_un_s"
309   [(set (match_operand:CC 0 "register_operand" "=z")
310         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
311                     (match_operand:SF 2 "register_operand" "f")]
312                    UNSPEC_CABS_UN))]
313   "TARGET_MIPS3D"
314   "cabs.un.s\t%Q0,%1,%2"
315   [(set_attr "type" "fcmp")
316    (set_attr "mode" "FPSW")])
317
318 (define_insn "mips_cabs_eq_s"
319   [(set (match_operand:CC 0 "register_operand" "=z")
320         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
321                     (match_operand:SF 2 "register_operand" "f")]
322                    UNSPEC_CABS_EQ))]
323   "TARGET_MIPS3D"
324   "cabs.eq.s\t%Q0,%1,%2"
325   [(set_attr "type" "fcmp")
326    (set_attr "mode" "FPSW")])
327
328 (define_insn "mips_cabs_ueq_s"
329   [(set (match_operand:CC 0 "register_operand" "=z")
330         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
331                     (match_operand:SF 2 "register_operand" "f")]
332                    UNSPEC_CABS_UEQ))]
333   "TARGET_MIPS3D"
334   "cabs.ueq.s\t%Q0,%1,%2"
335   [(set_attr "type" "fcmp")
336    (set_attr "mode" "FPSW")])
337
338 (define_insn "mips_cabs_olt_s"
339   [(set (match_operand:CC 0 "register_operand" "=z")
340         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
341                     (match_operand:SF 2 "register_operand" "f")]
342                    UNSPEC_CABS_OLT))]
343   "TARGET_MIPS3D"
344   "cabs.olt.s\t%Q0,%1,%2"
345   [(set_attr "type" "fcmp")
346    (set_attr "mode" "FPSW")])
347
348 (define_insn "mips_cabs_ult_s"
349   [(set (match_operand:CC 0 "register_operand" "=z")
350         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
351                     (match_operand:SF 2 "register_operand" "f")]
352                    UNSPEC_CABS_ULT))]
353   "TARGET_MIPS3D"
354   "cabs.ult.s\t%Q0,%1,%2"
355   [(set_attr "type" "fcmp")
356    (set_attr "mode" "FPSW")])
357
358 (define_insn "mips_cabs_ole_s"
359   [(set (match_operand:CC 0 "register_operand" "=z")
360         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
361                     (match_operand:SF 2 "register_operand" "f")]
362                    UNSPEC_CABS_OLE))]
363   "TARGET_MIPS3D"
364   "cabs.ole.s\t%Q0,%1,%2"
365   [(set_attr "type" "fcmp")
366    (set_attr "mode" "FPSW")])
367
368 (define_insn "mips_cabs_ule_s"
369   [(set (match_operand:CC 0 "register_operand" "=z")
370         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
371                     (match_operand:SF 2 "register_operand" "f")]
372                    UNSPEC_CABS_ULE))]
373   "TARGET_MIPS3D"
374   "cabs.ule.s\t%Q0,%1,%2"
375   [(set_attr "type" "fcmp")
376    (set_attr "mode" "FPSW")])
377
378 (define_insn "mips_cabs_sf_s"
379   [(set (match_operand:CC 0 "register_operand" "=z")
380         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
381                     (match_operand:SF 2 "register_operand" "f")]
382                    UNSPEC_CABS_SF))]
383   "TARGET_MIPS3D"
384   "cabs.sf.s\t%Q0,%1,%2"
385   [(set_attr "type" "fcmp")
386    (set_attr "mode" "FPSW")])
387
388 (define_insn "mips_cabs_ngle_s"
389   [(set (match_operand:CC 0 "register_operand" "=z")
390         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
391                     (match_operand:SF 2 "register_operand" "f")]
392                    UNSPEC_CABS_NGLE))]
393   "TARGET_MIPS3D"
394   "cabs.ngle.s\t%Q0,%1,%2"
395   [(set_attr "type" "fcmp")
396    (set_attr "mode" "FPSW")])
397
398 (define_insn "mips_cabs_seq_s"
399   [(set (match_operand:CC 0 "register_operand" "=z")
400         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
401                     (match_operand:SF 2 "register_operand" "f")]
402                    UNSPEC_CABS_SEQ))]
403   "TARGET_MIPS3D"
404   "cabs.seq.s\t%Q0,%1,%2"
405   [(set_attr "type" "fcmp")
406    (set_attr "mode" "FPSW")])
407
408 (define_insn "mips_cabs_ngl_s"
409   [(set (match_operand:CC 0 "register_operand" "=z")
410         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
411                     (match_operand:SF 2 "register_operand" "f")]
412                    UNSPEC_CABS_NGL))]
413   "TARGET_MIPS3D"
414   "cabs.ngl.s\t%Q0,%1,%2"
415   [(set_attr "type" "fcmp")
416    (set_attr "mode" "FPSW")])
417
418 (define_insn "mips_cabs_lt_s"
419   [(set (match_operand:CC 0 "register_operand" "=z")
420         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
421                     (match_operand:SF 2 "register_operand" "f")]
422                    UNSPEC_CABS_LT))]
423   "TARGET_MIPS3D"
424   "cabs.lt.s\t%Q0,%1,%2"
425   [(set_attr "type" "fcmp")
426    (set_attr "mode" "FPSW")])
427
428 (define_insn "mips_cabs_nge_s"
429   [(set (match_operand:CC 0 "register_operand" "=z")
430         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
431                     (match_operand:SF 2 "register_operand" "f")]
432                    UNSPEC_CABS_NGE))]
433   "TARGET_MIPS3D"
434   "cabs.nge.s\t%Q0,%1,%2"
435   [(set_attr "type" "fcmp")
436    (set_attr "mode" "FPSW")])
437
438 (define_insn "mips_cabs_le_s"
439   [(set (match_operand:CC 0 "register_operand" "=z")
440         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
441                     (match_operand:SF 2 "register_operand" "f")]
442                    UNSPEC_CABS_LE))]
443   "TARGET_MIPS3D"
444   "cabs.le.s\t%Q0,%1,%2"
445   [(set_attr "type" "fcmp")
446    (set_attr "mode" "FPSW")])
447
448 (define_insn "mips_cabs_ngt_s"
449   [(set (match_operand:CC 0 "register_operand" "=z")
450         (unspec:CC [(match_operand:SF 1 "register_operand" "f")
451                     (match_operand:SF 2 "register_operand" "f")]
452                    UNSPEC_CABS_NGT))]
453   "TARGET_MIPS3D"
454   "cabs.ngt.s\t%Q0,%1,%2"
455   [(set_attr "type" "fcmp")
456    (set_attr "mode" "FPSW")])
457
458 ;----------------------------------------------------------------------------
459 ; Floating Point Absolute Comparisions for Doubles
460 ;----------------------------------------------------------------------------
461 (define_insn "mips_cabs_f_d"
462   [(set (match_operand:CC 0 "register_operand" "=z")
463         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
464                     (match_operand:DF 2 "register_operand" "f")]
465                    UNSPEC_CABS_F))]
466   "TARGET_MIPS3D"
467   "cabs.f.d\t%Q0,%1,%2"
468   [(set_attr "type" "fcmp")
469    (set_attr "mode" "FPSW")])
470
471 (define_insn "mips_cabs_un_d"
472   [(set (match_operand:CC 0 "register_operand" "=z")
473         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
474                     (match_operand:DF 2 "register_operand" "f")]
475                    UNSPEC_CABS_UN))]
476   "TARGET_MIPS3D"
477   "cabs.un.d\t%Q0,%1,%2"
478   [(set_attr "type" "fcmp")
479    (set_attr "mode" "FPSW")])
480
481 (define_insn "mips_cabs_eq_d"
482   [(set (match_operand:CC 0 "register_operand" "=z")
483         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
484                     (match_operand:DF 2 "register_operand" "f")]
485                    UNSPEC_CABS_EQ))]
486   "TARGET_MIPS3D"
487   "cabs.eq.d\t%Q0,%1,%2"
488   [(set_attr "type" "fcmp")
489    (set_attr "mode" "FPSW")])
490
491 (define_insn "mips_cabs_ueq_d"
492   [(set (match_operand:CC 0 "register_operand" "=z")
493         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
494                     (match_operand:DF 2 "register_operand" "f")]
495                    UNSPEC_CABS_UEQ))]
496   "TARGET_MIPS3D"
497   "cabs.ueq.d\t%Q0,%1,%2"
498   [(set_attr "type" "fcmp")
499    (set_attr "mode" "FPSW")])
500
501 (define_insn "mips_cabs_olt_d"
502   [(set (match_operand:CC 0 "register_operand" "=z")
503         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
504                     (match_operand:DF 2 "register_operand" "f")]
505                    UNSPEC_CABS_OLT))]
506   "TARGET_MIPS3D"
507   "cabs.olt.d\t%Q0,%1,%2"
508   [(set_attr "type" "fcmp")
509    (set_attr "mode" "FPSW")])
510
511 (define_insn "mips_cabs_ult_d"
512   [(set (match_operand:CC 0 "register_operand" "=z")
513         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
514                     (match_operand:DF 2 "register_operand" "f")]
515                    UNSPEC_CABS_ULT))]
516   "TARGET_MIPS3D"
517   "cabs.ult.d\t%Q0,%1,%2"
518   [(set_attr "type" "fcmp")
519    (set_attr "mode" "FPSW")])
520
521 (define_insn "mips_cabs_ole_d"
522   [(set (match_operand:CC 0 "register_operand" "=z")
523         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
524                     (match_operand:DF 2 "register_operand" "f")]
525                    UNSPEC_CABS_OLE))]
526   "TARGET_MIPS3D"
527   "cabs.ole.d\t%Q0,%1,%2"
528   [(set_attr "type" "fcmp")
529    (set_attr "mode" "FPSW")])
530
531 (define_insn "mips_cabs_ule_d"
532   [(set (match_operand:CC 0 "register_operand" "=z")
533         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
534                     (match_operand:DF 2 "register_operand" "f")]
535                    UNSPEC_CABS_ULE))]
536   "TARGET_MIPS3D"
537   "cabs.ule.d\t%Q0,%1,%2"
538   [(set_attr "type" "fcmp")
539    (set_attr "mode" "FPSW")])
540
541 (define_insn "mips_cabs_sf_d"
542   [(set (match_operand:CC 0 "register_operand" "=z")
543         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
544                     (match_operand:DF 2 "register_operand" "f")]
545                    UNSPEC_CABS_SF))]
546   "TARGET_MIPS3D"
547   "cabs.sf.d\t%Q0,%1,%2"
548   [(set_attr "type" "fcmp")
549    (set_attr "mode" "FPSW")])
550
551 (define_insn "mips_cabs_ngle_d"
552   [(set (match_operand:CC 0 "register_operand" "=z")
553         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
554                     (match_operand:DF 2 "register_operand" "f")]
555                    UNSPEC_CABS_NGLE))]
556   "TARGET_MIPS3D"
557   "cabs.ngle.d\t%Q0,%1,%2"
558   [(set_attr "type" "fcmp")
559    (set_attr "mode" "FPSW")])
560
561 (define_insn "mips_cabs_seq_d"
562   [(set (match_operand:CC 0 "register_operand" "=z")
563         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
564                     (match_operand:DF 2 "register_operand" "f")]
565                    UNSPEC_CABS_SEQ))]
566   "TARGET_MIPS3D"
567   "cabs.seq.d\t%Q0,%1,%2"
568   [(set_attr "type" "fcmp")
569    (set_attr "mode" "FPSW")])
570
571 (define_insn "mips_cabs_ngl_d"
572   [(set (match_operand:CC 0 "register_operand" "=z")
573         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
574                     (match_operand:DF 2 "register_operand" "f")]
575                    UNSPEC_CABS_NGL))]
576   "TARGET_MIPS3D"
577   "cabs.ngl.d\t%Q0,%1,%2"
578   [(set_attr "type" "fcmp")
579    (set_attr "mode" "FPSW")])
580
581 (define_insn "mips_cabs_lt_d"
582   [(set (match_operand:CC 0 "register_operand" "=z")
583         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
584                     (match_operand:DF 2 "register_operand" "f")]
585                    UNSPEC_CABS_LT))]
586   "TARGET_MIPS3D"
587   "cabs.lt.d\t%Q0,%1,%2"
588   [(set_attr "type" "fcmp")
589    (set_attr "mode" "FPSW")])
590
591 (define_insn "mips_cabs_nge_d"
592   [(set (match_operand:CC 0 "register_operand" "=z")
593         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
594                     (match_operand:DF 2 "register_operand" "f")]
595                    UNSPEC_CABS_NGE))]
596   "TARGET_MIPS3D"
597   "cabs.nge.d\t%Q0,%1,%2"
598   [(set_attr "type" "fcmp")
599    (set_attr "mode" "FPSW")])
600
601 (define_insn "mips_cabs_le_d"
602   [(set (match_operand:CC 0 "register_operand" "=z")
603         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
604                     (match_operand:DF 2 "register_operand" "f")]
605                    UNSPEC_CABS_LE))]
606   "TARGET_MIPS3D"
607   "cabs.le.d\t%Q0,%1,%2"
608   [(set_attr "type" "fcmp")
609    (set_attr "mode" "FPSW")])
610
611 (define_insn "mips_cabs_ngt_d"
612   [(set (match_operand:CC 0 "register_operand" "=z")
613         (unspec:CC [(match_operand:DF 1 "register_operand" "f")
614                     (match_operand:DF 2 "register_operand" "f")]
615                    UNSPEC_CABS_NGT))]
616   "TARGET_MIPS3D"
617   "cabs.ngt.d\t%Q0,%1,%2"
618   [(set_attr "type" "fcmp")
619    (set_attr "mode" "FPSW")])
620
621 ;----------------------------------------------------------------------------
622 ; Floating Point Comparisions for Four Singles
623 ;----------------------------------------------------------------------------
624
625 (define_insn "mips_c_f_4s"
626   [(set (match_operand:CCV4 0 "register_operand" "=z")
627         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
628                       (match_operand:V2SF 2 "register_operand" "f")
629                       (match_operand:V2SF 3 "register_operand" "f")
630                       (match_operand:V2SF 4 "register_operand" "f")]
631                      UNSPEC_C_F))]
632   "TARGET_PAIRED_SINGLE_FLOAT"
633   "c.f.ps\t%v0,%1,%2\n\tc.f.ps\t%V0,%3,%4"
634   [(set_attr "type" "fcmp")
635    (set_attr "length" "8")
636    (set_attr "mode" "FPSW")])
637
638 (define_insn "mips_c_un_4s"
639   [(set (match_operand:CCV4 0 "register_operand" "=z")
640         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
641                       (match_operand:V2SF 2 "register_operand" "f")
642                       (match_operand:V2SF 3 "register_operand" "f")
643                       (match_operand:V2SF 4 "register_operand" "f")]
644                      UNSPEC_C_UN))]
645   "TARGET_PAIRED_SINGLE_FLOAT"
646   "c.un.ps\t%v0,%1,%2\n\tc.un.ps\t%V0,%3,%4"
647   [(set_attr "type" "fcmp")
648    (set_attr "length" "8")
649    (set_attr "mode" "FPSW")])
650
651 (define_insn "mips_c_eq_4s"
652   [(set (match_operand:CCV4 0 "register_operand" "=z")
653         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
654                       (match_operand:V2SF 2 "register_operand" "f")
655                       (match_operand:V2SF 3 "register_operand" "f")
656                       (match_operand:V2SF 4 "register_operand" "f")]
657                      UNSPEC_C_EQ))]
658   "TARGET_PAIRED_SINGLE_FLOAT"
659   "c.eq.ps\t%v0,%1,%2\n\tc.eq.ps\t%V0,%3,%4"
660   [(set_attr "type" "fcmp")
661    (set_attr "length" "8")
662    (set_attr "mode" "FPSW")])
663
664 (define_insn "mips_c_ueq_4s"
665   [(set (match_operand:CCV4 0 "register_operand" "=z")
666         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
667                       (match_operand:V2SF 2 "register_operand" "f")
668                       (match_operand:V2SF 3 "register_operand" "f")
669                       (match_operand:V2SF 4 "register_operand" "f")]
670                      UNSPEC_C_UEQ))]
671   "TARGET_PAIRED_SINGLE_FLOAT"
672   "c.ueq.ps\t%v0,%1,%2\n\tc.ueq.ps\t%V0,%3,%4"
673   [(set_attr "type" "fcmp")
674    (set_attr "length" "8")
675    (set_attr "mode" "FPSW")])
676
677 (define_insn "mips_c_olt_4s"
678   [(set (match_operand:CCV4 0 "register_operand" "=z")
679         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
680                       (match_operand:V2SF 2 "register_operand" "f")
681                       (match_operand:V2SF 3 "register_operand" "f")
682                       (match_operand:V2SF 4 "register_operand" "f")]
683                      UNSPEC_C_OLT))]
684   "TARGET_PAIRED_SINGLE_FLOAT"
685   "c.olt.ps\t%v0,%1,%2\n\tc.olt.ps\t%V0,%3,%4"
686   [(set_attr "type" "fcmp")
687    (set_attr "length" "8")
688    (set_attr "mode" "FPSW")])
689
690 (define_insn "mips_c_ult_4s"
691   [(set (match_operand:CCV4 0 "register_operand" "=z")
692         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
693                       (match_operand:V2SF 2 "register_operand" "f")
694                       (match_operand:V2SF 3 "register_operand" "f")
695                       (match_operand:V2SF 4 "register_operand" "f")]
696                      UNSPEC_C_ULT))]
697   "TARGET_PAIRED_SINGLE_FLOAT"
698   "c.ult.ps\t%v0,%1,%2\n\tc.ult.ps\t%V0,%3,%4"
699   [(set_attr "type" "fcmp")
700    (set_attr "length" "8")
701    (set_attr "mode" "FPSW")])
702
703 (define_insn "mips_c_ole_4s"
704   [(set (match_operand:CCV4 0 "register_operand" "=z")
705         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
706                       (match_operand:V2SF 2 "register_operand" "f")
707                       (match_operand:V2SF 3 "register_operand" "f")
708                       (match_operand:V2SF 4 "register_operand" "f")]
709                      UNSPEC_C_OLE))]
710   "TARGET_PAIRED_SINGLE_FLOAT"
711   "c.ole.ps\t%v0,%1,%2\n\tc.ole.ps\t%V0,%3,%4"
712   [(set_attr "type" "fcmp")
713    (set_attr "length" "8")
714    (set_attr "mode" "FPSW")])
715
716 (define_insn "mips_c_ule_4s"
717   [(set (match_operand:CCV4 0 "register_operand" "=z")
718         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
719                       (match_operand:V2SF 2 "register_operand" "f")
720                       (match_operand:V2SF 3 "register_operand" "f")
721                       (match_operand:V2SF 4 "register_operand" "f")]
722                      UNSPEC_C_ULE))]
723   "TARGET_PAIRED_SINGLE_FLOAT"
724   "c.ule.ps\t%v0,%1,%2\n\tc.ule.ps\t%V0,%3,%4"
725   [(set_attr "type" "fcmp")
726    (set_attr "length" "8")
727    (set_attr "mode" "FPSW")])
728
729 (define_insn "mips_c_sf_4s"
730   [(set (match_operand:CCV4 0 "register_operand" "=z")
731         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
732                       (match_operand:V2SF 2 "register_operand" "f")
733                       (match_operand:V2SF 3 "register_operand" "f")
734                       (match_operand:V2SF 4 "register_operand" "f")]
735                      UNSPEC_C_SF))]
736   "TARGET_PAIRED_SINGLE_FLOAT"
737   "c.sf.ps\t%v0,%1,%2\n\tc.sf.ps\t%V0,%3,%4"
738   [(set_attr "type" "fcmp")
739    (set_attr "length" "8")
740    (set_attr "mode" "FPSW")])
741
742 (define_insn "mips_c_ngle_4s"
743   [(set (match_operand:CCV4 0 "register_operand" "=z")
744         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
745                       (match_operand:V2SF 2 "register_operand" "f")
746                       (match_operand:V2SF 3 "register_operand" "f")
747                       (match_operand:V2SF 4 "register_operand" "f")]
748                      UNSPEC_C_NGLE))]
749   "TARGET_PAIRED_SINGLE_FLOAT"
750   "c.ngle.ps\t%v0,%1,%2\n\tc.ngle.ps\t%V0,%3,%4"
751   [(set_attr "type" "fcmp")
752    (set_attr "length" "8")
753    (set_attr "mode" "FPSW")])
754
755 (define_insn "mips_c_seq_4s"
756   [(set (match_operand:CCV4 0 "register_operand" "=z")
757         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
758                       (match_operand:V2SF 2 "register_operand" "f")
759                       (match_operand:V2SF 3 "register_operand" "f")
760                       (match_operand:V2SF 4 "register_operand" "f")]
761                      UNSPEC_C_SEQ))]
762   "TARGET_PAIRED_SINGLE_FLOAT"
763   "c.seq.ps\t%v0,%1,%2\n\tc.seq.ps\t%V0,%3,%4"
764   [(set_attr "type" "fcmp")
765    (set_attr "length" "8")
766    (set_attr "mode" "FPSW")])
767
768 (define_insn "mips_c_ngl_4s"
769   [(set (match_operand:CCV4 0 "register_operand" "=z")
770         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
771                       (match_operand:V2SF 2 "register_operand" "f")
772                       (match_operand:V2SF 3 "register_operand" "f")
773                       (match_operand:V2SF 4 "register_operand" "f")]
774                      UNSPEC_C_NGL))]
775   "TARGET_PAIRED_SINGLE_FLOAT"
776   "c.ngl.ps\t%v0,%1,%2\n\tc.ngl.ps\t%V0,%3,%4"
777   [(set_attr "type" "fcmp")
778    (set_attr "length" "8")
779    (set_attr "mode" "FPSW")])
780
781 (define_insn "mips_c_lt_4s"
782   [(set (match_operand:CCV4 0 "register_operand" "=z")
783         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
784                       (match_operand:V2SF 2 "register_operand" "f")
785                       (match_operand:V2SF 3 "register_operand" "f")
786                       (match_operand:V2SF 4 "register_operand" "f")]
787                      UNSPEC_C_LT))]
788   "TARGET_PAIRED_SINGLE_FLOAT"
789   "c.lt.ps\t%v0,%1,%2\n\tc.lt.ps\t%V0,%3,%4"
790   [(set_attr "type" "fcmp")
791    (set_attr "length" "8")
792    (set_attr "mode" "FPSW")])
793
794 (define_insn "mips_c_nge_4s"
795   [(set (match_operand:CCV4 0 "register_operand" "=z")
796         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
797                       (match_operand:V2SF 2 "register_operand" "f")
798                       (match_operand:V2SF 3 "register_operand" "f")
799                       (match_operand:V2SF 4 "register_operand" "f")]
800                      UNSPEC_C_NGE))]
801   "TARGET_PAIRED_SINGLE_FLOAT"
802   "c.nge.ps\t%v0,%1,%2\n\tc.nge.ps\t%V0,%3,%4"
803   [(set_attr "type" "fcmp")
804    (set_attr "length" "8")
805    (set_attr "mode" "FPSW")])
806
807 (define_insn "mips_c_le_4s"
808   [(set (match_operand:CCV4 0 "register_operand" "=z")
809         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
810                       (match_operand:V2SF 2 "register_operand" "f")
811                       (match_operand:V2SF 3 "register_operand" "f")
812                       (match_operand:V2SF 4 "register_operand" "f")]
813                      UNSPEC_C_LE))]
814   "TARGET_PAIRED_SINGLE_FLOAT"
815   "c.le.ps\t%v0,%1,%2\n\tc.le.ps\t%V0,%3,%4"
816   [(set_attr "type" "fcmp")
817    (set_attr "length" "8")
818    (set_attr "mode" "FPSW")])
819
820 (define_insn "mips_c_ngt_4s"
821   [(set (match_operand:CCV4 0 "register_operand" "=z")
822         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
823                       (match_operand:V2SF 2 "register_operand" "f")
824                       (match_operand:V2SF 3 "register_operand" "f")
825                       (match_operand:V2SF 4 "register_operand" "f")]
826                      UNSPEC_C_NGT))]
827   "TARGET_PAIRED_SINGLE_FLOAT"
828   "c.ngt.ps\t%v0,%1,%2\n\tc.ngt.ps\t%V0,%3,%4"
829   [(set_attr "type" "fcmp")
830    (set_attr "length" "8")
831    (set_attr "mode" "FPSW")])
832
833 ;----------------------------------------------------------------------------
834 ; Floating Point Absolute Comparisions for Four Singles
835 ;----------------------------------------------------------------------------
836 (define_insn "mips_cabs_f_4s"
837   [(set (match_operand:CCV4 0 "register_operand" "=z")
838         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
839                       (match_operand:V2SF 2 "register_operand" "f")
840                       (match_operand:V2SF 3 "register_operand" "f")
841                       (match_operand:V2SF 4 "register_operand" "f")]
842                      UNSPEC_CABS_F))]
843   "TARGET_MIPS3D"
844   "cabs.f.ps\t%v0,%1,%2\n\tcabs.f.ps\t%V0,%3,%4"
845   [(set_attr "type" "fcmp")
846    (set_attr "length" "8")
847    (set_attr "mode" "FPSW")])
848
849 (define_insn "mips_cabs_un_4s"
850   [(set (match_operand:CCV4 0 "register_operand" "=z")
851         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
852                       (match_operand:V2SF 2 "register_operand" "f")
853                       (match_operand:V2SF 3 "register_operand" "f")
854                       (match_operand:V2SF 4 "register_operand" "f")]
855                      UNSPEC_CABS_UN))]
856   "TARGET_MIPS3D"
857   "cabs.un.ps\t%v0,%1,%2\n\tcabs.un.ps\t%V0,%3,%4"
858   [(set_attr "type" "fcmp")
859    (set_attr "length" "8")
860    (set_attr "mode" "FPSW")])
861
862 (define_insn "mips_cabs_eq_4s"
863   [(set (match_operand:CCV4 0 "register_operand" "=z")
864         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
865                       (match_operand:V2SF 2 "register_operand" "f")
866                       (match_operand:V2SF 3 "register_operand" "f")
867                       (match_operand:V2SF 4 "register_operand" "f")]
868                      UNSPEC_CABS_EQ))]
869   "TARGET_MIPS3D"
870   "cabs.eq.ps\t%v0,%1,%2\n\tcabs.eq.ps\t%V0,%3,%4"
871   [(set_attr "type" "fcmp")
872    (set_attr "length" "8")
873    (set_attr "mode" "FPSW")])
874
875 (define_insn "mips_cabs_ueq_4s"
876   [(set (match_operand:CCV4 0 "register_operand" "=z")
877         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
878                       (match_operand:V2SF 2 "register_operand" "f")
879                       (match_operand:V2SF 3 "register_operand" "f")
880                       (match_operand:V2SF 4 "register_operand" "f")]
881                      UNSPEC_CABS_UEQ))]
882   "TARGET_MIPS3D"
883   "cabs.ueq.ps\t%v0,%1,%2\n\tcabs.ueq.ps\t%V0,%3,%4"
884   [(set_attr "type" "fcmp")
885    (set_attr "length" "8")
886    (set_attr "mode" "FPSW")])
887
888 (define_insn "mips_cabs_olt_4s"
889   [(set (match_operand:CCV4 0 "register_operand" "=z")
890         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
891                       (match_operand:V2SF 2 "register_operand" "f")
892                       (match_operand:V2SF 3 "register_operand" "f")
893                       (match_operand:V2SF 4 "register_operand" "f")]
894                      UNSPEC_CABS_OLT))]
895   "TARGET_MIPS3D"
896   "cabs.olt.ps\t%v0,%1,%2\n\tcabs.olt.ps\t%V0,%3,%4"
897   [(set_attr "type" "fcmp")
898    (set_attr "length" "8")
899    (set_attr "mode" "FPSW")])
900
901 (define_insn "mips_cabs_ult_4s"
902   [(set (match_operand:CCV4 0 "register_operand" "=z")
903         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
904                       (match_operand:V2SF 2 "register_operand" "f")
905                       (match_operand:V2SF 3 "register_operand" "f")
906                       (match_operand:V2SF 4 "register_operand" "f")]
907                      UNSPEC_CABS_ULT))]
908   "TARGET_MIPS3D"
909   "cabs.ult.ps\t%v0,%1,%2\n\tcabs.ult.ps\t%V0,%3,%4"
910   [(set_attr "type" "fcmp")
911    (set_attr "length" "8")
912    (set_attr "mode" "FPSW")])
913
914 (define_insn "mips_cabs_ole_4s"
915   [(set (match_operand:CCV4 0 "register_operand" "=z")
916         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
917                       (match_operand:V2SF 2 "register_operand" "f")
918                       (match_operand:V2SF 3 "register_operand" "f")
919                       (match_operand:V2SF 4 "register_operand" "f")]
920                      UNSPEC_CABS_OLE))]
921   "TARGET_MIPS3D"
922   "cabs.ole.ps\t%v0,%1,%2\n\tcabs.ole.ps\t%V0,%3,%4"
923   [(set_attr "type" "fcmp")
924    (set_attr "length" "8")
925    (set_attr "mode" "FPSW")])
926
927 (define_insn "mips_cabs_ule_4s"
928   [(set (match_operand:CCV4 0 "register_operand" "=z")
929         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
930                       (match_operand:V2SF 2 "register_operand" "f")
931                       (match_operand:V2SF 3 "register_operand" "f")
932                       (match_operand:V2SF 4 "register_operand" "f")]
933                      UNSPEC_CABS_ULE))]
934   "TARGET_MIPS3D"
935   "cabs.ule.ps\t%v0,%1,%2\n\tcabs.ule.ps\t%V0,%3,%4"
936   [(set_attr "type" "fcmp")
937    (set_attr "length" "8")
938    (set_attr "mode" "FPSW")])
939
940 (define_insn "mips_cabs_sf_4s"
941   [(set (match_operand:CCV4 0 "register_operand" "=z")
942         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
943                       (match_operand:V2SF 2 "register_operand" "f")
944                       (match_operand:V2SF 3 "register_operand" "f")
945                       (match_operand:V2SF 4 "register_operand" "f")]
946                      UNSPEC_CABS_SF))]
947   "TARGET_MIPS3D"
948   "cabs.sf.ps\t%v0,%1,%2\n\tcabs.sf.ps\t%V0,%3,%4"
949   [(set_attr "type" "fcmp")
950    (set_attr "length" "8")
951    (set_attr "mode" "FPSW")])
952
953 (define_insn "mips_cabs_ngle_4s"
954   [(set (match_operand:CCV4 0 "register_operand" "=z")
955         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
956                       (match_operand:V2SF 2 "register_operand" "f")
957                       (match_operand:V2SF 3 "register_operand" "f")
958                       (match_operand:V2SF 4 "register_operand" "f")]
959                      UNSPEC_CABS_NGLE))]
960   "TARGET_MIPS3D"
961   "cabs.ngle.ps\t%v0,%1,%2\n\tcabs.ngle.ps\t%V0,%3,%4"
962   [(set_attr "type" "fcmp")
963    (set_attr "length" "8")
964    (set_attr "mode" "FPSW")])
965
966 (define_insn "mips_cabs_seq_4s"
967   [(set (match_operand:CCV4 0 "register_operand" "=z")
968         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
969                       (match_operand:V2SF 2 "register_operand" "f")
970                       (match_operand:V2SF 3 "register_operand" "f")
971                       (match_operand:V2SF 4 "register_operand" "f")]
972                      UNSPEC_CABS_SEQ))]
973   "TARGET_MIPS3D"
974   "cabs.seq.ps\t%v0,%1,%2\n\tcabs.seq.ps\t%V0,%3,%4"
975   [(set_attr "type" "fcmp")
976    (set_attr "length" "8")
977    (set_attr "mode" "FPSW")])
978
979 (define_insn "mips_cabs_ngl_4s"
980   [(set (match_operand:CCV4 0 "register_operand" "=z")
981         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
982                       (match_operand:V2SF 2 "register_operand" "f")
983                       (match_operand:V2SF 3 "register_operand" "f")
984                       (match_operand:V2SF 4 "register_operand" "f")]
985                      UNSPEC_CABS_NGL))]
986   "TARGET_MIPS3D"
987   "cabs.ngl.ps\t%v0,%1,%2\n\tcabs.ngl.ps\t%V0,%3,%4"
988   [(set_attr "type" "fcmp")
989    (set_attr "length" "8")
990    (set_attr "mode" "FPSW")])
991
992 (define_insn "mips_cabs_lt_4s"
993   [(set (match_operand:CCV4 0 "register_operand" "=z")
994         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
995                       (match_operand:V2SF 2 "register_operand" "f")
996                       (match_operand:V2SF 3 "register_operand" "f")
997                       (match_operand:V2SF 4 "register_operand" "f")]
998                      UNSPEC_CABS_LT))]
999   "TARGET_MIPS3D"
1000   "cabs.lt.ps\t%v0,%1,%2\n\tcabs.lt.ps\t%V0,%3,%4"
1001   [(set_attr "type" "fcmp")
1002    (set_attr "length" "8")
1003    (set_attr "mode" "FPSW")])
1004
1005 (define_insn "mips_cabs_nge_4s"
1006   [(set (match_operand:CCV4 0 "register_operand" "=z")
1007         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
1008                       (match_operand:V2SF 2 "register_operand" "f")
1009                       (match_operand:V2SF 3 "register_operand" "f")
1010                       (match_operand:V2SF 4 "register_operand" "f")]
1011                      UNSPEC_CABS_NGE))]
1012   "TARGET_MIPS3D"
1013   "cabs.nge.ps\t%v0,%1,%2\n\tcabs.nge.ps\t%V0,%3,%4"
1014   [(set_attr "type" "fcmp")
1015    (set_attr "length" "8")
1016    (set_attr "mode" "FPSW")])
1017
1018 (define_insn "mips_cabs_le_4s"
1019   [(set (match_operand:CCV4 0 "register_operand" "=z")
1020         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
1021                       (match_operand:V2SF 2 "register_operand" "f")
1022                       (match_operand:V2SF 3 "register_operand" "f")
1023                       (match_operand:V2SF 4 "register_operand" "f")]
1024                      UNSPEC_CABS_LE))]
1025   "TARGET_MIPS3D"
1026   "cabs.le.ps\t%v0,%1,%2\n\tcabs.le.ps\t%V0,%3,%4"
1027   [(set_attr "type" "fcmp")
1028    (set_attr "length" "8")
1029    (set_attr "mode" "FPSW")])
1030
1031 (define_insn "mips_cabs_ngt_4s"
1032   [(set (match_operand:CCV4 0 "register_operand" "=z")
1033         (unspec:CCV4 [(match_operand:V2SF 1 "register_operand" "f")
1034                       (match_operand:V2SF 2 "register_operand" "f")
1035                       (match_operand:V2SF 3 "register_operand" "f")
1036                       (match_operand:V2SF 4 "register_operand" "f")]
1037                      UNSPEC_CABS_NGT))]
1038   "TARGET_MIPS3D"
1039   "cabs.ngt.ps\t%v0,%1,%2\n\tcabs.ngt.ps\t%V0,%3,%4"
1040   [(set_attr "type" "fcmp")
1041    (set_attr "length" "8")
1042    (set_attr "mode" "FPSW")])
1043
1044 ;----------------------------------------------------------------------------
1045 ; Floating Point Comparisions for Paired Singles
1046 ;----------------------------------------------------------------------------
1047 (define_insn "mips_c_f_ps"
1048   [(set (match_operand:CCV2 0 "register_operand" "=z")
1049         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1050                       (match_operand:V2SF 2 "register_operand" "f")] 
1051                      UNSPEC_C_F))]
1052   "TARGET_PAIRED_SINGLE_FLOAT"
1053   "c.f.ps\t%Z0%1,%2"
1054   [(set_attr "type" "fcmp")
1055    (set_attr "mode" "FPSW")])
1056
1057 (define_insn "mips_c_un_ps"
1058   [(set (match_operand:CCV2 0 "register_operand" "=z")
1059         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1060                       (match_operand:V2SF 2 "register_operand" "f")] 
1061                      UNSPEC_C_UN))]
1062   "TARGET_PAIRED_SINGLE_FLOAT"
1063   "c.un.ps\t%Z0%1,%2"
1064   [(set_attr "type" "fcmp")
1065    (set_attr "mode" "FPSW")])
1066
1067 (define_insn "mips_c_eq_ps"
1068   [(set (match_operand:CCV2 0 "register_operand" "=z")
1069         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1070                       (match_operand:V2SF 2 "register_operand" "f")] 
1071                      UNSPEC_C_EQ))]
1072   "TARGET_PAIRED_SINGLE_FLOAT"
1073   "c.eq.ps\t%Z0%1,%2"
1074   [(set_attr "type" "fcmp")
1075    (set_attr "mode" "FPSW")])
1076
1077 (define_insn "mips_c_ueq_ps"
1078   [(set (match_operand:CCV2 0 "register_operand" "=z")
1079         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1080                       (match_operand:V2SF 2 "register_operand" "f")] 
1081                      UNSPEC_C_UEQ))]
1082   "TARGET_PAIRED_SINGLE_FLOAT"
1083   "c.ueq.ps\t%Z0%1,%2"
1084   [(set_attr "type" "fcmp")
1085    (set_attr "mode" "FPSW")])
1086
1087 (define_insn "mips_c_olt_ps"
1088   [(set (match_operand:CCV2 0 "register_operand" "=z")
1089         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1090                       (match_operand:V2SF 2 "register_operand" "f")] 
1091                      UNSPEC_C_OLT))]
1092   "TARGET_PAIRED_SINGLE_FLOAT"
1093   "c.olt.ps\t%Z0%1,%2"
1094   [(set_attr "type" "fcmp")
1095    (set_attr "mode" "FPSW")])
1096
1097 (define_insn "mips_c_ult_ps"
1098   [(set (match_operand:CCV2 0 "register_operand" "=z")
1099         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1100                       (match_operand:V2SF 2 "register_operand" "f")] 
1101                      UNSPEC_C_ULT))]
1102   "TARGET_PAIRED_SINGLE_FLOAT"
1103   "c.ult.ps\t%Z0%1,%2"
1104   [(set_attr "type" "fcmp")
1105    (set_attr "mode" "FPSW")])
1106
1107 (define_insn "mips_c_ole_ps"
1108   [(set (match_operand:CCV2 0 "register_operand" "=z")
1109         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1110                       (match_operand:V2SF 2 "register_operand" "f")] 
1111                      UNSPEC_C_OLE))]
1112   "TARGET_PAIRED_SINGLE_FLOAT"
1113   "c.ole.ps\t%Z0%1,%2"
1114   [(set_attr "type" "fcmp")
1115    (set_attr "mode" "FPSW")])
1116
1117 (define_insn "mips_c_ule_ps"
1118   [(set (match_operand:CCV2 0 "register_operand" "=z")
1119         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1120                       (match_operand:V2SF 2 "register_operand" "f")] 
1121                      UNSPEC_C_ULE))]
1122   "TARGET_PAIRED_SINGLE_FLOAT"
1123   "c.ule.ps\t%Z0%1,%2"
1124   [(set_attr "type" "fcmp")
1125    (set_attr "mode" "FPSW")])
1126
1127 (define_insn "mips_c_sf_ps"
1128   [(set (match_operand:CCV2 0 "register_operand" "=z")
1129         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1130                       (match_operand:V2SF 2 "register_operand" "f")] 
1131                      UNSPEC_C_SF))]
1132   "TARGET_PAIRED_SINGLE_FLOAT"
1133   "c.sf.ps\t%Z0%1,%2"
1134   [(set_attr "type" "fcmp")
1135    (set_attr "mode" "FPSW")])
1136
1137 (define_insn "mips_c_ngle_ps"
1138   [(set (match_operand:CCV2 0 "register_operand" "=z")
1139         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1140                       (match_operand:V2SF 2 "register_operand" "f")] 
1141                      UNSPEC_C_NGLE))]
1142   "TARGET_PAIRED_SINGLE_FLOAT"
1143   "c.ngle.ps\t%Z0%1,%2"
1144   [(set_attr "type" "fcmp")
1145    (set_attr "mode" "FPSW")])
1146
1147 (define_insn "mips_c_seq_ps"
1148   [(set (match_operand:CCV2 0 "register_operand" "=z")
1149         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1150                       (match_operand:V2SF 2 "register_operand" "f")] 
1151                      UNSPEC_C_SEQ))]
1152   "TARGET_PAIRED_SINGLE_FLOAT"
1153   "c.seq.ps\t%Z0%1,%2"
1154   [(set_attr "type" "fcmp")
1155    (set_attr "mode" "FPSW")])
1156
1157 (define_insn "mips_c_ngl_ps"
1158   [(set (match_operand:CCV2 0 "register_operand" "=z")
1159         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1160                       (match_operand:V2SF 2 "register_operand" "f")] 
1161                      UNSPEC_C_NGL))]
1162   "TARGET_PAIRED_SINGLE_FLOAT"
1163   "c.ngl.ps\t%Z0%1,%2"
1164   [(set_attr "type" "fcmp")
1165    (set_attr "mode" "FPSW")])
1166
1167 (define_insn "mips_c_lt_ps"
1168   [(set (match_operand:CCV2 0 "register_operand" "=z")
1169         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1170                       (match_operand:V2SF 2 "register_operand" "f")] 
1171                      UNSPEC_C_LT))]
1172   "TARGET_PAIRED_SINGLE_FLOAT"
1173   "c.lt.ps\t%Z0%1,%2"
1174   [(set_attr "type" "fcmp")
1175    (set_attr "mode" "FPSW")])
1176
1177 (define_insn "mips_c_nge_ps"
1178   [(set (match_operand:CCV2 0 "register_operand" "=z")
1179         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1180                       (match_operand:V2SF 2 "register_operand" "f")] 
1181                      UNSPEC_C_NGE))]
1182   "TARGET_PAIRED_SINGLE_FLOAT"
1183   "c.nge.ps\t%Z0%1,%2"
1184   [(set_attr "type" "fcmp")
1185    (set_attr "mode" "FPSW")])
1186
1187 (define_insn "mips_c_le_ps"
1188   [(set (match_operand:CCV2 0 "register_operand" "=z")
1189         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1190                       (match_operand:V2SF 2 "register_operand" "f")] 
1191                      UNSPEC_C_LE))]
1192   "TARGET_PAIRED_SINGLE_FLOAT"
1193   "c.le.ps\t%Z0%1,%2"
1194   [(set_attr "type" "fcmp")
1195    (set_attr "mode" "FPSW")])
1196
1197 (define_insn "mips_c_ngt_ps"
1198   [(set (match_operand:CCV2 0 "register_operand" "=z")
1199         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1200                       (match_operand:V2SF 2 "register_operand" "f")] 
1201                      UNSPEC_C_NGT))]
1202   "TARGET_PAIRED_SINGLE_FLOAT"
1203   "c.ngt.ps\t%Z0%1,%2"
1204   [(set_attr "type" "fcmp")
1205    (set_attr "mode" "FPSW")])
1206
1207 ;----------------------------------------------------------------------------
1208 ; Floating Point Absolute Comparisions for Paired Singles
1209 ;----------------------------------------------------------------------------
1210 (define_insn "mips_cabs_f_ps"
1211   [(set (match_operand:CCV2 0 "register_operand" "=z")
1212         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1213                       (match_operand:V2SF 2 "register_operand" "f")] 
1214                      UNSPEC_CABS_F))]
1215   "TARGET_MIPS3D"
1216   "cabs.f.ps\t%Q0,%1,%2"
1217   [(set_attr "type" "fcmp")
1218    (set_attr "mode" "FPSW")])
1219
1220 (define_insn "mips_cabs_un_ps"
1221   [(set (match_operand:CCV2 0 "register_operand" "=z")
1222         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1223                       (match_operand:V2SF 2 "register_operand" "f")] 
1224                      UNSPEC_CABS_UN))]
1225   "TARGET_MIPS3D"
1226   "cabs.un.ps\t%Q0,%1,%2"
1227   [(set_attr "type" "fcmp")
1228    (set_attr "mode" "FPSW")])
1229
1230 (define_insn "mips_cabs_eq_ps"
1231   [(set (match_operand:CCV2 0 "register_operand" "=z")
1232         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1233                       (match_operand:V2SF 2 "register_operand" "f")] 
1234                      UNSPEC_CABS_EQ))]
1235   "TARGET_MIPS3D"
1236   "cabs.eq.ps\t%Q0,%1,%2"
1237   [(set_attr "type" "fcmp")
1238    (set_attr "mode" "FPSW")])
1239
1240 (define_insn "mips_cabs_ueq_ps"
1241   [(set (match_operand:CCV2 0 "register_operand" "=z")
1242         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1243                       (match_operand:V2SF 2 "register_operand" "f")] 
1244                      UNSPEC_CABS_UEQ))]
1245   "TARGET_MIPS3D"
1246   "cabs.ueq.ps\t%Q0,%1,%2"
1247   [(set_attr "type" "fcmp")
1248    (set_attr "mode" "FPSW")])
1249
1250 (define_insn "mips_cabs_olt_ps"
1251   [(set (match_operand:CCV2 0 "register_operand" "=z")
1252         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1253                       (match_operand:V2SF 2 "register_operand" "f")] 
1254                      UNSPEC_CABS_OLT))]
1255   "TARGET_MIPS3D"
1256   "cabs.olt.ps\t%Q0,%1,%2"
1257   [(set_attr "type" "fcmp")
1258    (set_attr "mode" "FPSW")])
1259
1260 (define_insn "mips_cabs_ult_ps"
1261   [(set (match_operand:CCV2 0 "register_operand" "=z")
1262         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1263                       (match_operand:V2SF 2 "register_operand" "f")] 
1264                      UNSPEC_CABS_ULT))]
1265   "TARGET_MIPS3D"
1266   "cabs.ult.ps\t%Q0,%1,%2"
1267   [(set_attr "type" "fcmp")
1268    (set_attr "mode" "FPSW")])
1269
1270 (define_insn "mips_cabs_ole_ps"
1271   [(set (match_operand:CCV2 0 "register_operand" "=z")
1272         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1273                       (match_operand:V2SF 2 "register_operand" "f")] 
1274                      UNSPEC_CABS_OLE))]
1275   "TARGET_MIPS3D"
1276   "cabs.ole.ps\t%Q0,%1,%2"
1277   [(set_attr "type" "fcmp")
1278    (set_attr "mode" "FPSW")])
1279
1280 (define_insn "mips_cabs_ule_ps"
1281   [(set (match_operand:CCV2 0 "register_operand" "=z")
1282         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1283                       (match_operand:V2SF 2 "register_operand" "f")] 
1284                      UNSPEC_CABS_ULE))]
1285   "TARGET_MIPS3D"
1286   "cabs.ule.ps\t%Q0,%1,%2"
1287   [(set_attr "type" "fcmp")
1288    (set_attr "mode" "FPSW")])
1289
1290 (define_insn "mips_cabs_sf_ps"
1291   [(set (match_operand:CCV2 0 "register_operand" "=z")
1292         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1293                       (match_operand:V2SF 2 "register_operand" "f")] 
1294                      UNSPEC_CABS_SF))]
1295   "TARGET_MIPS3D"
1296   "cabs.sf.ps\t%Q0,%1,%2"
1297   [(set_attr "type" "fcmp")
1298    (set_attr "mode" "FPSW")])
1299
1300 (define_insn "mips_cabs_ngle_ps"
1301   [(set (match_operand:CCV2 0 "register_operand" "=z")
1302         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1303                       (match_operand:V2SF 2 "register_operand" "f")] 
1304                      UNSPEC_CABS_NGLE))]
1305   "TARGET_MIPS3D"
1306   "cabs.ngle.ps\t%Q0,%1,%2"
1307   [(set_attr "type" "fcmp")
1308    (set_attr "mode" "FPSW")])
1309
1310 (define_insn "mips_cabs_seq_ps"
1311   [(set (match_operand:CCV2 0 "register_operand" "=z")
1312         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1313                       (match_operand:V2SF 2 "register_operand" "f")] 
1314                      UNSPEC_CABS_SEQ))]
1315   "TARGET_MIPS3D"
1316   "cabs.seq.ps\t%Q0,%1,%2"
1317   [(set_attr "type" "fcmp")
1318    (set_attr "mode" "FPSW")])
1319
1320 (define_insn "mips_cabs_ngl_ps"
1321   [(set (match_operand:CCV2 0 "register_operand" "=z")
1322         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1323                       (match_operand:V2SF 2 "register_operand" "f")] 
1324                      UNSPEC_CABS_NGL))]
1325   "TARGET_MIPS3D"
1326   "cabs.ngl.ps\t%Q0,%1,%2"
1327   [(set_attr "type" "fcmp")
1328    (set_attr "mode" "FPSW")])
1329
1330 (define_insn "mips_cabs_lt_ps"
1331   [(set (match_operand:CCV2 0 "register_operand" "=z")
1332         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1333                       (match_operand:V2SF 2 "register_operand" "f")] 
1334                      UNSPEC_CABS_LT))]
1335   "TARGET_MIPS3D"
1336   "cabs.lt.ps\t%Q0,%1,%2"
1337   [(set_attr "type" "fcmp")
1338    (set_attr "mode" "FPSW")])
1339
1340 (define_insn "mips_cabs_nge_ps"
1341   [(set (match_operand:CCV2 0 "register_operand" "=z")
1342         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1343                       (match_operand:V2SF 2 "register_operand" "f")] 
1344                      UNSPEC_CABS_NGE))]
1345   "TARGET_MIPS3D"
1346   "cabs.nge.ps\t%Q0,%1,%2"
1347   [(set_attr "type" "fcmp")
1348    (set_attr "mode" "FPSW")])
1349
1350 (define_insn "mips_cabs_le_ps"
1351   [(set (match_operand:CCV2 0 "register_operand" "=z")
1352         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1353                       (match_operand:V2SF 2 "register_operand" "f")] 
1354                      UNSPEC_CABS_LE))]
1355   "TARGET_MIPS3D"
1356   "cabs.le.ps\t%Q0,%1,%2"
1357   [(set_attr "type" "fcmp")
1358    (set_attr "mode" "FPSW")])
1359
1360 (define_insn "mips_cabs_ngt_ps"
1361   [(set (match_operand:CCV2 0 "register_operand" "=z")
1362         (unspec:CCV2 [(match_operand:V2SF 1 "register_operand" "f")
1363                       (match_operand:V2SF 2 "register_operand" "f")] 
1364                      UNSPEC_CABS_NGT))]
1365   "TARGET_MIPS3D"
1366   "cabs.ngt.ps\t%Q0,%1,%2"
1367   [(set_attr "type" "fcmp")
1368    (set_attr "mode" "FPSW")])
1369
1370 ;----------------------------------------------------------------------------
1371 ; Floating Point Branch Instructions.
1372 ;----------------------------------------------------------------------------
1373
1374 ; Branch on Any of Four Floating Point Condition Codes True
1375 (define_insn "bc1any4t"
1376   [(set (pc)
1377         (if_then_else (eq:CCV4 (match_operand:CCV4 0 "register_operand" "z")
1378                                (const_int 0))
1379                       (label_ref (match_operand 1 "" ""))
1380                       (pc)))]
1381   "TARGET_MIPS3D"
1382   "%*bc1any4t\t%Q0,%1%/"
1383   [(set_attr "type" "branch")
1384    (set_attr "mode" "none")])
1385
1386 ; Branch on Any of Four Floating Point Condition Codes False
1387 (define_insn "bc1any4f"
1388   [(set (pc)
1389         (if_then_else (ne:CCV4 (match_operand:CCV4 0 "register_operand" "z")
1390                                (const_int 1))
1391                       (label_ref (match_operand 1 "" ""))
1392                       (pc)))]
1393   "TARGET_MIPS3D"
1394   "%*bc1any4f\t%Q0,%1%/"
1395   [(set_attr "type" "branch")
1396    (set_attr "mode" "none")])
1397
1398 ; Branch on Any of Two Floating Point Condition Codes True
1399 (define_insn "bc1any2t"
1400   [(set (pc)
1401         (if_then_else (eq:CCV2 (match_operand:CCV2 0 "register_operand" "z")
1402                                (const_int 0))
1403                       (label_ref (match_operand 1 "" ""))
1404                       (pc)))]
1405   "TARGET_MIPS3D"
1406   "%*bc1any2t\t%Q0,%1%/"
1407   [(set_attr "type" "branch")
1408    (set_attr "mode" "none")])
1409
1410 ; Branch on Upper of Two Floating Point Condition Codes True
1411 (define_insn "bc1upper2t"
1412   [(set (pc)
1413         (if_then_else (eq:CCV2 (match_operand:CCV2 0 "register_operand" "z")
1414                                (const_int 1))
1415                       (label_ref (match_operand 1 "" ""))
1416                       (pc)))]
1417   "TARGET_PAIRED_SINGLE_FLOAT"
1418   "%*bc1t\t%Y0,%1%/"
1419   [(set_attr "type" "branch")
1420    (set_attr "mode" "none")])
1421
1422 ; Branch on Lower of Two Floating Point Condition Codes True
1423 (define_insn "bc1lower2t"
1424   [(set (pc)
1425         (if_then_else (eq:CCV2 (match_operand:CCV2 0 "register_operand" "z")
1426                                (const_int 2))
1427                       (label_ref (match_operand 1 "" ""))
1428                       (pc)))]
1429   "TARGET_PAIRED_SINGLE_FLOAT"
1430   "%*bc1t\t%y0,%1%/"
1431   [(set_attr "type" "branch")
1432    (set_attr "mode" "none")])
1433
1434
1435 ; Branch on Any of Two Floating Point Condition Codes False
1436 (define_insn "bc1any2f"
1437   [(set (pc)
1438         (if_then_else (ne:CCV2 (match_operand:CCV2 0 "register_operand" "z")
1439                                (const_int 3))
1440                       (label_ref (match_operand 1 "" ""))
1441                       (pc)))]
1442   "TARGET_MIPS3D"
1443   "%*bc1any2f\t%Q0,%1%/"
1444   [(set_attr "type" "branch")
1445    (set_attr "mode" "none")])
1446
1447 ; Branch on Upper of Two Floating Point Condition Codes False
1448 (define_insn "bc1upper2f"
1449   [(set (pc)
1450         (if_then_else (ne:CCV2 (match_operand:CCV2 0 "register_operand" "z")
1451                                (const_int 1))
1452                       (label_ref (match_operand 1 "" ""))
1453                       (pc)))]
1454   "TARGET_PAIRED_SINGLE_FLOAT"
1455   "%*bc1f\t%Y0,%1%/"
1456   [(set_attr "type" "branch")
1457    (set_attr "mode" "none")])
1458
1459 ; Branch on Lower of Two Floating Point Condition Codes False
1460 (define_insn "bc1lower2f"
1461   [(set (pc)
1462         (if_then_else (ne:CCV2 (match_operand:CCV2 0 "register_operand" "z")
1463                                (const_int 2))
1464                       (label_ref (match_operand 1 "" ""))
1465                       (pc)))]
1466   "TARGET_PAIRED_SINGLE_FLOAT"
1467   "%*bc1f\t%y0,%1%/"
1468   [(set_attr "type" "branch")
1469    (set_attr "mode" "none")])
1470
1471 ;----------------------------------------------------------------------------
1472 ; Floating Point Reduced Precision Reciprocal Square Root Instructions.
1473 ;----------------------------------------------------------------------------
1474
1475 ; Floating Point Reduced Precision Reciprocal Square Root
1476 ; for Single (Sequence Step 1)
1477 (define_insn "mips_rsqrt1_s"
1478   [(set (match_operand:SF 0 "register_operand" "=f")
1479         (unspec:SF [(match_operand:SF 1 "register_operand" "f")]
1480                    UNSPEC_RSQRT1_S))]
1481   "TARGET_MIPS3D"
1482   "rsqrt1.s\t%0,%1"
1483   [(set_attr "type" "frsqrt")
1484    (set_attr "mode" "SF")])
1485
1486 ; Floating Point Reduced Precision Reciprocal Square Root
1487 ; for Double (Sequence Step 1)
1488 (define_insn "mips_rsqrt1_d"
1489   [(set (match_operand:DF 0 "register_operand" "=f")
1490         (unspec:DF [(match_operand:DF 1 "register_operand" "f")]
1491                    UNSPEC_RSQRT1_D))]
1492   "TARGET_MIPS3D"
1493   "rsqrt1.d\t%0,%1"
1494   [(set_attr "type" "frsqrt")
1495    (set_attr "mode" "DF")])
1496
1497 ; Floating Point Reduced Precision Reciprocal Square Root
1498 ; for Paired Singles (Sequence Step 1)
1499 (define_insn "mips_rsqrt1_ps"
1500   [(set (match_operand:V2SF 0 "register_operand" "=f")
1501         (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")]
1502                    UNSPEC_RSQRT1_PS))]
1503   "TARGET_MIPS3D"
1504   "rsqrt1.ps\t%0,%1"
1505   [(set_attr "type" "frsqrt")
1506    (set_attr "mode" "SF")])
1507
1508 ; Floating Point Reduced Precision Reciprocal Square Root
1509 ; for Single (Sequence Step 2)
1510 (define_insn "mips_rsqrt2_s"
1511   [(set (match_operand:SF 0 "register_operand" "=f")
1512         (unspec:SF [(match_operand:SF 1 "register_operand" "f")
1513                     (match_operand:SF 2 "register_operand" "f")]
1514                    UNSPEC_RSQRT2_S))]
1515   "TARGET_MIPS3D"
1516   "rsqrt2.s\t%0,%1,%2"
1517   [(set_attr "type" "frsqrt")
1518    (set_attr "mode" "SF")])
1519
1520 ; Floating Point Reduced Precision Reciprocal Square Root
1521 ; for Double (Sequence Step 2)
1522 (define_insn "mips_rsqrt2_d"
1523   [(set (match_operand:DF 0 "register_operand" "=f")
1524         (unspec:DF [(match_operand:DF 1 "register_operand" "f")
1525                     (match_operand:DF 2 "register_operand" "f")]
1526                    UNSPEC_RSQRT2_D))]
1527   "TARGET_MIPS3D"
1528   "rsqrt2.d\t%0,%1,%2"
1529   [(set_attr "type" "frsqrt")
1530    (set_attr "mode" "DF")])
1531
1532 ; Floating Point Reduced Precision Reciprocal Square Root 
1533 ; for Paired Singles (Sequence Step 2)
1534 (define_insn "mips_rsqrt2_ps"
1535   [(set (match_operand:V2SF 0 "register_operand" "=f")
1536         (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")
1537                       (match_operand:V2SF 2 "register_operand" "f")]
1538                      UNSPEC_RSQRT2_PS))]
1539   "TARGET_MIPS3D"
1540   "rsqrt2.ps\t%0,%1,%2"
1541   [(set_attr "type" "frsqrt")
1542    (set_attr "mode" "SF")])
1543
1544 ; Floating Point Reduced Precision Reciprocal for Single (Sequence Step 1)
1545 (define_insn "mips_recip1_s"
1546   [(set (match_operand:SF 0 "register_operand" "=f")
1547         (unspec:SF [(match_operand:SF 1 "register_operand" "f")]
1548                    UNSPEC_RECIP1_S))]
1549   "TARGET_MIPS3D"
1550   "recip1.s\t%0,%1"
1551   [(set_attr "type" "frdiv")
1552    (set_attr "mode" "SF")])
1553
1554 ; Floating Point Reduced Precision Reciprocal for Double (Sequence Step 1)
1555 (define_insn "mips_recip1_d"
1556   [(set (match_operand:DF 0 "register_operand" "=f")
1557         (unspec:DF [(match_operand:DF 1 "register_operand" "f")]
1558                    UNSPEC_RECIP1_D))]
1559   "TARGET_MIPS3D"
1560   "recip1.d\t%0,%1"
1561   [(set_attr "type" "frdiv")
1562    (set_attr "mode" "DF")])
1563
1564 ; Floating Point Reduced Precision Reciprocal for Paired Singles 
1565 ; (Sequence Step 1)
1566 (define_insn "mips_recip1_ps"
1567   [(set (match_operand:V2SF 0 "register_operand" "=f")
1568         (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")]
1569                      UNSPEC_RECIP1_PS))]
1570   "TARGET_MIPS3D"
1571   "recip1.ps\t%0,%1"
1572   [(set_attr "type" "frdiv")
1573    (set_attr "mode" "SF")])
1574
1575 ; Floating Point Reduced Precision Reciprocal for Single (Sequence Step 2)
1576 (define_insn "mips_recip2_s"
1577   [(set (match_operand:SF 0 "register_operand" "=f")
1578         (unspec:SF [(match_operand:SF 1 "register_operand" "f")
1579                     (match_operand:SF 2 "register_operand" "f")]
1580                    UNSPEC_RECIP2_S))]
1581   "TARGET_MIPS3D"
1582   "recip2.s\t%0,%1,%2"
1583   [(set_attr "type" "frdiv")
1584    (set_attr "mode" "SF")])
1585
1586 ; Floating Point Reduced Precision Reciprocal for Double (Sequence Step 2)
1587 (define_insn "mips_recip2_d"
1588   [(set (match_operand:DF 0 "register_operand" "=f")
1589         (unspec:DF [(match_operand:DF 1 "register_operand" "f")
1590                     (match_operand:DF 2 "register_operand" "f")]
1591                    UNSPEC_RECIP2_D))]
1592   "TARGET_MIPS3D"
1593   "recip2.d\t%0,%1,%2"
1594   [(set_attr "type" "frdiv")
1595    (set_attr "mode" "DF")])
1596
1597 ; Floating Point Reduced Precision Reciprocal for Paired Singles 
1598 ; (Sequence Step 2)
1599 (define_insn "mips_recip2_ps"
1600   [(set (match_operand:V2SF 0 "register_operand" "=f")
1601         (unspec:V2SF [(match_operand:V2SF 1 "register_operand" "f")
1602                       (match_operand:V2SF 2 "register_operand" "f")]
1603                      UNSPEC_RECIP2_PS))]
1604   "TARGET_MIPS3D"
1605   "recip2.ps\t%0,%1,%2"
1606   [(set_attr "type" "frdiv")
1607    (set_attr "mode" "SF")])