1 ;; IA-64 Machine description template
2 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
3 ;; Free Software Foundation, Inc.
4 ;; Contributed by James E. Wilson <wilson@cygnus.com> and
5 ;; David Mosberger <davidm@hpl.hp.com>.
7 ;; This file is part of GCC.
9 ;; GCC is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; GCC is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GCC; see the file COPYING. If not, write to
21 ;; the Free Software Foundation, 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA.
24 ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al.
26 ;; ??? register_operand accepts (subreg:DI (mem:SI X)) which forces later
27 ;; reload. This will be fixed once scheduling support is turned on.
29 ;; ??? Optimize for post-increment addressing modes.
31 ;; ??? fselect is not supported, because there is no integer register
34 ;; ??? fp abs/min/max instructions may also work for integer values.
36 ;; ??? Would a predicate_reg_operand predicate be useful? The HP one is buggy,
37 ;; it assumes the operand is a register and takes REGNO of it without checking.
39 ;; ??? Would a branch_reg_operand predicate be useful? The HP one is buggy,
40 ;; it assumes the operand is a register and takes REGNO of it without checking.
42 ;; ??? Go through list of documented named patterns and look for more to
45 ;; ??? Go through instruction manual and look for more instructions that
48 ;; ??? Add function unit scheduling info for Itanium (TM) processor.
50 ;; ??? Need a better way to describe alternate fp status registers.
54 (UNSPEC_LTOFF_DTPMOD 0)
55 (UNSPEC_LTOFF_DTPREL 1)
57 (UNSPEC_LTOFF_TPREL 3)
63 (UNSPEC_GR_RESTORE 11)
65 (UNSPEC_FR_RESTORE 13)
66 (UNSPEC_FR_RECIP_APPROX 14)
67 (UNSPEC_PRED_REL_MUTEX 15)
71 (UNSPEC_CMPXCHG_ACQ 19)
72 (UNSPEC_FETCHADD_ACQ 20)
75 (UNSPEC_BUNDLE_SELECTOR 23)
77 (UNSPEC_PROLOGUE_USE 25)
80 (UNSPEC_FR_SQRT_RECIP_APPROX 28)
88 (UNSPECV_INSN_GROUP_BARRIER 2)
91 (UNSPECV_PSAC_ALL 5) ; pred.safe_across_calls
92 (UNSPECV_PSAC_NORMAL 6)
93 (UNSPECV_SETJMP_RECEIVER 7)
96 (include "predicates.md")
98 ;; ::::::::::::::::::::
102 ;; ::::::::::::::::::::
104 ;; Processor type. This attribute must exactly match the processor_type
105 ;; enumeration in ia64.h.
106 (define_attr "cpu" "itanium,itanium2" (const (symbol_ref "ia64_tune")))
108 ;; Instruction type. This primarily determines how instructions can be
109 ;; packed in bundles, and secondarily affects scheduling to function units.
111 ;; A alu, can go in I or M syllable of a bundle
116 ;; L long immediate, takes two syllables
119 ;; ??? Should not have any pattern with type unknown. Perhaps add code to
120 ;; check this in md_reorg? Currently use unknown for patterns which emit
121 ;; multiple instructions, patterns which emit 0 instructions, and patterns
122 ;; which emit instruction that can go in any slot (e.g. nop).
124 (define_attr "itanium_class" "unknown,ignore,stop_bit,br,fcmp,fcvtfx,fld,
125 fmac,fmisc,frar_i,frar_m,frbr,frfr,frpr,ialu,icmp,ilog,ishf,ld,
126 chk_s,long_i,mmalua,mmmul,mmshf,mmshfi,rse_m,scall,sem,stf,
127 st,syst_m0, syst_m,tbit,toar_i,toar_m,tobr,tofr,topr,xmpy,xtd,nop,
128 nop_b,nop_f,nop_i,nop_m,nop_x,lfetch,pre_cycle"
129 (const_string "unknown"))
131 ;; chk_s has an I and an M form; use type A for convenience.
132 (define_attr "type" "unknown,A,I,M,F,B,L,X,S"
133 (cond [(eq_attr "itanium_class" "ld,st,fld,stf,sem,nop_m") (const_string "M")
134 (eq_attr "itanium_class" "rse_m,syst_m,syst_m0") (const_string "M")
135 (eq_attr "itanium_class" "frar_m,toar_m,frfr,tofr") (const_string "M")
136 (eq_attr "itanium_class" "lfetch") (const_string "M")
137 (eq_attr "itanium_class" "chk_s,ialu,icmp,ilog,mmalua")
139 (eq_attr "itanium_class" "fmisc,fmac,fcmp,xmpy") (const_string "F")
140 (eq_attr "itanium_class" "fcvtfx,nop_f") (const_string "F")
141 (eq_attr "itanium_class" "frar_i,toar_i,frbr,tobr") (const_string "I")
142 (eq_attr "itanium_class" "frpr,topr,ishf,xtd,tbit") (const_string "I")
143 (eq_attr "itanium_class" "mmmul,mmshf,mmshfi,nop_i") (const_string "I")
144 (eq_attr "itanium_class" "br,scall,nop_b") (const_string "B")
145 (eq_attr "itanium_class" "stop_bit") (const_string "S")
146 (eq_attr "itanium_class" "nop_x") (const_string "X")
147 (eq_attr "itanium_class" "long_i") (const_string "L")]
148 (const_string "unknown")))
150 (define_attr "itanium_requires_unit0" "no,yes"
151 (cond [(eq_attr "itanium_class" "syst_m0,sem,frfr,rse_m") (const_string "yes")
152 (eq_attr "itanium_class" "toar_m,frar_m") (const_string "yes")
153 (eq_attr "itanium_class" "frbr,tobr,mmmul") (const_string "yes")
154 (eq_attr "itanium_class" "tbit,ishf,topr,frpr") (const_string "yes")
155 (eq_attr "itanium_class" "toar_i,frar_i") (const_string "yes")
156 (eq_attr "itanium_class" "fmisc,fcmp") (const_string "yes")]
157 (const_string "no")))
159 ;; Predication. True iff this instruction can be predicated.
161 (define_attr "predicable" "no,yes" (const_string "yes"))
163 ;; Empty. True iff this insn does not generate any code.
165 (define_attr "empty" "no,yes" (const_string "no"))
167 ;; True iff this insn must be the first insn of an instruction group.
168 ;; This is true for the alloc instruction, and will also be true of others
169 ;; when we have full intrinsics support.
171 (define_attr "first_insn" "no,yes" (const_string "no"))
173 ;; DFA descriptions of ia64 processors used for insn scheduling and
176 (automata_option "ndfa")
178 ;; Uncomment the following line to output automata for debugging.
179 ;; (automata_option "v")
181 (automata_option "w")
183 (include "itanium1.md")
184 (include "itanium2.md")
187 ;; ::::::::::::::::::::
191 ;; ::::::::::::::::::::
193 ;; Set of a single predicate register. This is only used to implement
194 ;; pr-to-pr move and complement.
196 (define_insn "*movcci"
197 [(set (match_operand:CCI 0 "register_operand" "=c,c,c")
198 (match_operand:CCI 1 "nonmemory_operand" "O,n,c"))]
201 cmp.ne %0, p0 = r0, r0
202 cmp.eq %0, p0 = r0, r0
203 (%1) cmp.eq.unc %0, p0 = r0, r0"
204 [(set_attr "itanium_class" "icmp")
205 (set_attr "predicable" "no")])
208 [(set (match_operand:BI 0 "nonimmediate_operand" "=c,c,?c,?*r, c,*r,*r,*m,*r")
209 (match_operand:BI 1 "move_operand" " O,n, c, c,*r, n,*m,*r,*r"))]
212 cmp.ne %0, %I0 = r0, r0
213 cmp.eq %0, %I0 = r0, r0
216 tbit.nz %0, %I0 = %1, 0
221 [(set_attr "itanium_class" "icmp,icmp,unknown,unknown,tbit,ialu,ld,st,ialu")])
224 [(set (match_operand:BI 0 "register_operand" "")
225 (match_operand:BI 1 "register_operand" ""))]
227 && GET_CODE (operands[0]) == REG && GR_REGNO_P (REGNO (operands[0]))
228 && GET_CODE (operands[1]) == REG && PR_REGNO_P (REGNO (operands[1]))"
229 [(cond_exec (ne (match_dup 1) (const_int 0))
230 (set (match_dup 0) (const_int 1)))
231 (cond_exec (eq (match_dup 1) (const_int 0))
232 (set (match_dup 0) (const_int 0)))]
236 [(set (match_operand:BI 0 "register_operand" "")
237 (match_operand:BI 1 "register_operand" ""))]
239 && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0]))
240 && GET_CODE (operands[1]) == REG && PR_REGNO_P (REGNO (operands[1]))"
241 [(set (match_dup 2) (match_dup 4))
242 (set (match_dup 3) (match_dup 5))
243 (set (match_dup 0) (unspec:BI [(match_dup 0)] UNSPEC_PRED_REL_MUTEX))]
244 "operands[2] = gen_rtx_REG (CCImode, REGNO (operands[0]));
245 operands[3] = gen_rtx_REG (CCImode, REGNO (operands[0]) + 1);
246 operands[4] = gen_rtx_REG (CCImode, REGNO (operands[1]));
247 operands[5] = gen_rtx_REG (CCImode, REGNO (operands[1]) + 1);")
249 (define_expand "movqi"
250 [(set (match_operand:QI 0 "general_operand" "")
251 (match_operand:QI 1 "general_operand" ""))]
254 rtx op1 = ia64_expand_move (operands[0], operands[1]);
260 (define_insn "*movqi_internal"
261 [(set (match_operand:QI 0 "destination_operand" "=r,r,r, m, r,*f,*f")
262 (match_operand:QI 1 "move_operand" "rO,J,m,rO,*f,rO,*f"))]
263 "ia64_move_ok (operands[0], operands[1])"
272 [(set_attr "itanium_class" "ialu,ialu,ld,st,frfr,tofr,fmisc")])
274 (define_expand "movhi"
275 [(set (match_operand:HI 0 "general_operand" "")
276 (match_operand:HI 1 "general_operand" ""))]
279 rtx op1 = ia64_expand_move (operands[0], operands[1]);
285 (define_insn "*movhi_internal"
286 [(set (match_operand:HI 0 "destination_operand" "=r,r,r, m, r,*f,*f")
287 (match_operand:HI 1 "move_operand" "rO,J,m,rO,*f,rO,*f"))]
288 "ia64_move_ok (operands[0], operands[1])"
297 [(set_attr "itanium_class" "ialu,ialu,ld,st,frfr,tofr,fmisc")])
299 (define_expand "movsi"
300 [(set (match_operand:SI 0 "general_operand" "")
301 (match_operand:SI 1 "general_operand" ""))]
304 rtx op1 = ia64_expand_move (operands[0], operands[1]);
310 (define_insn "*movsi_internal"
311 [(set (match_operand:SI 0 "destination_operand" "=r,r,r,r, m, r,*f,*f, r,*d")
312 (match_operand:SI 1 "move_operand" "rO,J,i,m,rO,*f,rO,*f,*d,rK"))]
313 "ia64_move_ok (operands[0], operands[1])"
325 ;; frar_m, toar_m ??? why not frar_i and toar_i
326 [(set_attr "itanium_class" "ialu,ialu,long_i,ld,st,frfr,tofr,fmisc,frar_m,toar_m")])
328 (define_expand "movdi"
329 [(set (match_operand:DI 0 "general_operand" "")
330 (match_operand:DI 1 "general_operand" ""))]
333 rtx op1 = ia64_expand_move (operands[0], operands[1]);
339 (define_insn "*movdi_internal"
340 [(set (match_operand:DI 0 "destination_operand"
341 "=r,r,r,r, m, r,*f,*f,*f, Q, r,*b, r,*e, r,*d, r,*c")
342 (match_operand:DI 1 "move_operand"
343 "rO,JT,i,m,rO,*f,rO,*f, Q,*f,*b,rO,*e,rK,*d,rK,*c,rO"))]
344 "ia64_move_ok (operands[0], operands[1])"
346 static const char * const alt[] = {
348 "%,addl %0 = %1, r0",
350 "%,ld8%O1 %0 = %1%P1",
351 "%,st8%Q0 %0 = %r1%P0",
352 "%,getf.sig %0 = %1",
353 "%,setf.sig %0 = %r1",
367 gcc_assert (which_alternative != 2 || TARGET_NO_PIC
368 || !symbolic_operand (operands[1], VOIDmode));
370 return alt[which_alternative];
372 [(set_attr "itanium_class" "ialu,ialu,long_i,ld,st,frfr,tofr,fmisc,fld,stf,frbr,tobr,frar_i,toar_i,frar_m,toar_m,frpr,topr")])
375 [(set (match_operand 0 "register_operand" "")
376 (match_operand 1 "symbolic_operand" ""))]
380 if (ia64_expand_load_address (operands[0], operands[1]))
386 (define_expand "load_fptr"
387 [(set (match_operand:DI 0 "register_operand" "")
388 (plus:DI (match_dup 2) (match_operand 1 "function_operand" "")))
389 (set (match_dup 0) (match_dup 3))]
392 operands[2] = pic_offset_table_rtx;
393 operands[3] = gen_const_mem (DImode, operands[0]);
396 (define_insn "*load_fptr_internal1"
397 [(set (match_operand:DI 0 "register_operand" "=r")
398 (plus:DI (reg:DI 1) (match_operand 1 "function_operand" "s")))]
400 "addl %0 = @ltoff(@fptr(%1)), gp"
401 [(set_attr "itanium_class" "ialu")])
403 (define_insn "load_gprel"
404 [(set (match_operand:DI 0 "register_operand" "=r")
405 (plus:DI (reg:DI 1) (match_operand 1 "sdata_symbolic_operand" "s")))]
407 "addl %0 = @gprel(%1), gp"
408 [(set_attr "itanium_class" "ialu")])
410 (define_insn "*gprel64_offset"
411 [(set (match_operand:DI 0 "register_operand" "=r")
412 (minus:DI (match_operand:DI 1 "symbolic_operand" "") (reg:DI 1)))]
414 "movl %0 = @gprel(%1)"
415 [(set_attr "itanium_class" "long_i")])
417 (define_expand "load_gprel64"
418 [(set (match_operand:DI 0 "register_operand" "")
419 (minus:DI (match_operand:DI 1 "symbolic_operand" "") (match_dup 2)))
421 (plus:DI (match_dup 2) (match_dup 0)))]
424 operands[2] = pic_offset_table_rtx;
427 ;; This is used as a placeholder for the return address during early
428 ;; compilation. We won't know where we've placed this until during
429 ;; reload, at which point it can wind up in b0, a general register,
430 ;; or memory. The only safe destination under these conditions is a
433 (define_insn_and_split "*movdi_ret_addr"
434 [(set (match_operand:DI 0 "register_operand" "=r")
435 (unspec:DI [(const_int 0)] UNSPEC_RET_ADDR))]
441 ia64_split_return_addr_rtx (operands[0]);
444 [(set_attr "itanium_class" "ialu")])
446 (define_insn "*load_symptr_high"
447 [(set (match_operand:DI 0 "register_operand" "=r")
448 (plus:DI (high:DI (match_operand 1 "got_symbolic_operand" "s"))
449 (match_operand:DI 2 "register_operand" "a")))]
452 if (HAVE_AS_LTOFFX_LDXMOV_RELOCS)
453 return "%,addl %0 = @ltoffx(%1), %2";
455 return "%,addl %0 = @ltoff(%1), %2";
457 [(set_attr "itanium_class" "ialu")])
459 (define_insn "*load_symptr_low"
460 [(set (match_operand:DI 0 "register_operand" "=r")
461 (lo_sum:DI (match_operand:DI 1 "register_operand" "r")
462 (match_operand 2 "got_symbolic_operand" "s")))]
465 if (HAVE_AS_LTOFFX_LDXMOV_RELOCS)
466 return "%,ld8.mov %0 = [%1], %2";
468 return "%,ld8 %0 = [%1]";
470 [(set_attr "itanium_class" "ld")])
472 (define_insn_and_split "load_dtpmod"
473 [(set (match_operand:DI 0 "register_operand" "=r")
474 (unspec:DI [(match_operand 1 "tls_symbolic_operand" "")]
480 (plus:DI (unspec:DI [(match_dup 1)] UNSPEC_LTOFF_DTPMOD)
482 (set (match_dup 0) (match_dup 3))]
484 operands[2] = pic_offset_table_rtx;
485 operands[3] = gen_const_mem (DImode, operands[0]);
488 (define_insn "*load_ltoff_dtpmod"
489 [(set (match_operand:DI 0 "register_operand" "=r")
490 (plus:DI (unspec:DI [(match_operand 1 "tls_symbolic_operand" "")]
492 (match_operand:DI 2 "register_operand" "a")))]
494 "addl %0 = @ltoff(@dtpmod(%1)), %2"
495 [(set_attr "itanium_class" "ialu")])
497 (define_expand "load_dtprel"
498 [(set (match_operand:DI 0 "register_operand" "")
499 (unspec:DI [(match_operand 1 "tls_symbolic_operand" "")]
504 (define_insn "*load_dtprel64"
505 [(set (match_operand:DI 0 "register_operand" "=r")
506 (unspec:DI [(match_operand 1 "ld_tls_symbolic_operand" "")]
509 "movl %0 = @dtprel(%1)"
510 [(set_attr "itanium_class" "long_i")])
512 (define_insn "*load_dtprel22"
513 [(set (match_operand:DI 0 "register_operand" "=r")
514 (unspec:DI [(match_operand 1 "ld_tls_symbolic_operand" "")]
517 "addl %0 = @dtprel(%1), r0"
518 [(set_attr "itanium_class" "ialu")])
520 (define_insn_and_split "*load_dtprel_gd"
521 [(set (match_operand:DI 0 "register_operand" "=r")
522 (unspec:DI [(match_operand 1 "tls_symbolic_operand" "")]
528 (plus:DI (unspec:DI [(match_dup 1)] UNSPEC_LTOFF_DTPREL)
530 (set (match_dup 0) (match_dup 3))]
532 operands[2] = pic_offset_table_rtx;
533 operands[3] = gen_const_mem (DImode, operands[0]);
536 (define_insn "*load_ltoff_dtprel"
537 [(set (match_operand:DI 0 "register_operand" "=r")
538 (plus:DI (unspec:DI [(match_operand 1 "tls_symbolic_operand" "")]
540 (match_operand:DI 2 "register_operand" "a")))]
542 "addl %0 = @ltoff(@dtprel(%1)), %2"
543 [(set_attr "itanium_class" "ialu")])
545 (define_expand "add_dtprel"
546 [(set (match_operand:DI 0 "register_operand" "")
547 (plus:DI (unspec:DI [(match_operand 1 "ld_tls_symbolic_operand" "")]
549 (match_operand:DI 2 "register_operand" "")))]
553 (define_insn "*add_dtprel14"
554 [(set (match_operand:DI 0 "register_operand" "=r")
555 (plus:DI (unspec:DI [(match_operand 1 "ld_tls_symbolic_operand" "")]
557 (match_operand:DI 2 "register_operand" "r")))]
559 "adds %0 = @dtprel(%1), %2"
560 [(set_attr "itanium_class" "ialu")])
562 (define_insn "*add_dtprel22"
563 [(set (match_operand:DI 0 "register_operand" "=r")
564 (plus:DI (unspec:DI [(match_operand 1 "ld_tls_symbolic_operand" "")]
566 (match_operand:DI 2 "register_operand" "a")))]
568 "addl %0 = @dtprel(%1), %2"
569 [(set_attr "itanium_class" "ialu")])
571 (define_expand "load_tprel"
572 [(set (match_operand:DI 0 "register_operand" "")
573 (unspec:DI [(match_operand 1 "tls_symbolic_operand" "")]
578 (define_insn "*load_tprel64"
579 [(set (match_operand:DI 0 "register_operand" "=r")
580 (unspec:DI [(match_operand 1 "le_tls_symbolic_operand" "")]
583 "movl %0 = @tprel(%1)"
584 [(set_attr "itanium_class" "long_i")])
586 (define_insn "*load_tprel22"
587 [(set (match_operand:DI 0 "register_operand" "=r")
588 (unspec:DI [(match_operand 1 "le_tls_symbolic_operand" "")]
591 "addl %0 = @tprel(%1), r0"
592 [(set_attr "itanium_class" "ialu")])
594 (define_insn_and_split "*load_tprel_ie"
595 [(set (match_operand:DI 0 "register_operand" "=r")
596 (unspec:DI [(match_operand 1 "ie_tls_symbolic_operand" "")]
602 (plus:DI (unspec:DI [(match_dup 1)] UNSPEC_LTOFF_TPREL)
604 (set (match_dup 0) (match_dup 3))]
606 operands[2] = pic_offset_table_rtx;
607 operands[3] = gen_const_mem (DImode, operands[0]);
610 (define_insn "*load_ltoff_tprel"
611 [(set (match_operand:DI 0 "register_operand" "=r")
612 (plus:DI (unspec:DI [(match_operand 1 "ie_tls_symbolic_operand" "")]
614 (match_operand:DI 2 "register_operand" "a")))]
616 "addl %0 = @ltoff(@tprel(%1)), %2"
617 [(set_attr "itanium_class" "ialu")])
619 (define_expand "add_tprel"
620 [(set (match_operand:DI 0 "register_operand" "")
621 (plus:DI (unspec:DI [(match_operand 1 "le_tls_symbolic_operand" "")]
623 (match_operand:DI 2 "register_operand" "")))]
627 (define_insn "*add_tprel14"
628 [(set (match_operand:DI 0 "register_operand" "=r")
629 (plus:DI (unspec:DI [(match_operand 1 "le_tls_symbolic_operand" "")]
631 (match_operand:DI 2 "register_operand" "r")))]
633 "adds %0 = @tprel(%1), %2"
634 [(set_attr "itanium_class" "ialu")])
636 (define_insn "*add_tprel22"
637 [(set (match_operand:DI 0 "register_operand" "=r")
638 (plus:DI (unspec:DI [(match_operand 1 "le_tls_symbolic_operand" "")]
640 (match_operand:DI 2 "register_operand" "a")))]
642 "addl %0 = @tprel(%1), %2"
643 [(set_attr "itanium_class" "ialu")])
645 ;; With no offsettable memory references, we've got to have a scratch
646 ;; around to play with the second word. However, in order to avoid a
647 ;; reload nightmare we lie, claim we don't need one, and fix it up
648 ;; in ia64_split_tmode_move.
649 (define_expand "movti"
650 [(set (match_operand:TI 0 "general_operand" "")
651 (match_operand:TI 1 "general_operand" ""))]
654 rtx op1 = ia64_expand_move (operands[0], operands[1]);
660 (define_insn_and_split "*movti_internal"
661 [(set (match_operand:TI 0 "nonimmediate_operand" "=r,r,m")
662 (match_operand:TI 1 "general_operand" "ri,m,r"))]
663 "ia64_move_ok (operands[0], operands[1])"
668 ia64_split_tmode_move (operands);
671 [(set_attr "itanium_class" "unknown")
672 (set_attr "predicable" "no")])
674 ;; Floating Point Moves
676 ;; Note - Patterns for SF mode moves are compulsory, but
677 ;; patterns for DF are optional, as GCC can synthesize them.
679 (define_expand "movsf"
680 [(set (match_operand:SF 0 "general_operand" "")
681 (match_operand:SF 1 "general_operand" ""))]
684 rtx op1 = ia64_expand_move (operands[0], operands[1]);
690 (define_insn "*movsf_internal"
691 [(set (match_operand:SF 0 "destination_operand" "=f,f, Q,*r, f,*r,*r, m")
692 (match_operand:SF 1 "general_operand" "fG,Q,fG,fG,*r,*r, m,*r"))]
693 "ia64_move_ok (operands[0], operands[1])"
703 [(set_attr "itanium_class" "fmisc,fld,stf,frfr,tofr,ialu,ld,st")])
705 (define_expand "movdf"
706 [(set (match_operand:DF 0 "general_operand" "")
707 (match_operand:DF 1 "general_operand" ""))]
710 rtx op1 = ia64_expand_move (operands[0], operands[1]);
716 (define_insn "*movdf_internal"
717 [(set (match_operand:DF 0 "destination_operand" "=f,f, Q,*r, f,*r,*r, m")
718 (match_operand:DF 1 "general_operand" "fG,Q,fG,fG,*r,*r, m,*r"))]
719 "ia64_move_ok (operands[0], operands[1])"
729 [(set_attr "itanium_class" "fmisc,fld,stf,frfr,tofr,ialu,ld,st")])
731 ;; With no offsettable memory references, we've got to have a scratch
732 ;; around to play with the second word if the variable winds up in GRs.
733 (define_expand "movxf"
734 [(set (match_operand:XF 0 "general_operand" "")
735 (match_operand:XF 1 "general_operand" ""))]
738 rtx op0 = operands[0];
740 if (GET_CODE (op0) == SUBREG)
741 op0 = SUBREG_REG (op0);
743 /* We must support XFmode loads into general registers for stdarg/vararg,
744 unprototyped calls, and a rare case where a long double is passed as
745 an argument after a float HFA fills the FP registers. We split them into
746 DImode loads for convenience. We also need to support XFmode stores
747 for the last case. This case does not happen for stdarg/vararg routines,
748 because we do a block store to memory of unnamed arguments. */
750 if (GET_CODE (op0) == REG && GR_REGNO_P (REGNO (op0)))
754 /* We're hoping to transform everything that deals with XFmode
755 quantities and GR registers early in the compiler. */
756 gcc_assert (!no_new_pseudos);
758 /* Struct to register can just use TImode instead. */
759 if ((GET_CODE (operands[1]) == SUBREG
760 && GET_MODE (SUBREG_REG (operands[1])) == TImode)
761 || (GET_CODE (operands[1]) == REG
762 && GR_REGNO_P (REGNO (operands[1]))))
764 rtx op1 = operands[1];
766 if (GET_CODE (op1) == SUBREG)
767 op1 = SUBREG_REG (op1);
769 op1 = gen_rtx_REG (TImode, REGNO (op1));
771 emit_move_insn (gen_rtx_REG (TImode, REGNO (op0)), op1);
775 if (GET_CODE (operands[1]) == CONST_DOUBLE)
777 emit_move_insn (gen_rtx_REG (DImode, REGNO (op0)),
778 operand_subword (operands[1], 0, 0, XFmode));
779 emit_move_insn (gen_rtx_REG (DImode, REGNO (op0) + 1),
780 operand_subword (operands[1], 1, 0, XFmode));
784 /* If the quantity is in a register not known to be GR, spill it. */
785 if (register_operand (operands[1], XFmode))
786 operands[1] = spill_xfmode_operand (operands[1], 1);
788 gcc_assert (GET_CODE (operands[1]) == MEM);
790 out[WORDS_BIG_ENDIAN] = gen_rtx_REG (DImode, REGNO (op0));
791 out[!WORDS_BIG_ENDIAN] = gen_rtx_REG (DImode, REGNO (op0) + 1);
793 emit_move_insn (out[0], adjust_address (operands[1], DImode, 0));
794 emit_move_insn (out[1], adjust_address (operands[1], DImode, 8));
798 if (GET_CODE (operands[1]) == REG && GR_REGNO_P (REGNO (operands[1])))
800 /* We're hoping to transform everything that deals with XFmode
801 quantities and GR registers early in the compiler. */
802 gcc_assert (!no_new_pseudos);
804 /* Op0 can't be a GR_REG here, as that case is handled above.
805 If op0 is a register, then we spill op1, so that we now have a
806 MEM operand. This requires creating an XFmode subreg of a TImode reg
807 to force the spill. */
808 if (register_operand (operands[0], XFmode))
810 rtx op1 = gen_rtx_REG (TImode, REGNO (operands[1]));
811 op1 = gen_rtx_SUBREG (XFmode, op1, 0);
812 operands[1] = spill_xfmode_operand (op1, 0);
819 gcc_assert (GET_CODE (operands[0]) == MEM);
820 in[WORDS_BIG_ENDIAN] = gen_rtx_REG (DImode, REGNO (operands[1]));
821 in[!WORDS_BIG_ENDIAN] = gen_rtx_REG (DImode, REGNO (operands[1]) + 1);
823 emit_move_insn (adjust_address (operands[0], DImode, 0), in[0]);
824 emit_move_insn (adjust_address (operands[0], DImode, 8), in[1]);
829 if (! reload_in_progress && ! reload_completed)
831 operands[1] = spill_xfmode_operand (operands[1], 0);
833 if (GET_MODE (op0) == TImode && GET_CODE (op0) == REG)
835 rtx memt, memx, in = operands[1];
837 in = validize_mem (force_const_mem (XFmode, in));
838 if (GET_CODE (in) == MEM)
839 memt = adjust_address (in, TImode, 0);
842 memt = assign_stack_temp (TImode, 16, 0);
843 memx = adjust_address (memt, XFmode, 0);
844 emit_move_insn (memx, in);
846 emit_move_insn (op0, memt);
850 if (! ia64_move_ok (operands[0], operands[1]))
851 operands[1] = force_reg (XFmode, operands[1]);
855 ;; ??? There's no easy way to mind volatile acquire/release semantics.
857 (define_insn "*movxf_internal"
858 [(set (match_operand:XF 0 "destination_operand" "=f,f, m")
859 (match_operand:XF 1 "general_operand" "fG,m,fG"))]
860 "ia64_move_ok (operands[0], operands[1])"
865 [(set_attr "itanium_class" "fmisc,fld,stf")])
867 ;; Better code generation via insns that deal with TFmode register pairs
868 ;; directly. Same concerns apply as for TImode.
869 (define_expand "movtf"
870 [(set (match_operand:TF 0 "general_operand" "")
871 (match_operand:TF 1 "general_operand" ""))]
874 rtx op1 = ia64_expand_move (operands[0], operands[1]);
880 (define_insn_and_split "*movtf_internal"
881 [(set (match_operand:TF 0 "destination_operand" "=r,r,m")
882 (match_operand:TF 1 "general_operand" "ri,m,r"))]
883 "ia64_move_ok (operands[0], operands[1])"
888 ia64_split_tmode_move (operands);
891 [(set_attr "itanium_class" "unknown")
892 (set_attr "predicable" "no")])
895 ;; ::::::::::::::::::::
899 ;; ::::::::::::::::::::
901 ;; Signed conversions from a smaller integer to a larger integer
903 (define_insn "extendqidi2"
904 [(set (match_operand:DI 0 "gr_register_operand" "=r")
905 (sign_extend:DI (match_operand:QI 1 "gr_register_operand" "r")))]
908 [(set_attr "itanium_class" "xtd")])
910 (define_insn "extendhidi2"
911 [(set (match_operand:DI 0 "gr_register_operand" "=r")
912 (sign_extend:DI (match_operand:HI 1 "gr_register_operand" "r")))]
915 [(set_attr "itanium_class" "xtd")])
917 (define_insn "extendsidi2"
918 [(set (match_operand:DI 0 "grfr_register_operand" "=r,?f")
919 (sign_extend:DI (match_operand:SI 1 "grfr_register_operand" "r,f")))]
924 [(set_attr "itanium_class" "xtd,fmisc")])
926 ;; Unsigned conversions from a smaller integer to a larger integer
928 (define_insn "zero_extendqidi2"
929 [(set (match_operand:DI 0 "gr_register_operand" "=r,r")
930 (zero_extend:DI (match_operand:QI 1 "gr_nonimmediate_operand" "r,m")))]
935 [(set_attr "itanium_class" "xtd,ld")])
937 (define_insn "zero_extendhidi2"
938 [(set (match_operand:DI 0 "gr_register_operand" "=r,r")
939 (zero_extend:DI (match_operand:HI 1 "gr_nonimmediate_operand" "r,m")))]
944 [(set_attr "itanium_class" "xtd,ld")])
946 (define_insn "zero_extendsidi2"
947 [(set (match_operand:DI 0 "grfr_register_operand" "=r,r,?f")
949 (match_operand:SI 1 "grfr_nonimmediate_operand" "r,m,f")))]
955 [(set_attr "itanium_class" "ialu,ld,fmisc")])
957 ;; Convert between floating point types of different sizes.
959 ;; At first glance, it would appear that emitting fnorm for an extending
960 ;; conversion is unnecessary. However, the stf and getf instructions work
961 ;; correctly only if the input is properly rounded for its type. In
962 ;; particular, we get the wrong result for getf.d/stfd if the input is a
963 ;; denorm single. Since we don't know what the next instruction will be, we
964 ;; have to emit an fnorm.
966 ;; ??? Optimization opportunity here. Get rid of the insn altogether
967 ;; when we can. Should probably use a scheme like has been proposed
968 ;; for ia32 in dealing with operands that match unary operators. This
969 ;; would let combine merge the thing into adjacent insns. See also how the
970 ;; mips port handles SIGN_EXTEND as operands to integer arithmetic insns via
971 ;; se_register_operand.
973 (define_insn "extendsfdf2"
974 [(set (match_operand:DF 0 "fr_register_operand" "=f")
975 (float_extend:DF (match_operand:SF 1 "fr_register_operand" "f")))]
978 [(set_attr "itanium_class" "fmac")])
980 (define_insn "extendsfxf2"
981 [(set (match_operand:XF 0 "fr_register_operand" "=f")
982 (float_extend:XF (match_operand:SF 1 "fr_register_operand" "f")))]
985 [(set_attr "itanium_class" "fmac")])
987 (define_insn "extenddfxf2"
988 [(set (match_operand:XF 0 "fr_register_operand" "=f")
989 (float_extend:XF (match_operand:DF 1 "fr_register_operand" "f")))]
992 [(set_attr "itanium_class" "fmac")])
994 (define_insn "truncdfsf2"
995 [(set (match_operand:SF 0 "fr_register_operand" "=f")
996 (float_truncate:SF (match_operand:DF 1 "fr_register_operand" "f")))]
999 [(set_attr "itanium_class" "fmac")])
1001 (define_insn "truncxfsf2"
1002 [(set (match_operand:SF 0 "fr_register_operand" "=f")
1003 (float_truncate:SF (match_operand:XF 1 "fr_register_operand" "f")))]
1006 [(set_attr "itanium_class" "fmac")])
1008 (define_insn "truncxfdf2"
1009 [(set (match_operand:DF 0 "fr_register_operand" "=f")
1010 (float_truncate:DF (match_operand:XF 1 "fr_register_operand" "f")))]
1013 [(set_attr "itanium_class" "fmac")])
1015 ;; Convert between signed integer types and floating point.
1017 (define_insn "floatdixf2"
1018 [(set (match_operand:XF 0 "fr_register_operand" "=f")
1019 (float:XF (match_operand:DI 1 "fr_register_operand" "f")))]
1022 [(set_attr "itanium_class" "fcvtfx")])
1024 (define_insn "fix_truncsfdi2"
1025 [(set (match_operand:DI 0 "fr_register_operand" "=f")
1026 (fix:DI (match_operand:SF 1 "fr_register_operand" "f")))]
1028 "fcvt.fx.trunc %0 = %1"
1029 [(set_attr "itanium_class" "fcvtfx")])
1031 (define_insn "fix_truncdfdi2"
1032 [(set (match_operand:DI 0 "fr_register_operand" "=f")
1033 (fix:DI (match_operand:DF 1 "fr_register_operand" "f")))]
1035 "fcvt.fx.trunc %0 = %1"
1036 [(set_attr "itanium_class" "fcvtfx")])
1038 (define_insn "fix_truncxfdi2"
1039 [(set (match_operand:DI 0 "fr_register_operand" "=f")
1040 (fix:DI (match_operand:XF 1 "fr_register_operand" "f")))]
1042 "fcvt.fx.trunc %0 = %1"
1043 [(set_attr "itanium_class" "fcvtfx")])
1045 (define_insn "fix_truncxfdi2_alts"
1046 [(set (match_operand:DI 0 "fr_register_operand" "=f")
1047 (fix:DI (match_operand:XF 1 "fr_register_operand" "f")))
1048 (use (match_operand:SI 2 "const_int_operand" ""))]
1050 "fcvt.fx.trunc.s%2 %0 = %1"
1051 [(set_attr "itanium_class" "fcvtfx")])
1053 ;; Convert between unsigned integer types and floating point.
1055 (define_insn "floatunsdisf2"
1056 [(set (match_operand:SF 0 "fr_register_operand" "=f")
1057 (unsigned_float:SF (match_operand:DI 1 "fr_register_operand" "f")))]
1059 "fcvt.xuf.s %0 = %1"
1060 [(set_attr "itanium_class" "fcvtfx")])
1062 (define_insn "floatunsdidf2"
1063 [(set (match_operand:DF 0 "fr_register_operand" "=f")
1064 (unsigned_float:DF (match_operand:DI 1 "fr_register_operand" "f")))]
1066 "fcvt.xuf.d %0 = %1"
1067 [(set_attr "itanium_class" "fcvtfx")])
1069 (define_insn "floatunsdixf2"
1070 [(set (match_operand:XF 0 "fr_register_operand" "=f")
1071 (unsigned_float:XF (match_operand:DI 1 "fr_register_operand" "f")))]
1074 [(set_attr "itanium_class" "fcvtfx")])
1076 (define_insn "fixuns_truncsfdi2"
1077 [(set (match_operand:DI 0 "fr_register_operand" "=f")
1078 (unsigned_fix:DI (match_operand:SF 1 "fr_register_operand" "f")))]
1080 "fcvt.fxu.trunc %0 = %1"
1081 [(set_attr "itanium_class" "fcvtfx")])
1083 (define_insn "fixuns_truncdfdi2"
1084 [(set (match_operand:DI 0 "fr_register_operand" "=f")
1085 (unsigned_fix:DI (match_operand:DF 1 "fr_register_operand" "f")))]
1087 "fcvt.fxu.trunc %0 = %1"
1088 [(set_attr "itanium_class" "fcvtfx")])
1090 (define_insn "fixuns_truncxfdi2"
1091 [(set (match_operand:DI 0 "fr_register_operand" "=f")
1092 (unsigned_fix:DI (match_operand:XF 1 "fr_register_operand" "f")))]
1094 "fcvt.fxu.trunc %0 = %1"
1095 [(set_attr "itanium_class" "fcvtfx")])
1097 (define_insn "fixuns_truncxfdi2_alts"
1098 [(set (match_operand:DI 0 "fr_register_operand" "=f")
1099 (unsigned_fix:DI (match_operand:XF 1 "fr_register_operand" "f")))
1100 (use (match_operand:SI 2 "const_int_operand" ""))]
1102 "fcvt.fxu.trunc.s%2 %0 = %1"
1103 [(set_attr "itanium_class" "fcvtfx")])
1105 ;; ::::::::::::::::::::
1107 ;; :: Bit field extraction
1109 ;; ::::::::::::::::::::
1112 [(set (match_operand:DI 0 "gr_register_operand" "=r")
1113 (sign_extract:DI (match_operand:DI 1 "gr_register_operand" "r")
1114 (match_operand:DI 2 "const_int_operand" "n")
1115 (match_operand:DI 3 "const_int_operand" "n")))]
1117 "extr %0 = %1, %3, %2"
1118 [(set_attr "itanium_class" "ishf")])
1120 (define_insn "extzv"
1121 [(set (match_operand:DI 0 "gr_register_operand" "=r")
1122 (zero_extract:DI (match_operand:DI 1 "gr_register_operand" "r")
1123 (match_operand:DI 2 "const_int_operand" "n")
1124 (match_operand:DI 3 "const_int_operand" "n")))]
1126 "extr.u %0 = %1, %3, %2"
1127 [(set_attr "itanium_class" "ishf")])
1129 ;; Insert a bit field.
1130 ;; Can have 3 operands, source1 (inserter), source2 (insertee), dest.
1131 ;; Source1 can be 0 or -1.
1132 ;; Source2 can be 0.
1134 ;; ??? Actual dep instruction is more powerful than what these insv
1135 ;; patterns support. Unfortunately, combine is unable to create patterns
1136 ;; where source2 != dest.
1138 (define_expand "insv"
1139 [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "")
1140 (match_operand:DI 1 "const_int_operand" "")
1141 (match_operand:DI 2 "const_int_operand" ""))
1142 (match_operand:DI 3 "nonmemory_operand" ""))]
1145 int width = INTVAL (operands[1]);
1146 int shift = INTVAL (operands[2]);
1148 /* If operand[3] is a constant, and isn't 0 or -1, then load it into a
1150 if (! register_operand (operands[3], DImode)
1151 && operands[3] != const0_rtx && operands[3] != constm1_rtx)
1152 operands[3] = force_reg (DImode, operands[3]);
1154 /* If this is a single dep instruction, we have nothing to do. */
1155 if (! ((register_operand (operands[3], DImode) && width <= 16)
1156 || operands[3] == const0_rtx || operands[3] == constm1_rtx))
1158 /* Check for cases that can be implemented with a mix instruction. */
1159 if (width == 32 && shift == 0)
1161 /* Directly generating the mix4left instruction confuses
1162 optimize_bit_field in function.c. Since this is performing
1163 a useful optimization, we defer generation of the complicated
1164 mix4left RTL to the first splitting phase. */
1165 rtx tmp = gen_reg_rtx (DImode);
1166 emit_insn (gen_shift_mix4left (operands[0], operands[3], tmp));
1169 else if (width == 32 && shift == 32)
1171 emit_insn (gen_mix4right (operands[0], operands[3]));
1175 /* We could handle remaining cases by emitting multiple dep
1178 If we need more than two dep instructions then we lose. A 6
1179 insn sequence mov mask1,mov mask2,shl;;and,and;;or is better than
1180 mov;;dep,shr;;dep,shr;;dep. The former can be executed in 3 cycles,
1181 the latter is 6 cycles on an Itanium (TM) processor, because there is
1182 only one function unit that can execute dep and shr immed.
1184 If we only need two dep instruction, then we still lose.
1185 mov;;dep,shr;;dep is still 4 cycles. Even if we optimize away
1186 the unnecessary mov, this is still undesirable because it will be
1187 hard to optimize, and it creates unnecessary pressure on the I0
1193 /* This code may be useful for other IA-64 processors, so we leave it in
1199 emit_insn (gen_insv (operands[0], GEN_INT (16), GEN_INT (shift),
1203 tmp = gen_reg_rtx (DImode);
1204 emit_insn (gen_lshrdi3 (tmp, operands[3], GEN_INT (16)));
1207 operands[1] = GEN_INT (width);
1208 operands[2] = GEN_INT (shift);
1213 (define_insn "*insv_internal"
1214 [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "+r")
1215 (match_operand:DI 1 "const_int_operand" "n")
1216 (match_operand:DI 2 "const_int_operand" "n"))
1217 (match_operand:DI 3 "nonmemory_operand" "rP"))]
1218 "(gr_register_operand (operands[3], DImode) && INTVAL (operands[1]) <= 16)
1219 || operands[3] == const0_rtx || operands[3] == constm1_rtx"
1220 "dep %0 = %3, %0, %2, %1"
1221 [(set_attr "itanium_class" "ishf")])
1223 ;; Combine doesn't like to create bit-field insertions into zero.
1224 (define_insn "*shladdp4_internal"
1225 [(set (match_operand:DI 0 "gr_register_operand" "=r")
1226 (and:DI (ashift:DI (match_operand:DI 1 "gr_register_operand" "r")
1227 (match_operand:DI 2 "shladd_log2_operand" "n"))
1228 (match_operand:DI 3 "const_int_operand" "n")))]
1229 "ia64_depz_field_mask (operands[3], operands[2]) + INTVAL (operands[2]) == 32"
1230 "shladdp4 %0 = %1, %2, r0"
1231 [(set_attr "itanium_class" "ialu")])
1233 (define_insn "*depz_internal"
1234 [(set (match_operand:DI 0 "gr_register_operand" "=r")
1235 (and:DI (ashift:DI (match_operand:DI 1 "gr_register_operand" "r")
1236 (match_operand:DI 2 "const_int_operand" "n"))
1237 (match_operand:DI 3 "const_int_operand" "n")))]
1238 "CONST_OK_FOR_M (INTVAL (operands[2]))
1239 && ia64_depz_field_mask (operands[3], operands[2]) > 0"
1241 operands[3] = GEN_INT (ia64_depz_field_mask (operands[3], operands[2]));
1242 return "%,dep.z %0 = %1, %2, %3";
1244 [(set_attr "itanium_class" "ishf")])
1246 (define_insn "shift_mix4left"
1247 [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "+r")
1248 (const_int 32) (const_int 0))
1249 (match_operand:DI 1 "gr_register_operand" "r"))
1250 (clobber (match_operand:DI 2 "gr_register_operand" "=r"))]
1253 [(set_attr "itanium_class" "unknown")])
1256 [(set (zero_extract:DI (match_operand:DI 0 "register_operand" "")
1257 (const_int 32) (const_int 0))
1258 (match_operand:DI 1 "register_operand" ""))
1259 (clobber (match_operand:DI 2 "register_operand" ""))]
1261 [(set (match_dup 3) (ashift:DI (match_dup 1) (const_int 32)))
1262 (set (zero_extract:DI (match_dup 0) (const_int 32) (const_int 0))
1263 (lshiftrt:DI (match_dup 3) (const_int 32)))]
1264 "operands[3] = operands[2];")
1266 (define_insn "*mix4left"
1267 [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "+r")
1268 (const_int 32) (const_int 0))
1269 (lshiftrt:DI (match_operand:DI 1 "gr_register_operand" "r")
1272 "mix4.l %0 = %0, %r1"
1273 [(set_attr "itanium_class" "mmshf")])
1275 (define_insn "mix4right"
1276 [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "+r")
1277 (const_int 32) (const_int 32))
1278 (match_operand:DI 1 "gr_reg_or_0_operand" "rO"))]
1280 "mix4.r %0 = %r1, %0"
1281 [(set_attr "itanium_class" "mmshf")])
1283 ;; This is used by the rotrsi3 pattern.
1285 (define_insn "*mix4right_3op"
1286 [(set (match_operand:DI 0 "gr_register_operand" "=r")
1287 (ior:DI (zero_extend:DI (match_operand:SI 1 "gr_register_operand" "r"))
1288 (ashift:DI (zero_extend:DI
1289 (match_operand:SI 2 "gr_register_operand" "r"))
1292 "mix4.r %0 = %2, %1"
1293 [(set_attr "itanium_class" "mmshf")])
1296 ;; ::::::::::::::::::::
1298 ;; :: 1 bit Integer arithmetic
1300 ;; ::::::::::::::::::::
1302 (define_insn_and_split "andbi3"
1303 [(set (match_operand:BI 0 "register_operand" "=c,c,r")
1304 (and:BI (match_operand:BI 1 "register_operand" "%0,0,r")
1305 (match_operand:BI 2 "register_operand" "c,r,r")))]
1309 tbit.nz.and.orcm %0, %I0 = %2, 0
1312 && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0]))
1313 && GET_CODE (operands[2]) == REG && PR_REGNO_P (REGNO (operands[2]))"
1314 [(cond_exec (eq (match_dup 2) (const_int 0))
1315 (set (match_dup 0) (and:BI (ne:BI (const_int 0) (const_int 0))
1318 [(set_attr "itanium_class" "unknown,tbit,ilog")])
1320 (define_insn_and_split "*andcmbi3"
1321 [(set (match_operand:BI 0 "register_operand" "=c,c,r")
1322 (and:BI (not:BI (match_operand:BI 1 "register_operand" "c,r,r"))
1323 (match_operand:BI 2 "register_operand" "0,0,r")))]
1327 tbit.z.and.orcm %0, %I0 = %1, 0
1330 && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0]))
1331 && GET_CODE (operands[1]) == REG && PR_REGNO_P (REGNO (operands[1]))"
1332 [(cond_exec (ne (match_dup 1) (const_int 0))
1333 (set (match_dup 0) (and:BI (ne:BI (const_int 0) (const_int 0))
1336 [(set_attr "itanium_class" "unknown,tbit,ilog")])
1338 (define_insn_and_split "iorbi3"
1339 [(set (match_operand:BI 0 "register_operand" "=c,c,r")
1340 (ior:BI (match_operand:BI 1 "register_operand" "%0,0,r")
1341 (match_operand:BI 2 "register_operand" "c,r,r")))]
1345 tbit.nz.or.andcm %0, %I0 = %2, 0
1348 && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0]))
1349 && GET_CODE (operands[2]) == REG && PR_REGNO_P (REGNO (operands[2]))"
1350 [(cond_exec (ne (match_dup 2) (const_int 0))
1351 (set (match_dup 0) (ior:BI (eq:BI (const_int 0) (const_int 0))
1354 [(set_attr "itanium_class" "unknown,tbit,ilog")])
1356 (define_insn_and_split "*iorcmbi3"
1357 [(set (match_operand:BI 0 "register_operand" "=c,c")
1358 (ior:BI (not:BI (match_operand:BI 1 "register_operand" "c,r"))
1359 (match_operand:BI 2 "register_operand" "0,0")))]
1363 tbit.z.or.andcm %0, %I0 = %1, 0"
1365 && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0]))
1366 && GET_CODE (operands[1]) == REG && PR_REGNO_P (REGNO (operands[1]))"
1367 [(cond_exec (eq (match_dup 1) (const_int 0))
1368 (set (match_dup 0) (ior:BI (eq:BI (const_int 0) (const_int 0))
1371 [(set_attr "itanium_class" "unknown,tbit")])
1373 (define_insn "one_cmplbi2"
1374 [(set (match_operand:BI 0 "register_operand" "=c,r,c,&c")
1375 (not:BI (match_operand:BI 1 "register_operand" "r,r,0,c")))
1376 (clobber (match_scratch:BI 2 "=X,X,c,X"))]
1379 tbit.z %0, %I0 = %1, 0
1383 [(set_attr "itanium_class" "tbit,ilog,unknown,unknown")])
1386 [(set (match_operand:BI 0 "register_operand" "")
1387 (not:BI (match_operand:BI 1 "register_operand" "")))
1388 (clobber (match_scratch:BI 2 ""))]
1390 && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0]))
1391 && rtx_equal_p (operands[0], operands[1])"
1392 [(set (match_dup 4) (match_dup 3))
1393 (set (match_dup 0) (const_int 1))
1394 (cond_exec (ne (match_dup 2) (const_int 0))
1395 (set (match_dup 0) (const_int 0)))
1396 (set (match_dup 0) (unspec:BI [(match_dup 0)] UNSPEC_PRED_REL_MUTEX))]
1397 "operands[3] = gen_rtx_REG (CCImode, REGNO (operands[1]));
1398 operands[4] = gen_rtx_REG (CCImode, REGNO (operands[2]));")
1401 [(set (match_operand:BI 0 "register_operand" "")
1402 (not:BI (match_operand:BI 1 "register_operand" "")))
1403 (clobber (match_scratch:BI 2 ""))]
1405 && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0]))
1406 && GET_CODE (operands[1]) == REG && PR_REGNO_P (REGNO (operands[1]))
1407 && ! rtx_equal_p (operands[0], operands[1])"
1408 [(cond_exec (ne (match_dup 1) (const_int 0))
1409 (set (match_dup 0) (const_int 0)))
1410 (cond_exec (eq (match_dup 1) (const_int 0))
1411 (set (match_dup 0) (const_int 1)))
1412 (set (match_dup 0) (unspec:BI [(match_dup 0)] UNSPEC_PRED_REL_MUTEX))]
1415 (define_insn "*cmpsi_and_0"
1416 [(set (match_operand:BI 0 "register_operand" "=c")
1417 (and:BI (match_operator:BI 4 "predicate_operator"
1418 [(match_operand:SI 2 "gr_reg_or_0_operand" "rO")
1419 (match_operand:SI 3 "gr_reg_or_8bit_operand" "rK")])
1420 (match_operand:BI 1 "register_operand" "0")))]
1422 "cmp4.%C4.and.orcm %0, %I0 = %3, %r2"
1423 [(set_attr "itanium_class" "icmp")])
1425 (define_insn "*cmpsi_and_1"
1426 [(set (match_operand:BI 0 "register_operand" "=c")
1427 (and:BI (match_operator:BI 3 "signed_inequality_operator"
1428 [(match_operand:SI 2 "gr_register_operand" "r")
1430 (match_operand:BI 1 "register_operand" "0")))]
1432 "cmp4.%C3.and.orcm %0, %I0 = r0, %2"
1433 [(set_attr "itanium_class" "icmp")])
1435 (define_insn "*cmpsi_andnot_0"
1436 [(set (match_operand:BI 0 "register_operand" "=c")
1437 (and:BI (not:BI (match_operator:BI 4 "predicate_operator"
1438 [(match_operand:SI 2 "gr_reg_or_0_operand" "rO")
1439 (match_operand:SI 3 "gr_reg_or_8bit_operand" "rK")]))
1440 (match_operand:BI 1 "register_operand" "0")))]
1442 "cmp4.%C4.or.andcm %I0, %0 = %3, %r2"
1443 [(set_attr "itanium_class" "icmp")])
1445 (define_insn "*cmpsi_andnot_1"
1446 [(set (match_operand:BI 0 "register_operand" "=c")
1447 (and:BI (not:BI (match_operator:BI 3 "signed_inequality_operator"
1448 [(match_operand:SI 2 "gr_register_operand" "r")
1450 (match_operand:BI 1 "register_operand" "0")))]
1452 "cmp4.%C3.or.andcm %I0, %0 = r0, %2"
1453 [(set_attr "itanium_class" "icmp")])
1455 (define_insn "*cmpdi_and_0"
1456 [(set (match_operand:BI 0 "register_operand" "=c")
1457 (and:BI (match_operator:BI 4 "predicate_operator"
1458 [(match_operand:DI 2 "gr_register_operand" "r")
1459 (match_operand:DI 3 "gr_reg_or_8bit_operand" "rK")])
1460 (match_operand:BI 1 "register_operand" "0")))]
1462 "cmp.%C4.and.orcm %0, %I0 = %3, %2"
1463 [(set_attr "itanium_class" "icmp")])
1465 (define_insn "*cmpdi_and_1"
1466 [(set (match_operand:BI 0 "register_operand" "=c")
1467 (and:BI (match_operator:BI 3 "signed_inequality_operator"
1468 [(match_operand:DI 2 "gr_register_operand" "r")
1470 (match_operand:BI 1 "register_operand" "0")))]
1472 "cmp.%C3.and.orcm %0, %I0 = r0, %2"
1473 [(set_attr "itanium_class" "icmp")])
1475 (define_insn "*cmpdi_andnot_0"
1476 [(set (match_operand:BI 0 "register_operand" "=c")
1477 (and:BI (not:BI (match_operator:BI 4 "predicate_operator"
1478 [(match_operand:DI 2 "gr_register_operand" "r")
1479 (match_operand:DI 3 "gr_reg_or_8bit_operand" "rK")]))
1480 (match_operand:BI 1 "register_operand" "0")))]
1482 "cmp.%C4.or.andcm %I0, %0 = %3, %2"
1483 [(set_attr "itanium_class" "icmp")])
1485 (define_insn "*cmpdi_andnot_1"
1486 [(set (match_operand:BI 0 "register_operand" "=c")
1487 (and:BI (not:BI (match_operator:BI 3 "signed_inequality_operator"
1488 [(match_operand:DI 2 "gr_register_operand" "r")
1490 (match_operand:BI 1 "register_operand" "0")))]
1492 "cmp.%C3.or.andcm %I0, %0 = r0, %2"
1493 [(set_attr "itanium_class" "icmp")])
1495 (define_insn "*tbit_and_0"
1496 [(set (match_operand:BI 0 "register_operand" "=c")
1497 (and:BI (ne:BI (and:DI (match_operand:DI 1 "gr_register_operand" "r")
1500 (match_operand:BI 2 "register_operand" "0")))]
1502 "tbit.nz.and.orcm %0, %I0 = %1, 0"
1503 [(set_attr "itanium_class" "tbit")])
1505 (define_insn "*tbit_and_1"
1506 [(set (match_operand:BI 0 "register_operand" "=c")
1507 (and:BI (eq:BI (and:DI (match_operand:DI 1 "gr_register_operand" "r")
1510 (match_operand:BI 2 "register_operand" "0")))]
1512 "tbit.z.and.orcm %0, %I0 = %1, 0"
1513 [(set_attr "itanium_class" "tbit")])
1515 (define_insn "*tbit_and_2"
1516 [(set (match_operand:BI 0 "register_operand" "=c")
1517 (and:BI (ne:BI (zero_extract:DI
1518 (match_operand:DI 1 "gr_register_operand" "r")
1520 (match_operand:DI 2 "const_int_operand" "n"))
1522 (match_operand:BI 3 "register_operand" "0")))]
1524 "tbit.nz.and.orcm %0, %I0 = %1, %2"
1525 [(set_attr "itanium_class" "tbit")])
1527 (define_insn "*tbit_and_3"
1528 [(set (match_operand:BI 0 "register_operand" "=c")
1529 (and:BI (eq:BI (zero_extract:DI
1530 (match_operand:DI 1 "gr_register_operand" "r")
1532 (match_operand:DI 2 "const_int_operand" "n"))
1534 (match_operand:BI 3 "register_operand" "0")))]
1536 "tbit.z.and.orcm %0, %I0 = %1, %2"
1537 [(set_attr "itanium_class" "tbit")])
1539 (define_insn "*cmpsi_or_0"
1540 [(set (match_operand:BI 0 "register_operand" "=c")
1541 (ior:BI (match_operator:BI 4 "predicate_operator"
1542 [(match_operand:SI 2 "gr_reg_or_0_operand" "rO")
1543 (match_operand:SI 3 "gr_reg_or_8bit_operand" "rK")])
1544 (match_operand:BI 1 "register_operand" "0")))]
1546 "cmp4.%C4.or.andcm %0, %I0 = %3, %r2"
1547 [(set_attr "itanium_class" "icmp")])
1549 (define_insn "*cmpsi_or_1"
1550 [(set (match_operand:BI 0 "register_operand" "=c")
1551 (ior:BI (match_operator:BI 3 "signed_inequality_operator"
1552 [(match_operand:SI 2 "gr_register_operand" "r")
1554 (match_operand:BI 1 "register_operand" "0")))]
1556 "cmp4.%C3.or.andcm %0, %I0 = r0, %2"
1557 [(set_attr "itanium_class" "icmp")])
1559 (define_insn "*cmpsi_orcm_0"
1560 [(set (match_operand:BI 0 "register_operand" "=c")
1561 (ior:BI (not:BI (match_operator:BI 4 "predicate_operator"
1562 [(match_operand:SI 2 "gr_reg_or_0_operand" "rO")
1563 (match_operand:SI 3 "gr_reg_or_8bit_operand" "rK")]))
1564 (match_operand:BI 1 "register_operand" "0")))]
1566 "cmp4.%C4.and.orcm %I0, %0 = %3, %r2"
1567 [(set_attr "itanium_class" "icmp")])
1569 (define_insn "*cmpsi_orcm_1"
1570 [(set (match_operand:BI 0 "register_operand" "=c")
1571 (ior:BI (not:BI (match_operator:BI 3 "signed_inequality_operator"
1572 [(match_operand:SI 2 "gr_register_operand" "r")
1574 (match_operand:BI 1 "register_operand" "0")))]
1576 "cmp4.%C3.and.orcm %I0, %0 = r0, %2"
1577 [(set_attr "itanium_class" "icmp")])
1579 (define_insn "*cmpdi_or_0"
1580 [(set (match_operand:BI 0 "register_operand" "=c")
1581 (ior:BI (match_operator:BI 4 "predicate_operator"
1582 [(match_operand:DI 2 "gr_register_operand" "r")
1583 (match_operand:DI 3 "gr_reg_or_8bit_operand" "rK")])
1584 (match_operand:BI 1 "register_operand" "0")))]
1586 "cmp.%C4.or.andcm %0, %I0 = %3, %2"
1587 [(set_attr "itanium_class" "icmp")])
1589 (define_insn "*cmpdi_or_1"
1590 [(set (match_operand:BI 0 "register_operand" "=c")
1591 (ior:BI (match_operator:BI 3 "signed_inequality_operator"
1592 [(match_operand:DI 2 "gr_register_operand" "r")
1594 (match_operand:BI 1 "register_operand" "0")))]
1596 "cmp.%C3.or.andcm %0, %I0 = r0, %2"
1597 [(set_attr "itanium_class" "icmp")])
1599 (define_insn "*cmpdi_orcm_0"
1600 [(set (match_operand:BI 0 "register_operand" "=c")
1601 (ior:BI (not:BI (match_operator:BI 4 "predicate_operator"
1602 [(match_operand:DI 2 "gr_register_operand" "r")
1603 (match_operand:DI 3 "gr_reg_or_8bit_operand" "rK")]))
1604 (match_operand:BI 1 "register_operand" "0")))]
1606 "cmp.%C4.and.orcm %I0, %0 = %3, %2"
1607 [(set_attr "itanium_class" "icmp")])
1609 (define_insn "*cmpdi_orcm_1"
1610 [(set (match_operand:BI 0 "register_operand" "=c")
1611 (ior:BI (not:BI (match_operator:BI 3 "signed_inequality_operator"
1612 [(match_operand:DI 2 "gr_register_operand" "r")
1614 (match_operand:BI 1 "register_operand" "0")))]
1616 "cmp.%C3.and.orcm %I0, %0 = r0, %2"
1617 [(set_attr "itanium_class" "icmp")])
1619 (define_insn "*tbit_or_0"
1620 [(set (match_operand:BI 0 "register_operand" "=c")
1621 (ior:BI (ne:BI (and:DI (match_operand:DI 1 "gr_register_operand" "r")
1624 (match_operand:BI 2 "register_operand" "0")))]
1626 "tbit.nz.or.andcm %0, %I0 = %1, 0"
1627 [(set_attr "itanium_class" "tbit")])
1629 (define_insn "*tbit_or_1"
1630 [(set (match_operand:BI 0 "register_operand" "=c")
1631 (ior:BI (eq:BI (and:DI (match_operand:DI 1 "gr_register_operand" "r")
1634 (match_operand:BI 2 "register_operand" "0")))]
1636 "tbit.z.or.andcm %0, %I0 = %1, 0"
1637 [(set_attr "itanium_class" "tbit")])
1639 (define_insn "*tbit_or_2"
1640 [(set (match_operand:BI 0 "register_operand" "=c")
1641 (ior:BI (ne:BI (zero_extract:DI
1642 (match_operand:DI 1 "gr_register_operand" "r")
1644 (match_operand:DI 2 "const_int_operand" "n"))
1646 (match_operand:BI 3 "register_operand" "0")))]
1648 "tbit.nz.or.andcm %0, %I0 = %1, %2"
1649 [(set_attr "itanium_class" "tbit")])
1651 (define_insn "*tbit_or_3"
1652 [(set (match_operand:BI 0 "register_operand" "=c")
1653 (ior:BI (eq:BI (zero_extract:DI
1654 (match_operand:DI 1 "gr_register_operand" "r")
1656 (match_operand:DI 2 "const_int_operand" "n"))
1658 (match_operand:BI 3 "register_operand" "0")))]
1660 "tbit.z.or.andcm %0, %I0 = %1, %2"
1661 [(set_attr "itanium_class" "tbit")])
1663 ;; Transform test of and/or of setcc into parallel comparisons.
1666 [(set (match_operand:BI 0 "register_operand" "")
1667 (ne:BI (and:DI (ne:DI (match_operand:BI 2 "register_operand" "")
1669 (match_operand:DI 3 "register_operand" ""))
1673 (and:BI (ne:BI (and:DI (match_dup 3) (const_int 1)) (const_int 0))
1678 [(set (match_operand:BI 0 "register_operand" "")
1679 (eq:BI (and:DI (ne:DI (match_operand:BI 2 "register_operand" "")
1681 (match_operand:DI 3 "register_operand" ""))
1685 (and:BI (ne:BI (and:DI (match_dup 3) (const_int 1)) (const_int 0))
1687 (parallel [(set (match_dup 0) (not:BI (match_dup 0)))
1688 (clobber (scratch))])]
1692 [(set (match_operand:BI 0 "register_operand" "")
1693 (ne:BI (ior:DI (ne:DI (match_operand:BI 2 "register_operand" "")
1695 (match_operand:DI 3 "register_operand" ""))
1699 (ior:BI (ne:BI (match_dup 3) (const_int 0))
1704 [(set (match_operand:BI 0 "register_operand" "")
1705 (eq:BI (ior:DI (ne:DI (match_operand:BI 2 "register_operand" "")
1707 (match_operand:DI 3 "register_operand" ""))
1711 (ior:BI (ne:BI (match_dup 3) (const_int 0))
1713 (parallel [(set (match_dup 0) (not:BI (match_dup 0)))
1714 (clobber (scratch))])]
1717 ;; ??? Incredibly hackish. Either need four proper patterns with all
1718 ;; the alternatives, or rely on sched1 to split the insn and hope that
1719 ;; nothing bad happens to the comparisons in the meantime.
1721 ;; Alternately, adjust combine to allow 2->2 and 3->3 splits, assuming
1722 ;; that we're doing height reduction.
1724 ;(define_insn_and_split ""
1725 ; [(set (match_operand:BI 0 "register_operand" "=c")
1726 ; (and:BI (and:BI (match_operator:BI 1 "comparison_operator"
1727 ; [(match_operand 2 "" "")
1728 ; (match_operand 3 "" "")])
1729 ; (match_operator:BI 4 "comparison_operator"
1730 ; [(match_operand 5 "" "")
1731 ; (match_operand 6 "" "")]))
1733 ; "flag_schedule_insns"
1736 ; [(set (match_dup 0) (and:BI (match_dup 1) (match_dup 0)))
1737 ; (set (match_dup 0) (and:BI (match_dup 4) (match_dup 0)))]
1740 ;(define_insn_and_split ""
1741 ; [(set (match_operand:BI 0 "register_operand" "=c")
1742 ; (ior:BI (ior:BI (match_operator:BI 1 "comparison_operator"
1743 ; [(match_operand 2 "" "")
1744 ; (match_operand 3 "" "")])
1745 ; (match_operator:BI 4 "comparison_operator"
1746 ; [(match_operand 5 "" "")
1747 ; (match_operand 6 "" "")]))
1749 ; "flag_schedule_insns"
1752 ; [(set (match_dup 0) (ior:BI (match_dup 1) (match_dup 0)))
1753 ; (set (match_dup 0) (ior:BI (match_dup 4) (match_dup 0)))]
1757 ; [(set (match_operand:BI 0 "register_operand" "")
1758 ; (and:BI (and:BI (match_operator:BI 1 "comparison_operator"
1759 ; [(match_operand 2 "" "")
1760 ; (match_operand 3 "" "")])
1761 ; (match_operand:BI 7 "register_operand" ""))
1762 ; (and:BI (match_operator:BI 4 "comparison_operator"
1763 ; [(match_operand 5 "" "")
1764 ; (match_operand 6 "" "")])
1765 ; (match_operand:BI 8 "register_operand" ""))))]
1767 ; [(set (match_dup 0) (and:BI (match_dup 7) (match_dup 8)))
1768 ; (set (match_dup 0) (and:BI (and:BI (match_dup 1) (match_dup 4))
1773 ; [(set (match_operand:BI 0 "register_operand" "")
1774 ; (ior:BI (ior:BI (match_operator:BI 1 "comparison_operator"
1775 ; [(match_operand 2 "" "")
1776 ; (match_operand 3 "" "")])
1777 ; (match_operand:BI 7 "register_operand" ""))
1778 ; (ior:BI (match_operator:BI 4 "comparison_operator"
1779 ; [(match_operand 5 "" "")
1780 ; (match_operand 6 "" "")])
1781 ; (match_operand:BI 8 "register_operand" ""))))]
1783 ; [(set (match_dup 0) (ior:BI (match_dup 7) (match_dup 8)))
1784 ; (set (match_dup 0) (ior:BI (ior:BI (match_dup 1) (match_dup 4))
1788 ;; Try harder to avoid predicate copies by duplicating compares.
1789 ;; Note that we'll have already split the predicate copy, which
1790 ;; is kind of a pain, but oh well.
1793 [(set (match_operand:BI 0 "register_operand" "")
1794 (match_operand:BI 1 "comparison_operator" ""))
1795 (set (match_operand:CCI 2 "register_operand" "")
1796 (match_operand:CCI 3 "register_operand" ""))
1797 (set (match_operand:CCI 4 "register_operand" "")
1798 (match_operand:CCI 5 "register_operand" ""))
1799 (set (match_operand:BI 6 "register_operand" "")
1800 (unspec:BI [(match_dup 6)] UNSPEC_PRED_REL_MUTEX))]
1801 "REGNO (operands[3]) == REGNO (operands[0])
1802 && REGNO (operands[4]) == REGNO (operands[0]) + 1
1803 && REGNO (operands[4]) == REGNO (operands[2]) + 1
1804 && REGNO (operands[6]) == REGNO (operands[2])"
1805 [(set (match_dup 0) (match_dup 1))
1806 (set (match_dup 6) (match_dup 7))]
1807 "operands[7] = copy_rtx (operands[1]);")
1809 ;; ::::::::::::::::::::
1811 ;; :: 16 bit Integer arithmetic
1813 ;; ::::::::::::::::::::
1815 (define_insn "mulhi3"
1816 [(set (match_operand:HI 0 "gr_register_operand" "=r")
1817 (mult:HI (match_operand:HI 1 "gr_register_operand" "r")
1818 (match_operand:HI 2 "gr_register_operand" "r")))]
1820 "pmpy2.r %0 = %1, %2"
1821 [(set_attr "itanium_class" "mmmul")])
1824 ;; ::::::::::::::::::::
1826 ;; :: 32 bit Integer arithmetic
1828 ;; ::::::::::::::::::::
1830 (define_insn "addsi3"
1831 [(set (match_operand:SI 0 "gr_register_operand" "=r,r,r")
1832 (plus:SI (match_operand:SI 1 "gr_register_operand" "%r,r,a")
1833 (match_operand:SI 2 "gr_reg_or_22bit_operand" "r,I,J")))]
1839 [(set_attr "itanium_class" "ialu")])
1841 (define_insn "*addsi3_plus1"
1842 [(set (match_operand:SI 0 "gr_register_operand" "=r")
1843 (plus:SI (plus:SI (match_operand:SI 1 "gr_register_operand" "r")
1844 (match_operand:SI 2 "gr_register_operand" "r"))
1847 "add %0 = %1, %2, 1"
1848 [(set_attr "itanium_class" "ialu")])
1850 (define_insn "*addsi3_plus1_alt"
1851 [(set (match_operand:SI 0 "gr_register_operand" "=r")
1852 (plus:SI (mult:SI (match_operand:SI 1 "gr_register_operand" "r")
1856 "add %0 = %1, %1, 1"
1857 [(set_attr "itanium_class" "ialu")])
1859 (define_insn "*addsi3_shladd"
1860 [(set (match_operand:SI 0 "gr_register_operand" "=r")
1861 (plus:SI (mult:SI (match_operand:SI 1 "gr_register_operand" "r")
1862 (match_operand:SI 2 "shladd_operand" "n"))
1863 (match_operand:SI 3 "gr_register_operand" "r")))]
1865 "shladd %0 = %1, %S2, %3"
1866 [(set_attr "itanium_class" "ialu")])
1868 (define_insn "subsi3"
1869 [(set (match_operand:SI 0 "gr_register_operand" "=r")
1870 (minus:SI (match_operand:SI 1 "gr_reg_or_8bit_operand" "rK")
1871 (match_operand:SI 2 "gr_register_operand" "r")))]
1874 [(set_attr "itanium_class" "ialu")])
1876 (define_insn "*subsi3_minus1"
1877 [(set (match_operand:SI 0 "gr_register_operand" "=r")
1878 (plus:SI (not:SI (match_operand:SI 1 "gr_register_operand" "r"))
1879 (match_operand:SI 2 "gr_register_operand" "r")))]
1881 "sub %0 = %2, %1, 1"
1882 [(set_attr "itanium_class" "ialu")])
1884 ;; ??? Could add maddsi3 patterns patterned after the madddi3 patterns.
1886 (define_insn "mulsi3"
1887 [(set (match_operand:SI 0 "fr_register_operand" "=f")
1888 (mult:SI (match_operand:SI 1 "grfr_register_operand" "f")
1889 (match_operand:SI 2 "grfr_register_operand" "f")))]
1891 "xmpy.l %0 = %1, %2"
1892 [(set_attr "itanium_class" "xmpy")])
1894 (define_insn "maddsi4"
1895 [(set (match_operand:SI 0 "fr_register_operand" "=f")
1896 (plus:SI (mult:SI (match_operand:SI 1 "grfr_register_operand" "f")
1897 (match_operand:SI 2 "grfr_register_operand" "f"))
1898 (match_operand:SI 3 "grfr_register_operand" "f")))]
1900 "xma.l %0 = %1, %2, %3"
1901 [(set_attr "itanium_class" "xmpy")])
1903 (define_insn "negsi2"
1904 [(set (match_operand:SI 0 "gr_register_operand" "=r")
1905 (neg:SI (match_operand:SI 1 "gr_register_operand" "r")))]
1908 [(set_attr "itanium_class" "ialu")])
1910 (define_expand "abssi2"
1912 (ge:BI (match_operand:SI 1 "gr_register_operand" "") (const_int 0)))
1913 (set (match_operand:SI 0 "gr_register_operand" "")
1914 (if_then_else:SI (eq (match_dup 2) (const_int 0))
1915 (neg:SI (match_dup 1))
1918 { operands[2] = gen_reg_rtx (BImode); })
1920 (define_expand "sminsi3"
1922 (ge:BI (match_operand:SI 1 "gr_register_operand" "")
1923 (match_operand:SI 2 "gr_register_operand" "")))
1924 (set (match_operand:SI 0 "gr_register_operand" "")
1925 (if_then_else:SI (ne (match_dup 3) (const_int 0))
1926 (match_dup 2) (match_dup 1)))]
1928 { operands[3] = gen_reg_rtx (BImode); })
1930 (define_expand "smaxsi3"
1932 (ge:BI (match_operand:SI 1 "gr_register_operand" "")
1933 (match_operand:SI 2 "gr_register_operand" "")))
1934 (set (match_operand:SI 0 "gr_register_operand" "")
1935 (if_then_else:SI (ne (match_dup 3) (const_int 0))
1936 (match_dup 1) (match_dup 2)))]
1938 { operands[3] = gen_reg_rtx (BImode); })
1940 (define_expand "uminsi3"
1942 (geu:BI (match_operand:SI 1 "gr_register_operand" "")
1943 (match_operand:SI 2 "gr_register_operand" "")))
1944 (set (match_operand:SI 0 "gr_register_operand" "")
1945 (if_then_else:SI (ne (match_dup 3) (const_int 0))
1946 (match_dup 2) (match_dup 1)))]
1948 { operands[3] = gen_reg_rtx (BImode); })
1950 (define_expand "umaxsi3"
1952 (geu:BI (match_operand:SI 1 "gr_register_operand" "")
1953 (match_operand:SI 2 "gr_register_operand" "")))
1954 (set (match_operand:SI 0 "gr_register_operand" "")
1955 (if_then_else:SI (ne (match_dup 3) (const_int 0))
1956 (match_dup 1) (match_dup 2)))]
1958 { operands[3] = gen_reg_rtx (BImode); })
1960 (define_expand "divsi3"
1961 [(set (match_operand:SI 0 "register_operand" "")
1962 (div:SI (match_operand:SI 1 "general_operand" "")
1963 (match_operand:SI 2 "general_operand" "")))]
1964 "TARGET_INLINE_INT_DIV"
1966 rtx op1_xf, op2_xf, op0_xf, op0_di, twon34, twon34_exp;
1968 op0_xf = gen_reg_rtx (XFmode);
1969 op0_di = gen_reg_rtx (DImode);
1971 if (CONSTANT_P (operands[1]))
1972 operands[1] = force_reg (SImode, operands[1]);
1973 op1_xf = gen_reg_rtx (XFmode);
1974 expand_float (op1_xf, operands[1], 0);
1976 if (CONSTANT_P (operands[2]))
1977 operands[2] = force_reg (SImode, operands[2]);
1978 op2_xf = gen_reg_rtx (XFmode);
1979 expand_float (op2_xf, operands[2], 0);
1982 twon34_exp = gen_reg_rtx (DImode);
1983 emit_move_insn (twon34_exp, GEN_INT (65501));
1984 twon34 = gen_reg_rtx (XFmode);
1985 emit_insn (gen_setf_exp_xf (twon34, twon34_exp));
1987 emit_insn (gen_divsi3_internal (op0_xf, op1_xf, op2_xf, twon34));
1989 emit_insn (gen_fix_truncxfdi2_alts (op0_di, op0_xf, const1_rtx));
1990 emit_move_insn (operands[0], gen_lowpart (SImode, op0_di));
1994 (define_expand "modsi3"
1995 [(set (match_operand:SI 0 "register_operand" "")
1996 (mod:SI (match_operand:SI 1 "general_operand" "")
1997 (match_operand:SI 2 "general_operand" "")))]
1998 "TARGET_INLINE_INT_DIV"
2000 rtx op2_neg, op1_di, div;
2002 div = gen_reg_rtx (SImode);
2003 emit_insn (gen_divsi3 (div, operands[1], operands[2]));
2005 op2_neg = expand_unop (SImode, neg_optab, operands[2], NULL_RTX, 0);
2007 /* This is a trick to get us to reuse the value that we're sure to
2008 have already copied to the FP regs. */
2009 op1_di = gen_reg_rtx (DImode);
2010 convert_move (op1_di, operands[1], 0);
2012 emit_insn (gen_maddsi4 (operands[0], div, op2_neg,
2013 gen_lowpart (SImode, op1_di)));
2017 (define_expand "udivsi3"
2018 [(set (match_operand:SI 0 "register_operand" "")
2019 (udiv:SI (match_operand:SI 1 "general_operand" "")
2020 (match_operand:SI 2 "general_operand" "")))]
2021 "TARGET_INLINE_INT_DIV"
2023 rtx op1_xf, op2_xf, op0_xf, op0_di, twon34, twon34_exp;
2025 op0_xf = gen_reg_rtx (XFmode);
2026 op0_di = gen_reg_rtx (DImode);
2028 if (CONSTANT_P (operands[1]))
2029 operands[1] = force_reg (SImode, operands[1]);
2030 op1_xf = gen_reg_rtx (XFmode);
2031 expand_float (op1_xf, operands[1], 1);
2033 if (CONSTANT_P (operands[2]))
2034 operands[2] = force_reg (SImode, operands[2]);
2035 op2_xf = gen_reg_rtx (XFmode);
2036 expand_float (op2_xf, operands[2], 1);
2039 twon34_exp = gen_reg_rtx (DImode);
2040 emit_move_insn (twon34_exp, GEN_INT (65501));
2041 twon34 = gen_reg_rtx (XFmode);
2042 emit_insn (gen_setf_exp_xf (twon34, twon34_exp));
2044 emit_insn (gen_divsi3_internal (op0_xf, op1_xf, op2_xf, twon34));
2046 emit_insn (gen_fixuns_truncxfdi2_alts (op0_di, op0_xf, const1_rtx));
2047 emit_move_insn (operands[0], gen_lowpart (SImode, op0_di));
2051 (define_expand "umodsi3"
2052 [(set (match_operand:SI 0 "register_operand" "")
2053 (umod:SI (match_operand:SI 1 "general_operand" "")
2054 (match_operand:SI 2 "general_operand" "")))]
2055 "TARGET_INLINE_INT_DIV"
2057 rtx op2_neg, op1_di, div;
2059 div = gen_reg_rtx (SImode);
2060 emit_insn (gen_udivsi3 (div, operands[1], operands[2]));
2062 op2_neg = expand_unop (SImode, neg_optab, operands[2], NULL_RTX, 0);
2064 /* This is a trick to get us to reuse the value that we're sure to
2065 have already copied to the FP regs. */
2066 op1_di = gen_reg_rtx (DImode);
2067 convert_move (op1_di, operands[1], 1);
2069 emit_insn (gen_maddsi4 (operands[0], div, op2_neg,
2070 gen_lowpart (SImode, op1_di)));
2074 (define_insn_and_split "divsi3_internal"
2075 [(set (match_operand:XF 0 "fr_register_operand" "=&f")
2076 (float:XF (div:SI (match_operand:XF 1 "fr_register_operand" "f")
2077 (match_operand:XF 2 "fr_register_operand" "f"))))
2078 (clobber (match_scratch:XF 4 "=&f"))
2079 (clobber (match_scratch:XF 5 "=&f"))
2080 (clobber (match_scratch:BI 6 "=c"))
2081 (use (match_operand:XF 3 "fr_register_operand" "f"))]
2082 "TARGET_INLINE_INT_DIV"
2084 "&& reload_completed"
2085 [(parallel [(set (match_dup 0) (div:XF (const_int 1) (match_dup 2)))
2086 (set (match_dup 6) (unspec:BI [(match_dup 1) (match_dup 2)]
2087 UNSPEC_FR_RECIP_APPROX))
2088 (use (const_int 1))])
2089 (cond_exec (ne (match_dup 6) (const_int 0))
2090 (parallel [(set (match_dup 4) (mult:XF (match_dup 1) (match_dup 0)))
2091 (use (const_int 1))]))
2092 (cond_exec (ne (match_dup 6) (const_int 0))
2093 (parallel [(set (match_dup 5)
2094 (minus:XF (match_dup 7)
2095 (mult:XF (match_dup 2) (match_dup 0))))
2096 (use (const_int 1))]))
2097 (cond_exec (ne (match_dup 6) (const_int 0))
2098 (parallel [(set (match_dup 4)
2099 (plus:XF (mult:XF (match_dup 5) (match_dup 4))
2101 (use (const_int 1))]))
2102 (cond_exec (ne (match_dup 6) (const_int 0))
2103 (parallel [(set (match_dup 5)
2104 (plus:XF (mult:XF (match_dup 5) (match_dup 5))
2106 (use (const_int 1))]))
2107 (cond_exec (ne (match_dup 6) (const_int 0))
2108 (parallel [(set (match_dup 0)
2109 (plus:XF (mult:XF (match_dup 5) (match_dup 4))
2111 (use (const_int 1))]))
2113 "operands[7] = CONST1_RTX (XFmode);"
2114 [(set_attr "predicable" "no")])
2116 ;; ::::::::::::::::::::
2118 ;; :: 64 bit Integer arithmetic
2120 ;; ::::::::::::::::::::
2122 (define_insn "adddi3"
2123 [(set (match_operand:DI 0 "gr_register_operand" "=r,r,r")
2124 (plus:DI (match_operand:DI 1 "gr_register_operand" "%r,r,a")
2125 (match_operand:DI 2 "gr_reg_or_22bit_operand" "r,I,J")))]
2131 [(set_attr "itanium_class" "ialu")])
2133 (define_insn "*adddi3_plus1"
2134 [(set (match_operand:DI 0 "gr_register_operand" "=r")
2135 (plus:DI (plus:DI (match_operand:DI 1 "gr_register_operand" "r")
2136 (match_operand:DI 2 "gr_register_operand" "r"))
2139 "add %0 = %1, %2, 1"
2140 [(set_attr "itanium_class" "ialu")])
2142 ;; This has some of the same problems as shladd. We let the shladd
2143 ;; eliminator hack handle it, which results in the 1 being forced into
2144 ;; a register, but not more ugliness here.
2145 (define_insn "*adddi3_plus1_alt"
2146 [(set (match_operand:DI 0 "gr_register_operand" "=r")
2147 (plus:DI (mult:DI (match_operand:DI 1 "gr_register_operand" "r")
2151 "add %0 = %1, %1, 1"
2152 [(set_attr "itanium_class" "ialu")])
2154 (define_insn "subdi3"
2155 [(set (match_operand:DI 0 "gr_register_operand" "=r")
2156 (minus:DI (match_operand:DI 1 "gr_reg_or_8bit_operand" "rK")
2157 (match_operand:DI 2 "gr_register_operand" "r")))]
2160 [(set_attr "itanium_class" "ialu")])
2162 (define_insn "*subdi3_minus1"
2163 [(set (match_operand:DI 0 "gr_register_operand" "=r")
2164 (plus:DI (not:DI (match_operand:DI 1 "gr_register_operand" "r"))
2165 (match_operand:DI 2 "gr_register_operand" "r")))]
2167 "sub %0 = %2, %1, 1"
2168 [(set_attr "itanium_class" "ialu")])
2170 ;; ??? Use grfr instead of fr because of virtual register elimination
2171 ;; and silly test cases multiplying by the frame pointer.
2172 (define_insn "muldi3"
2173 [(set (match_operand:DI 0 "fr_register_operand" "=f")
2174 (mult:DI (match_operand:DI 1 "grfr_register_operand" "f")
2175 (match_operand:DI 2 "grfr_register_operand" "f")))]
2177 "xmpy.l %0 = %1, %2"
2178 [(set_attr "itanium_class" "xmpy")])
2180 ;; ??? If operand 3 is an eliminable reg, then register elimination causes the
2181 ;; same problem that we have with shladd below. Unfortunately, this case is
2182 ;; much harder to fix because the multiply puts the result in an FP register,
2183 ;; but the add needs inputs from a general register. We add a spurious clobber
2184 ;; here so that it will be present just in case register elimination gives us
2185 ;; the funny result.
2187 ;; ??? Maybe validate_changes should try adding match_scratch clobbers?
2189 ;; ??? Maybe we should change how adds are canonicalized.
2191 (define_insn "madddi4"
2192 [(set (match_operand:DI 0 "fr_register_operand" "=f")
2193 (plus:DI (mult:DI (match_operand:DI 1 "grfr_register_operand" "f")
2194 (match_operand:DI 2 "grfr_register_operand" "f"))
2195 (match_operand:DI 3 "grfr_register_operand" "f")))
2196 (clobber (match_scratch:DI 4 "=X"))]
2198 "xma.l %0 = %1, %2, %3"
2199 [(set_attr "itanium_class" "xmpy")])
2201 ;; This can be created by register elimination if operand3 of shladd is an
2202 ;; eliminable register or has reg_equiv_constant set.
2204 ;; We have to use nonmemory_operand for operand 4, to ensure that the
2205 ;; validate_changes call inside eliminate_regs will always succeed. If it
2206 ;; doesn't succeed, then this remain a madddi4 pattern, and will be reloaded
2209 (define_insn "*madddi4_elim"
2210 [(set (match_operand:DI 0 "register_operand" "=&r")
2211 (plus:DI (plus:DI (mult:DI (match_operand:DI 1 "register_operand" "f")
2212 (match_operand:DI 2 "register_operand" "f"))
2213 (match_operand:DI 3 "register_operand" "f"))
2214 (match_operand:DI 4 "nonmemory_operand" "rI")))
2215 (clobber (match_scratch:DI 5 "=f"))]
2216 "reload_in_progress"
2218 [(set_attr "itanium_class" "unknown")])
2221 [(set (match_operand:DI 0 "register_operand" "")
2222 (plus:DI (plus:DI (mult:DI (match_operand:DI 1 "register_operand" "")
2223 (match_operand:DI 2 "register_operand" ""))
2224 (match_operand:DI 3 "register_operand" ""))
2225 (match_operand:DI 4 "gr_reg_or_14bit_operand" "")))
2226 (clobber (match_scratch:DI 5 ""))]
2228 [(parallel [(set (match_dup 5) (plus:DI (mult:DI (match_dup 1) (match_dup 2))
2230 (clobber (match_dup 0))])
2231 (set (match_dup 0) (match_dup 5))
2232 (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 4)))]
2235 ;; ??? There are highpart multiply and add instructions, but we have no way
2236 ;; to generate them.
2238 (define_insn "smuldi3_highpart"
2239 [(set (match_operand:DI 0 "fr_register_operand" "=f")
2242 (mult:TI (sign_extend:TI
2243 (match_operand:DI 1 "fr_register_operand" "f"))
2245 (match_operand:DI 2 "fr_register_operand" "f")))
2248 "xmpy.h %0 = %1, %2"
2249 [(set_attr "itanium_class" "xmpy")])
2251 (define_insn "umuldi3_highpart"
2252 [(set (match_operand:DI 0 "fr_register_operand" "=f")
2255 (mult:TI (zero_extend:TI
2256 (match_operand:DI 1 "fr_register_operand" "f"))
2258 (match_operand:DI 2 "fr_register_operand" "f")))
2261 "xmpy.hu %0 = %1, %2"
2262 [(set_attr "itanium_class" "xmpy")])
2264 (define_insn "negdi2"
2265 [(set (match_operand:DI 0 "gr_register_operand" "=r")
2266 (neg:DI (match_operand:DI 1 "gr_register_operand" "r")))]
2269 [(set_attr "itanium_class" "ialu")])
2271 (define_expand "absdi2"
2273 (ge:BI (match_operand:DI 1 "gr_register_operand" "") (const_int 0)))
2274 (set (match_operand:DI 0 "gr_register_operand" "")
2275 (if_then_else:DI (eq (match_dup 2) (const_int 0))
2276 (neg:DI (match_dup 1))
2279 { operands[2] = gen_reg_rtx (BImode); })
2281 (define_expand "smindi3"
2283 (ge:BI (match_operand:DI 1 "gr_register_operand" "")
2284 (match_operand:DI 2 "gr_register_operand" "")))
2285 (set (match_operand:DI 0 "gr_register_operand" "")
2286 (if_then_else:DI (ne (match_dup 3) (const_int 0))
2287 (match_dup 2) (match_dup 1)))]
2289 { operands[3] = gen_reg_rtx (BImode); })
2291 (define_expand "smaxdi3"
2293 (ge:BI (match_operand:DI 1 "gr_register_operand" "")
2294 (match_operand:DI 2 "gr_register_operand" "")))
2295 (set (match_operand:DI 0 "gr_register_operand" "")
2296 (if_then_else:DI (ne (match_dup 3) (const_int 0))
2297 (match_dup 1) (match_dup 2)))]
2299 { operands[3] = gen_reg_rtx (BImode); })
2301 (define_expand "umindi3"
2303 (geu:BI (match_operand:DI 1 "gr_register_operand" "")
2304 (match_operand:DI 2 "gr_register_operand" "")))
2305 (set (match_operand:DI 0 "gr_register_operand" "")
2306 (if_then_else:DI (ne (match_dup 3) (const_int 0))
2307 (match_dup 2) (match_dup 1)))]
2309 { operands[3] = gen_reg_rtx (BImode); })
2311 (define_expand "umaxdi3"
2313 (geu:BI (match_operand:DI 1 "gr_register_operand" "")
2314 (match_operand:DI 2 "gr_register_operand" "")))
2315 (set (match_operand:DI 0 "gr_register_operand" "")
2316 (if_then_else:DI (ne (match_dup 3) (const_int 0))
2317 (match_dup 1) (match_dup 2)))]
2319 { operands[3] = gen_reg_rtx (BImode); })
2321 (define_expand "ffsdi2"
2323 (eq:BI (match_operand:DI 1 "gr_register_operand" "") (const_int 0)))
2324 (set (match_dup 2) (plus:DI (match_dup 1) (const_int -1)))
2325 (set (match_dup 5) (const_int 0))
2326 (set (match_dup 3) (xor:DI (match_dup 1) (match_dup 2)))
2327 (set (match_dup 4) (popcount:DI (match_dup 3)))
2328 (set (match_operand:DI 0 "gr_register_operand" "")
2329 (if_then_else:DI (ne (match_dup 6) (const_int 0))
2330 (match_dup 5) (match_dup 4)))]
2333 operands[2] = gen_reg_rtx (DImode);
2334 operands[3] = gen_reg_rtx (DImode);
2335 operands[4] = gen_reg_rtx (DImode);
2336 operands[5] = gen_reg_rtx (DImode);
2337 operands[6] = gen_reg_rtx (BImode);
2340 (define_expand "ctzdi2"
2341 [(set (match_dup 2) (plus:DI (match_operand:DI 1 "gr_register_operand" "")
2343 (set (match_dup 3) (not:DI (match_dup 1)))
2344 (set (match_dup 4) (and:DI (match_dup 2) (match_dup 3)))
2345 (set (match_operand:DI 0 "gr_register_operand" "")
2346 (popcount:DI (match_dup 4)))]
2349 operands[2] = gen_reg_rtx (DImode);
2350 operands[3] = gen_reg_rtx (DImode);
2351 operands[4] = gen_reg_rtx (DImode);
2354 ;; Note the computation here is op0 = 63 - (exp - 0xffff).
2355 (define_expand "clzdi2"
2357 (unsigned_float:XF (match_operand:DI 1 "fr_register_operand" "")))
2359 (unspec:DI [(match_dup 2)] UNSPEC_GETF_EXP))
2360 (set (match_dup 4) (const_int 65598))
2361 (set (match_operand:DI 0 "gr_register_operand" "")
2362 (minus:DI (match_dup 4) (match_dup 3)))]
2365 operands[2] = gen_reg_rtx (XFmode);
2366 operands[3] = gen_reg_rtx (DImode);
2367 operands[4] = gen_reg_rtx (DImode);
2370 (define_insn "popcountdi2"
2371 [(set (match_operand:DI 0 "gr_register_operand" "=r")
2372 (popcount:DI (match_operand:DI 1 "gr_register_operand" "r")))]
2375 [(set_attr "itanium_class" "mmmul")])
2377 (define_insn "*getf_exp_xf"
2378 [(set (match_operand:DI 0 "gr_register_operand" "=r")
2379 (unspec:DI [(match_operand:XF 1 "fr_register_operand" "f")]
2383 [(set_attr "itanium_class" "frfr")])
2385 (define_expand "divdi3"
2386 [(set (match_operand:DI 0 "register_operand" "")
2387 (div:DI (match_operand:DI 1 "general_operand" "")
2388 (match_operand:DI 2 "general_operand" "")))]
2389 "TARGET_INLINE_INT_DIV"
2391 rtx op1_xf, op2_xf, op0_xf;
2393 op0_xf = gen_reg_rtx (XFmode);
2395 if (CONSTANT_P (operands[1]))
2396 operands[1] = force_reg (DImode, operands[1]);
2397 op1_xf = gen_reg_rtx (XFmode);
2398 expand_float (op1_xf, operands[1], 0);
2400 if (CONSTANT_P (operands[2]))
2401 operands[2] = force_reg (DImode, operands[2]);
2402 op2_xf = gen_reg_rtx (XFmode);
2403 expand_float (op2_xf, operands[2], 0);
2405 if (TARGET_INLINE_INT_DIV == INL_MIN_LAT)
2406 emit_insn (gen_divdi3_internal_lat (op0_xf, op1_xf, op2_xf));
2408 emit_insn (gen_divdi3_internal_thr (op0_xf, op1_xf, op2_xf));
2410 emit_insn (gen_fix_truncxfdi2_alts (operands[0], op0_xf, const1_rtx));
2414 (define_expand "moddi3"
2415 [(set (match_operand:DI 0 "register_operand" "")
2416 (mod:SI (match_operand:DI 1 "general_operand" "")
2417 (match_operand:DI 2 "general_operand" "")))]
2418 "TARGET_INLINE_INT_DIV"
2422 div = gen_reg_rtx (DImode);
2423 emit_insn (gen_divdi3 (div, operands[1], operands[2]));
2425 op2_neg = expand_unop (DImode, neg_optab, operands[2], NULL_RTX, 0);
2427 emit_insn (gen_madddi4 (operands[0], div, op2_neg, operands[1]));
2431 (define_expand "udivdi3"
2432 [(set (match_operand:DI 0 "register_operand" "")
2433 (udiv:DI (match_operand:DI 1 "general_operand" "")
2434 (match_operand:DI 2 "general_operand" "")))]
2435 "TARGET_INLINE_INT_DIV"
2437 rtx op1_xf, op2_xf, op0_xf;
2439 op0_xf = gen_reg_rtx (XFmode);
2441 if (CONSTANT_P (operands[1]))
2442 operands[1] = force_reg (DImode, operands[1]);
2443 op1_xf = gen_reg_rtx (XFmode);
2444 expand_float (op1_xf, operands[1], 1);
2446 if (CONSTANT_P (operands[2]))
2447 operands[2] = force_reg (DImode, operands[2]);
2448 op2_xf = gen_reg_rtx (XFmode);
2449 expand_float (op2_xf, operands[2], 1);
2451 if (TARGET_INLINE_INT_DIV == INL_MIN_LAT)
2452 emit_insn (gen_divdi3_internal_lat (op0_xf, op1_xf, op2_xf));
2454 emit_insn (gen_divdi3_internal_thr (op0_xf, op1_xf, op2_xf));
2456 emit_insn (gen_fixuns_truncxfdi2_alts (operands[0], op0_xf, const1_rtx));
2460 (define_expand "umoddi3"
2461 [(set (match_operand:DI 0 "register_operand" "")
2462 (umod:DI (match_operand:DI 1 "general_operand" "")
2463 (match_operand:DI 2 "general_operand" "")))]
2464 "TARGET_INLINE_INT_DIV"
2468 div = gen_reg_rtx (DImode);
2469 emit_insn (gen_udivdi3 (div, operands[1], operands[2]));
2471 op2_neg = expand_unop (DImode, neg_optab, operands[2], NULL_RTX, 0);
2473 emit_insn (gen_madddi4 (operands[0], div, op2_neg, operands[1]));
2477 (define_insn_and_split "divdi3_internal_lat"
2478 [(set (match_operand:XF 0 "fr_register_operand" "=&f")
2479 (float:XF (div:SI (match_operand:XF 1 "fr_register_operand" "f")
2480 (match_operand:XF 2 "fr_register_operand" "f"))))
2481 (clobber (match_scratch:XF 3 "=&f"))
2482 (clobber (match_scratch:XF 4 "=&f"))
2483 (clobber (match_scratch:XF 5 "=&f"))
2484 (clobber (match_scratch:BI 6 "=c"))]
2485 "TARGET_INLINE_INT_DIV == INL_MIN_LAT"
2487 "&& reload_completed"
2488 [(parallel [(set (match_dup 0) (div:XF (const_int 1) (match_dup 2)))
2489 (set (match_dup 6) (unspec:BI [(match_dup 1) (match_dup 2)]
2490 UNSPEC_FR_RECIP_APPROX))
2491 (use (const_int 1))])
2492 (cond_exec (ne (match_dup 6) (const_int 0))
2493 (parallel [(set (match_dup 3)
2494 (minus:XF (match_dup 7)
2495 (mult:XF (match_dup 2) (match_dup 0))))
2496 (use (const_int 1))]))
2497 (cond_exec (ne (match_dup 6) (const_int 0))
2498 (parallel [(set (match_dup 4) (mult:XF (match_dup 1) (match_dup 0)))
2499 (use (const_int 1))]))
2500 (cond_exec (ne (match_dup 6) (const_int 0))
2501 (parallel [(set (match_dup 5) (mult:XF (match_dup 3) (match_dup 3)))
2502 (use (const_int 1))]))
2503 (cond_exec (ne (match_dup 6) (const_int 0))
2504 (parallel [(set (match_dup 4)
2505 (plus:XF (mult:XF (match_dup 3) (match_dup 4))
2507 (use (const_int 1))]))
2508 (cond_exec (ne (match_dup 6) (const_int 0))
2509 (parallel [(set (match_dup 0)
2510 (plus:XF (mult:XF (match_dup 3) (match_dup 0))
2512 (use (const_int 1))]))
2513 (cond_exec (ne (match_dup 6) (const_int 0))
2514 (parallel [(set (match_dup 3)
2515 (plus:XF (mult:XF (match_dup 5) (match_dup 4))
2517 (use (const_int 1))]))
2518 (cond_exec (ne (match_dup 6) (const_int 0))
2519 (parallel [(set (match_dup 0)
2520 (plus:XF (mult:XF (match_dup 5) (match_dup 0))
2522 (use (const_int 1))]))
2523 (cond_exec (ne (match_dup 6) (const_int 0))
2524 (parallel [(set (match_dup 4)
2525 (minus:XF (match_dup 1)
2526 (mult:XF (match_dup 2) (match_dup 3))))
2527 (use (const_int 1))]))
2528 (cond_exec (ne (match_dup 6) (const_int 0))
2529 (parallel [(set (match_dup 0)
2530 (plus:XF (mult:XF (match_dup 4) (match_dup 0))
2532 (use (const_int 1))]))
2534 "operands[7] = CONST1_RTX (XFmode);"
2535 [(set_attr "predicable" "no")])
2537 (define_insn_and_split "divdi3_internal_thr"
2538 [(set (match_operand:XF 0 "fr_register_operand" "=&f")
2539 (float:XF (div:SI (match_operand:XF 1 "fr_register_operand" "f")
2540 (match_operand:XF 2 "fr_register_operand" "f"))))
2541 (clobber (match_scratch:XF 3 "=&f"))
2542 (clobber (match_scratch:XF 4 "=f"))
2543 (clobber (match_scratch:BI 5 "=c"))]
2544 "TARGET_INLINE_INT_DIV == INL_MAX_THR"
2546 "&& reload_completed"
2547 [(parallel [(set (match_dup 0) (div:XF (const_int 1) (match_dup 2)))
2548 (set (match_dup 5) (unspec:BI [(match_dup 1) (match_dup 2)]
2549 UNSPEC_FR_RECIP_APPROX))
2550 (use (const_int 1))])
2551 (cond_exec (ne (match_dup 5) (const_int 0))
2552 (parallel [(set (match_dup 3)
2553 (minus:XF (match_dup 6)
2554 (mult:XF (match_dup 2) (match_dup 0))))
2555 (use (const_int 1))]))
2556 (cond_exec (ne (match_dup 5) (const_int 0))
2557 (parallel [(set (match_dup 0)
2558 (plus:XF (mult:XF (match_dup 3) (match_dup 0))
2560 (use (const_int 1))]))
2561 (cond_exec (ne (match_dup 5) (const_int 0))
2562 (parallel [(set (match_dup 3) (mult:XF (match_dup 3) (match_dup 3)))
2563 (use (const_int 1))]))
2564 (cond_exec (ne (match_dup 5) (const_int 0))
2565 (parallel [(set (match_dup 0)
2566 (plus:XF (mult:XF (match_dup 3) (match_dup 0))
2568 (use (const_int 1))]))
2569 (cond_exec (ne (match_dup 5) (const_int 0))
2570 (parallel [(set (match_dup 3) (mult:XF (match_dup 0) (match_dup 1)))
2571 (use (const_int 1))]))
2572 (cond_exec (ne (match_dup 5) (const_int 0))
2573 (parallel [(set (match_dup 4)
2574 (minus:XF (match_dup 1)
2575 (mult:XF (match_dup 2) (match_dup 3))))
2576 (use (const_int 1))]))
2577 (cond_exec (ne (match_dup 5) (const_int 0))
2578 (parallel [(set (match_dup 0)
2579 (plus:XF (mult:XF (match_dup 4) (match_dup 0))
2581 (use (const_int 1))]))
2583 "operands[6] = CONST1_RTX (XFmode);"
2584 [(set_attr "predicable" "no")])
2586 ;; ::::::::::::::::::::
2588 ;; :: 32 bit floating point arithmetic
2590 ;; ::::::::::::::::::::
2592 (define_insn "addsf3"
2593 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2594 (plus:SF (match_operand:SF 1 "fr_register_operand" "%f")
2595 (match_operand:SF 2 "fr_reg_or_fp01_operand" "fG")))]
2597 "fadd.s %0 = %1, %F2"
2598 [(set_attr "itanium_class" "fmac")])
2600 (define_insn "subsf3"
2601 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2602 (minus:SF (match_operand:SF 1 "fr_reg_or_fp01_operand" "fG")
2603 (match_operand:SF 2 "fr_reg_or_fp01_operand" "fG")))]
2605 "fsub.s %0 = %F1, %F2"
2606 [(set_attr "itanium_class" "fmac")])
2608 (define_insn "mulsf3"
2609 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2610 (mult:SF (match_operand:SF 1 "fr_register_operand" "%f")
2611 (match_operand:SF 2 "fr_register_operand" "f")))]
2613 "fmpy.s %0 = %1, %2"
2614 [(set_attr "itanium_class" "fmac")])
2616 (define_insn "abssf2"
2617 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2618 (abs:SF (match_operand:SF 1 "fr_register_operand" "f")))]
2621 [(set_attr "itanium_class" "fmisc")])
2623 (define_insn "negsf2"
2624 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2625 (neg:SF (match_operand:SF 1 "fr_register_operand" "f")))]
2628 [(set_attr "itanium_class" "fmisc")])
2630 (define_insn "*nabssf2"
2631 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2632 (neg:SF (abs:SF (match_operand:SF 1 "fr_register_operand" "f"))))]
2635 [(set_attr "itanium_class" "fmisc")])
2637 (define_insn "copysignsf3"
2638 [(set (match_operand:SF 0 "register_operand" "=f")
2639 (unspec:SF [(match_operand:SF 1 "fr_reg_or_fp01_operand" "fG")
2640 (match_operand:SF 2 "fr_reg_or_fp01_operand" "fG")]
2643 "fmerge.s %0 = %F2, %F1"
2644 [(set_attr "itanium_class" "fmisc")])
2646 (define_insn "*ncopysignsf3"
2647 [(set (match_operand:SF 0 "register_operand" "=f")
2648 (neg:SF (unspec:SF [(match_operand:SF 1 "fr_reg_or_fp01_operand" "fG")
2649 (match_operand:SF 2 "fr_reg_or_fp01_operand" "fG")]
2652 "fmerge.ns %0 = %F2, %F1"
2653 [(set_attr "itanium_class" "fmisc")])
2655 (define_insn "sminsf3"
2656 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2657 (smin:SF (match_operand:SF 1 "fr_register_operand" "f")
2658 (match_operand:SF 2 "fr_reg_or_fp01_operand" "fG")))]
2661 [(set_attr "itanium_class" "fmisc")])
2663 (define_insn "smaxsf3"
2664 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2665 (smax:SF (match_operand:SF 1 "fr_register_operand" "f")
2666 (match_operand:SF 2 "fr_reg_or_fp01_operand" "fG")))]
2669 [(set_attr "itanium_class" "fmisc")])
2671 (define_insn "*maddsf4"
2672 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2673 (plus:SF (mult:SF (match_operand:SF 1 "fr_register_operand" "f")
2674 (match_operand:SF 2 "fr_register_operand" "f"))
2675 (match_operand:SF 3 "fr_reg_or_fp01_operand" "fG")))]
2677 "fma.s %0 = %1, %2, %F3"
2678 [(set_attr "itanium_class" "fmac")])
2680 (define_insn "*msubsf4"
2681 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2682 (minus:SF (mult:SF (match_operand:SF 1 "fr_register_operand" "f")
2683 (match_operand:SF 2 "fr_register_operand" "f"))
2684 (match_operand:SF 3 "fr_reg_or_fp01_operand" "fG")))]
2686 "fms.s %0 = %1, %2, %F3"
2687 [(set_attr "itanium_class" "fmac")])
2689 (define_insn "*nmulsf3"
2690 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2691 (neg:SF (mult:SF (match_operand:SF 1 "fr_register_operand" "f")
2692 (match_operand:SF 2 "fr_register_operand" "f"))))]
2694 "fnmpy.s %0 = %1, %2"
2695 [(set_attr "itanium_class" "fmac")])
2697 (define_insn "*nmaddsf4"
2698 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2699 (minus:SF (match_operand:SF 3 "fr_reg_or_fp01_operand" "fG")
2700 (mult:SF (match_operand:SF 1 "fr_register_operand" "f")
2701 (match_operand:SF 2 "fr_register_operand" "f"))))]
2703 "fnma.s %0 = %1, %2, %F3"
2704 [(set_attr "itanium_class" "fmac")])
2706 (define_insn "*nmaddsf4_alts"
2707 [(set (match_operand:SF 0 "fr_register_operand" "=f")
2708 (minus:SF (match_operand:SF 3 "fr_reg_or_fp01_operand" "fG")
2709 (mult:SF (match_operand:SF 1 "fr_register_operand" "f")
2710 (match_operand:SF 2 "fr_register_operand" "f"))))
2711 (use (match_operand:SI 4 "const_int_operand" ""))]
2713 "fnma.s.s%4 %0 = %1, %2, %F3"
2714 [(set_attr "itanium_class" "fmac")])
2716 (define_expand "divsf3"
2717 [(set (match_operand:SF 0 "fr_register_operand" "")
2718 (div:SF (match_operand:SF 1 "fr_register_operand" "")
2719 (match_operand:SF 2 "fr_register_operand" "")))]
2720 "TARGET_INLINE_FLOAT_DIV"
2723 if (TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT)
2724 insn = gen_divsf3_internal_lat (operands[0], operands[1], operands[2]);
2726 insn = gen_divsf3_internal_thr (operands[0], operands[1], operands[2]);
2731 (define_insn_and_split "divsf3_internal_lat"
2732 [(set (match_operand:SF 0 "fr_register_operand" "=&f")
2733 (div:SF (match_operand:SF 1 "fr_register_operand" "f")
2734 (match_operand:SF 2 "fr_register_operand" "f")))
2735 (clobber (match_scratch:XF 3 "=&f"))
2736 (clobber (match_scratch:XF 4 "=f"))
2737 (clobber (match_scratch:BI 5 "=c"))]
2738 "TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT"
2740 "&& reload_completed"
2741 [(parallel [(set (match_dup 6) (div:XF (const_int 1) (match_dup 8)))
2742 (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)]
2743 UNSPEC_FR_RECIP_APPROX))
2744 (use (const_int 0))])
2745 (cond_exec (ne (match_dup 5) (const_int 0))
2746 (parallel [(set (match_dup 3) (mult:XF (match_dup 7) (match_dup 6)))
2747 (use (const_int 1))]))
2748 (cond_exec (ne (match_dup 5) (const_int 0))
2749 (parallel [(set (match_dup 4)
2750 (minus:XF (match_dup 10)
2751 (mult:XF (match_dup 8) (match_dup 6))))
2752 (use (const_int 1))]))
2753 (cond_exec (ne (match_dup 5) (const_int 0))
2754 (parallel [(set (match_dup 3)
2755 (plus:XF (mult:XF (match_dup 4) (match_dup 3))
2757 (use (const_int 1))]))
2758 (cond_exec (ne (match_dup 5) (const_int 0))
2759 (parallel [(set (match_dup 4) (mult:XF (match_dup 4) (match_dup 4)))
2760 (use (const_int 1))]))
2761 (cond_exec (ne (match_dup 5) (const_int 0))
2762 (parallel [(set (match_dup 3)
2763 (plus:XF (mult:XF (match_dup 4) (match_dup 3))
2765 (use (const_int 1))]))
2766 (cond_exec (ne (match_dup 5) (const_int 0))
2767 (parallel [(set (match_dup 4) (mult:XF (match_dup 4) (match_dup 4)))
2768 (use (const_int 1))]))
2769 (cond_exec (ne (match_dup 5) (const_int 0))
2770 (parallel [(set (match_dup 9)
2772 (plus:XF (mult:XF (match_dup 4) (match_dup 3))
2774 (use (const_int 1))]))
2775 (cond_exec (ne (match_dup 5) (const_int 0))
2777 (float_truncate:SF (match_dup 6))))
2780 operands[6] = gen_rtx_REG (XFmode, REGNO (operands[0]));
2781 operands[7] = gen_rtx_REG (XFmode, REGNO (operands[1]));
2782 operands[8] = gen_rtx_REG (XFmode, REGNO (operands[2]));
2783 operands[9] = gen_rtx_REG (DFmode, REGNO (operands[0]));
2784 operands[10] = CONST1_RTX (XFmode);
2786 [(set_attr "predicable" "no")])
2788 (define_insn_and_split "divsf3_internal_thr"
2789 [(set (match_operand:SF 0 "fr_register_operand" "=&f")
2790 (div:SF (match_operand:SF 1 "fr_register_operand" "f")
2791 (match_operand:SF 2 "fr_register_operand" "f")))
2792 (clobber (match_scratch:XF 3 "=&f"))
2793 (clobber (match_scratch:XF 4 "=f"))
2794 (clobber (match_scratch:BI 5 "=c"))]
2795 "TARGET_INLINE_FLOAT_DIV == INL_MAX_THR"
2797 "&& reload_completed"
2798 [(parallel [(set (match_dup 6) (div:XF (const_int 1) (match_dup 8)))
2799 (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)]
2800 UNSPEC_FR_RECIP_APPROX))
2801 (use (const_int 0))])
2802 (cond_exec (ne (match_dup 5) (const_int 0))
2803 (parallel [(set (match_dup 3)
2804 (minus:XF (match_dup 10)
2805 (mult:XF (match_dup 8) (match_dup 6))))
2806 (use (const_int 1))]))
2807 (cond_exec (ne (match_dup 5) (const_int 0))
2808 (parallel [(set (match_dup 3)
2809 (plus:XF (mult:XF (match_dup 3) (match_dup 3))
2811 (use (const_int 1))]))
2812 (cond_exec (ne (match_dup 5) (const_int 0))
2813 (parallel [(set (match_dup 6)
2814 (plus:XF (mult:XF (match_dup 3) (match_dup 6))
2816 (use (const_int 1))]))
2817 (cond_exec (ne (match_dup 5) (const_int 0))
2818 (parallel [(set (match_dup 9)
2820 (mult:XF (match_dup 7) (match_dup 6))))
2821 (use (const_int 1))]))
2822 (cond_exec (ne (match_dup 5) (const_int 0))
2823 (parallel [(set (match_dup 4)
2824 (minus:XF (match_dup 7)
2825 (mult:XF (match_dup 8) (match_dup 3))))
2826 (use (const_int 1))]))
2827 (cond_exec (ne (match_dup 5) (const_int 0))
2830 (plus:XF (mult:XF (match_dup 4) (match_dup 6))
2834 operands[6] = gen_rtx_REG (XFmode, REGNO (operands[0]));
2835 operands[7] = gen_rtx_REG (XFmode, REGNO (operands[1]));
2836 operands[8] = gen_rtx_REG (XFmode, REGNO (operands[2]));
2837 operands[9] = gen_rtx_REG (SFmode, REGNO (operands[3]));
2838 operands[10] = CONST1_RTX (XFmode);
2840 [(set_attr "predicable" "no")])
2842 ;; Inline square root.
2844 (define_insn "*sqrt_approx"
2845 [(set (match_operand:XF 0 "fr_register_operand" "=f")
2846 (div:XF (const_int 1)
2847 (sqrt:XF (match_operand:XF 2 "fr_register_operand" "f"))))
2848 (set (match_operand:BI 1 "register_operand" "=c")
2849 (unspec:BI [(match_dup 2)] UNSPEC_FR_SQRT_RECIP_APPROX))
2850 (use (match_operand:SI 3 "const_int_operand" "")) ]
2852 "frsqrta.s%3 %0, %1 = %2"
2853 [(set_attr "itanium_class" "fmisc")
2854 (set_attr "predicable" "no")])
2856 (define_insn "setf_exp_xf"
2857 [(set (match_operand:XF 0 "fr_register_operand" "=f")
2858 (unspec:XF [(match_operand:DI 1 "register_operand" "r")]
2862 [(set_attr "itanium_class" "frfr")])
2864 (define_expand "sqrtsf2"
2865 [(set (match_operand:SF 0 "fr_register_operand" "=&f")
2866 (sqrt:SF (match_operand:SF 1 "fr_register_operand" "f")))]
2867 "TARGET_INLINE_SQRT"
2871 if (TARGET_INLINE_SQRT == INL_MIN_LAT)
2872 insn = gen_sqrtsf2_internal_lat (operands[0], operands[1]);
2875 gcc_assert (TARGET_INLINE_SQRT != INL_MIN_LAT);
2877 insn = gen_sqrtsf2_internal_thr (operands[0], operands[1]);
2882 ;; Latency-optimized square root.
2883 ;; FIXME: Implement.
2885 ;; Throughput-optimized square root.
2887 (define_insn_and_split "sqrtsf2_internal_thr"
2888 [(set (match_operand:SF 0 "fr_register_operand" "=&f")
2889 (sqrt:SF (match_operand:SF 1 "fr_register_operand" "f")))
2890 ;; Register r2 in optimization guide.
2891 (clobber (match_scratch:DI 2 "=r"))
2892 ;; Register f8 in optimization guide
2893 (clobber (match_scratch:XF 3 "=&f"))
2894 ;; Register f9 in optimization guide
2895 (clobber (match_scratch:XF 4 "=&f"))
2896 ;; Register f10 in optimization guide
2897 (clobber (match_scratch:XF 5 "=&f"))
2898 ;; Register p6 in optimization guide.
2899 (clobber (match_scratch:BI 6 "=c"))]
2900 "TARGET_INLINE_SQRT == INL_MAX_THR"
2902 "&& reload_completed"
2903 [ ;; exponent of +1/2 in r2
2904 (set (match_dup 2) (const_int 65534))
2907 (unspec:XF [(match_dup 2)] UNSPEC_SETF_EXP))
2909 ;; y0 = 1/sqrt(a) in f7
2910 (parallel [(set (match_dup 7)
2911 (div:XF (const_int 1)
2912 (sqrt:XF (match_dup 8))))
2914 (unspec:BI [(match_dup 8)]
2915 UNSPEC_FR_SQRT_RECIP_APPROX))
2916 (use (const_int 0))])
2918 ;; H0 = 1/2 * y0 in f9
2919 (cond_exec (ne (match_dup 6) (const_int 0))
2920 (parallel [(set (match_dup 4)
2921 (plus:XF (mult:XF (match_dup 3) (match_dup 7))
2923 (use (const_int 1))]))
2925 ;; S0 = a * y0 in f7
2926 (cond_exec (ne (match_dup 6) (const_int 0))
2927 (parallel [(set (match_dup 7)
2928 (plus:XF (mult:XF (match_dup 8) (match_dup 7))
2930 (use (const_int 1))]))
2932 ;; d = 1/2 - S0 * H0 in f10
2933 (cond_exec (ne (match_dup 6) (const_int 0))
2934 (parallel [(set (match_dup 5)
2935 (minus:XF (match_dup 3)
2936 (mult:XF (match_dup 7) (match_dup 4))))
2937 (use (const_int 1))]))
2939 ;; d' = d + 1/2 * d in f8
2940 (cond_exec (ne (match_dup 6) (const_int 0))
2941 (parallel [(set (match_dup 3)
2942 (plus:XF (mult:XF (match_dup 3) (match_dup 5))
2944 (use (const_int 1))]))
2946 ;; e = d + d * d' in f8
2947 (cond_exec (ne (match_dup 6) (const_int 0))
2948 (parallel [(set (match_dup 3)
2949 (plus:XF (mult:XF (match_dup 5) (match_dup 3))
2951 (use (const_int 1))]))
2953 ;; S1 = S0 + e * S0 in f7
2954 (cond_exec (ne (match_dup 6) (const_int 0))
2955 (parallel [(set (match_dup 0)
2957 (plus:XF (mult:XF (match_dup 3) (match_dup 7))
2959 (use (const_int 1))]))
2961 ;; H1 = H0 + e * H0 in f8
2962 (cond_exec (ne (match_dup 6) (const_int 0))
2963 (parallel [(set (match_dup 3)
2964 (plus:XF (mult:XF (match_dup 3) (match_dup 4))
2966 (use (const_int 1))]))
2968 ;; d1 = a - S1 * S1 in f9
2969 (cond_exec (ne (match_dup 6) (const_int 0))
2970 (parallel [(set (match_dup 4)
2971 (minus:XF (match_dup 8)
2972 (mult:XF (match_dup 7) (match_dup 7))))
2973 (use (const_int 1))]))
2975 ;; S = S1 + d1 * H1 in f7
2976 (cond_exec (ne (match_dup 6) (const_int 0))
2977 (parallel [(set (match_dup 0)
2979 (plus:XF (mult:XF (match_dup 4) (match_dup 3))
2981 (use (const_int 0))]))]
2983 /* Generate 82-bit versions of the input and output operands. */
2984 operands[7] = gen_rtx_REG (XFmode, REGNO (operands[0]));
2985 operands[8] = gen_rtx_REG (XFmode, REGNO (operands[1]));
2986 /* Generate required floating-point constants. */
2987 operands[9] = CONST0_RTX (XFmode);
2989 [(set_attr "predicable" "no")])
2991 ;; ::::::::::::::::::::
2993 ;; :: 64 bit floating point arithmetic
2995 ;; ::::::::::::::::::::
2997 (define_insn "adddf3"
2998 [(set (match_operand:DF 0 "fr_register_operand" "=f")
2999 (plus:DF (match_operand:DF 1 "fr_register_operand" "%f")
3000 (match_operand:DF 2 "fr_reg_or_fp01_operand" "fG")))]
3002 "fadd.d %0 = %1, %F2"
3003 [(set_attr "itanium_class" "fmac")])
3005 (define_insn "*adddf3_trunc"
3006 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3008 (plus:DF (match_operand:DF 1 "fr_register_operand" "%f")
3009 (match_operand:DF 2 "fr_reg_or_fp01_operand" "fG"))))]
3011 "fadd.s %0 = %1, %F2"
3012 [(set_attr "itanium_class" "fmac")])
3014 (define_insn "subdf3"
3015 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3016 (minus:DF (match_operand:DF 1 "fr_reg_or_fp01_operand" "fG")
3017 (match_operand:DF 2 "fr_reg_or_fp01_operand" "fG")))]
3019 "fsub.d %0 = %F1, %F2"
3020 [(set_attr "itanium_class" "fmac")])
3022 (define_insn "*subdf3_trunc"
3023 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3025 (minus:DF (match_operand:DF 1 "fr_reg_or_fp01_operand" "fG")
3026 (match_operand:DF 2 "fr_reg_or_fp01_operand" "fG"))))]
3028 "fsub.s %0 = %F1, %F2"
3029 [(set_attr "itanium_class" "fmac")])
3031 (define_insn "muldf3"
3032 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3033 (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3034 (match_operand:DF 2 "fr_register_operand" "f")))]
3036 "fmpy.d %0 = %1, %2"
3037 [(set_attr "itanium_class" "fmac")])
3039 (define_insn "*muldf3_trunc"
3040 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3042 (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3043 (match_operand:DF 2 "fr_register_operand" "f"))))]
3045 "fmpy.s %0 = %1, %2"
3046 [(set_attr "itanium_class" "fmac")])
3048 (define_insn "absdf2"
3049 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3050 (abs:DF (match_operand:DF 1 "fr_register_operand" "f")))]
3053 [(set_attr "itanium_class" "fmisc")])
3055 (define_insn "negdf2"
3056 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3057 (neg:DF (match_operand:DF 1 "fr_register_operand" "f")))]
3060 [(set_attr "itanium_class" "fmisc")])
3062 (define_insn "*nabsdf2"
3063 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3064 (neg:DF (abs:DF (match_operand:DF 1 "fr_register_operand" "f"))))]
3067 [(set_attr "itanium_class" "fmisc")])
3069 (define_insn "copysigndf3"
3070 [(set (match_operand:DF 0 "register_operand" "=f")
3071 (unspec:DF [(match_operand:DF 1 "fr_reg_or_fp01_operand" "fG")
3072 (match_operand:DF 2 "fr_reg_or_fp01_operand" "fG")]
3075 "fmerge.s %0 = %F2, %F1"
3076 [(set_attr "itanium_class" "fmisc")])
3078 (define_insn "*ncopysigndf3"
3079 [(set (match_operand:DF 0 "register_operand" "=f")
3080 (neg:DF (unspec:DF [(match_operand:DF 1 "fr_reg_or_fp01_operand" "fG")
3081 (match_operand:DF 2 "fr_reg_or_fp01_operand" "fG")]
3084 "fmerge.ns %0 = %F2, %F1"
3085 [(set_attr "itanium_class" "fmisc")])
3087 (define_insn "smindf3"
3088 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3089 (smin:DF (match_operand:DF 1 "fr_register_operand" "f")
3090 (match_operand:DF 2 "fr_reg_or_fp01_operand" "fG")))]
3093 [(set_attr "itanium_class" "fmisc")])
3095 (define_insn "smaxdf3"
3096 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3097 (smax:DF (match_operand:DF 1 "fr_register_operand" "f")
3098 (match_operand:DF 2 "fr_reg_or_fp01_operand" "fG")))]
3101 [(set_attr "itanium_class" "fmisc")])
3103 (define_insn "*madddf4"
3104 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3105 (plus:DF (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3106 (match_operand:DF 2 "fr_register_operand" "f"))
3107 (match_operand:DF 3 "fr_reg_or_fp01_operand" "fG")))]
3109 "fma.d %0 = %1, %2, %F3"
3110 [(set_attr "itanium_class" "fmac")])
3112 (define_insn "*madddf4_trunc"
3113 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3115 (plus:DF (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3116 (match_operand:DF 2 "fr_register_operand" "f"))
3117 (match_operand:DF 3 "fr_reg_or_fp01_operand" "fG"))))]
3119 "fma.s %0 = %1, %2, %F3"
3120 [(set_attr "itanium_class" "fmac")])
3122 (define_insn "*msubdf4"
3123 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3124 (minus:DF (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3125 (match_operand:DF 2 "fr_register_operand" "f"))
3126 (match_operand:DF 3 "fr_reg_or_fp01_operand" "fG")))]
3128 "fms.d %0 = %1, %2, %F3"
3129 [(set_attr "itanium_class" "fmac")])
3131 (define_insn "*msubdf4_trunc"
3132 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3134 (minus:DF (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3135 (match_operand:DF 2 "fr_register_operand" "f"))
3136 (match_operand:DF 3 "fr_reg_or_fp01_operand" "fG"))))]
3138 "fms.s %0 = %1, %2, %F3"
3139 [(set_attr "itanium_class" "fmac")])
3141 (define_insn "*nmuldf3"
3142 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3143 (neg:DF (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3144 (match_operand:DF 2 "fr_register_operand" "f"))))]
3146 "fnmpy.d %0 = %1, %2"
3147 [(set_attr "itanium_class" "fmac")])
3149 (define_insn "*nmuldf3_trunc"
3150 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3152 (neg:DF (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3153 (match_operand:DF 2 "fr_register_operand" "f")))))]
3155 "fnmpy.s %0 = %1, %2"
3156 [(set_attr "itanium_class" "fmac")])
3158 (define_insn "*nmadddf4"
3159 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3160 (minus:DF (match_operand:DF 3 "fr_reg_or_fp01_operand" "fG")
3161 (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3162 (match_operand:DF 2 "fr_register_operand" "f"))))]
3164 "fnma.d %0 = %1, %2, %F3"
3165 [(set_attr "itanium_class" "fmac")])
3167 (define_insn "*nmadddf4_alts"
3168 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3169 (minus:DF (match_operand:DF 3 "fr_reg_or_fp01_operand" "fG")
3170 (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3171 (match_operand:DF 2 "fr_register_operand" "f"))))
3172 (use (match_operand:SI 4 "const_int_operand" ""))]
3174 "fnma.d.s%4 %0 = %1, %2, %F3"
3175 [(set_attr "itanium_class" "fmac")])
3177 (define_insn "*nmadddf4_truncsf"
3178 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3180 (minus:DF (match_operand:DF 3 "fr_reg_or_fp01_operand" "fG")
3181 (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3182 (match_operand:DF 2 "fr_register_operand" "f")))))]
3184 "fnma.s %0 = %1, %2, %F3"
3185 [(set_attr "itanium_class" "fmac")])
3187 (define_insn "*nmadddf4_truncsf_alts"
3188 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3190 (minus:DF (match_operand:DF 3 "fr_reg_or_fp01_operand" "fG")
3191 (mult:DF (match_operand:DF 1 "fr_register_operand" "f")
3192 (match_operand:DF 2 "fr_register_operand" "f")))))
3193 (use (match_operand:SI 4 "const_int_operand" ""))]
3195 "fnma.s.s%4 %0 = %1, %2, %F3"
3196 [(set_attr "itanium_class" "fmac")])
3198 (define_expand "divdf3"
3199 [(set (match_operand:DF 0 "fr_register_operand" "")
3200 (div:DF (match_operand:DF 1 "fr_register_operand" "")
3201 (match_operand:DF 2 "fr_register_operand" "")))]
3202 "TARGET_INLINE_FLOAT_DIV"
3205 if (TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT)
3206 insn = gen_divdf3_internal_lat (operands[0], operands[1], operands[2]);
3208 insn = gen_divdf3_internal_thr (operands[0], operands[1], operands[2]);
3213 (define_insn_and_split "divdf3_internal_lat"
3214 [(set (match_operand:DF 0 "fr_register_operand" "=&f")
3215 (div:DF (match_operand:DF 1 "fr_register_operand" "f")
3216 (match_operand:DF 2 "fr_register_operand" "f")))
3217 (clobber (match_scratch:XF 3 "=&f"))
3218 (clobber (match_scratch:XF 4 "=&f"))
3219 (clobber (match_scratch:XF 5 "=&f"))
3220 (clobber (match_scratch:BI 6 "=c"))]
3221 "TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT"
3223 "&& reload_completed"
3224 [(parallel [(set (match_dup 7) (div:XF (const_int 1) (match_dup 9)))
3225 (set (match_dup 6) (unspec:BI [(match_dup 8) (match_dup 9)]
3226 UNSPEC_FR_RECIP_APPROX))
3227 (use (const_int 0))])
3228 (cond_exec (ne (match_dup 6) (const_int 0))
3229 (parallel [(set (match_dup 3) (mult:XF (match_dup 8) (match_dup 7)))
3230 (use (const_int 1))]))
3231 (cond_exec (ne (match_dup 6) (const_int 0))
3232 (parallel [(set (match_dup 4)
3233 (minus:XF (match_dup 12)
3234 (mult:XF (match_dup 9) (match_dup 7))))
3235 (use (const_int 1))]))
3236 (cond_exec (ne (match_dup 6) (const_int 0))
3237 (parallel [(set (match_dup 3)
3238 (plus:XF (mult:XF (match_dup 4) (match_dup 3))
3240 (use (const_int 1))]))
3241 (cond_exec (ne (match_dup 6) (const_int 0))
3242 (parallel [(set (match_dup 5) (mult:XF (match_dup 4) (match_dup 4)))
3243 (use (const_int 1))]))
3244 (cond_exec (ne (match_dup 6) (const_int 0))
3245 (parallel [(set (match_dup 7)
3246 (plus:XF (mult:XF (match_dup 4) (match_dup 7))
3248 (use (const_int 1))]))
3249 (cond_exec (ne (match_dup 6) (const_int 0))
3250 (parallel [(set (match_dup 3)
3251 (plus:XF (mult:XF (match_dup 5) (match_dup 3))
3253 (use (const_int 1))]))
3254 (cond_exec (ne (match_dup 6) (const_int 0))
3255 (parallel [(set (match_dup 4) (mult:XF (match_dup 5) (match_dup 5)))
3256 (use (const_int 1))]))
3257 (cond_exec (ne (match_dup 6) (const_int 0))
3258 (parallel [(set (match_dup 7)
3259 (plus:XF (mult:XF (match_dup 5) (match_dup 7))
3261 (use (const_int 1))]))
3262 (cond_exec (ne (match_dup 6) (const_int 0))
3263 (parallel [(set (match_dup 10)
3265 (plus:XF (mult:XF (match_dup 4) (match_dup 3))
3267 (use (const_int 1))]))
3268 (cond_exec (ne (match_dup 6) (const_int 0))
3269 (parallel [(set (match_dup 7)
3270 (plus:XF (mult:XF (match_dup 4) (match_dup 7))
3272 (use (const_int 1))]))
3273 (cond_exec (ne (match_dup 6) (const_int 0))
3274 (parallel [(set (match_dup 11)
3276 (minus:XF (match_dup 8)
3277 (mult:XF (match_dup 9) (match_dup 3)))))
3278 (use (const_int 1))]))
3279 (cond_exec (ne (match_dup 6) (const_int 0))
3281 (float_truncate:DF (plus:XF (mult:XF (match_dup 5) (match_dup 7))
3285 operands[7] = gen_rtx_REG (XFmode, REGNO (operands[0]));
3286 operands[8] = gen_rtx_REG (XFmode, REGNO (operands[1]));
3287 operands[9] = gen_rtx_REG (XFmode, REGNO (operands[2]));
3288 operands[10] = gen_rtx_REG (DFmode, REGNO (operands[3]));
3289 operands[11] = gen_rtx_REG (DFmode, REGNO (operands[5]));
3290 operands[12] = CONST1_RTX (XFmode);
3292 [(set_attr "predicable" "no")])
3294 (define_insn_and_split "divdf3_internal_thr"
3295 [(set (match_operand:DF 0 "fr_register_operand" "=&f")
3296 (div:DF (match_operand:DF 1 "fr_register_operand" "f")
3297 (match_operand:DF 2 "fr_register_operand" "f")))
3298 (clobber (match_scratch:XF 3 "=&f"))
3299 (clobber (match_scratch:DF 4 "=f"))
3300 (clobber (match_scratch:BI 5 "=c"))]
3301 "TARGET_INLINE_FLOAT_DIV == INL_MAX_THR"
3303 "&& reload_completed"
3304 [(parallel [(set (match_dup 6) (div:XF (const_int 1) (match_dup 8)))
3305 (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)]
3306 UNSPEC_FR_RECIP_APPROX))
3307 (use (const_int 0))])
3308 (cond_exec (ne (match_dup 5) (const_int 0))
3309 (parallel [(set (match_dup 3)
3310 (minus:XF (match_dup 10)
3311 (mult:XF (match_dup 8) (match_dup 6))))
3312 (use (const_int 1))]))
3313 (cond_exec (ne (match_dup 5) (const_int 0))
3314 (parallel [(set (match_dup 6)
3315 (plus:XF (mult:XF (match_dup 3) (match_dup 6))
3317 (use (const_int 1))]))
3318 (cond_exec (ne (match_dup 5) (const_int 0))
3319 (parallel [(set (match_dup 3)
3320 (mult:XF (match_dup 3) (match_dup 3)))
3321 (use (const_int 1))]))
3322 (cond_exec (ne (match_dup 5) (const_int 0))
3323 (parallel [(set (match_dup 6)
3324 (plus:XF (mult:XF (match_dup 3) (match_dup 6))
3326 (use (const_int 1))]))
3327 (cond_exec (ne (match_dup 5) (const_int 0))
3328 (parallel [(set (match_dup 3)
3329 (mult:XF (match_dup 3) (match_dup 3)))
3330 (use (const_int 1))]))
3331 (cond_exec (ne (match_dup 5) (const_int 0))
3332 (parallel [(set (match_dup 6)
3333 (plus:XF (mult:XF (match_dup 3) (match_dup 6))
3335 (use (const_int 1))]))
3336 (cond_exec (ne (match_dup 5) (const_int 0))
3337 (parallel [(set (match_dup 9)
3339 (mult:XF (match_dup 7) (match_dup 6))))
3340 (use (const_int 1))]))
3341 (cond_exec (ne (match_dup 5) (const_int 0))
3342 (parallel [(set (match_dup 4)
3343 (minus:DF (match_dup 1)
3344 (mult:DF (match_dup 2) (match_dup 9))))
3345 (use (const_int 1))]))
3346 (cond_exec (ne (match_dup 5) (const_int 0))
3348 (plus:DF (mult:DF (match_dup 4) (match_dup 0))
3352 operands[6] = gen_rtx_REG (XFmode, REGNO (operands[0]));
3353 operands[7] = gen_rtx_REG (XFmode, REGNO (operands[1]));
3354 operands[8] = gen_rtx_REG (XFmode, REGNO (operands[2]));
3355 operands[9] = gen_rtx_REG (DFmode, REGNO (operands[3]));
3356 operands[10] = CONST1_RTX (XFmode);
3358 [(set_attr "predicable" "no")])
3360 ;; Inline square root.
3362 (define_expand "sqrtdf2"
3363 [(set (match_operand:DF 0 "fr_register_operand" "=&f")
3364 (sqrt:DF (match_operand:DF 1 "fr_register_operand" "f")))]
3365 "TARGET_INLINE_SQRT"
3369 if (TARGET_INLINE_SQRT == INL_MIN_LAT)
3370 insn = gen_sqrtdf2_internal_lat (operands[0], operands[1]);
3373 gcc_assert (TARGET_INLINE_SQRT != INL_MIN_LAT);
3375 insn = gen_sqrtdf2_internal_thr (operands[0], operands[1]);
3380 ;; Latency-optimized square root.
3381 ;; FIXME: Implement.
3383 ;; Throughput-optimized square root.
3385 (define_insn_and_split "sqrtdf2_internal_thr"
3386 [(set (match_operand:DF 0 "fr_register_operand" "=&f")
3387 (sqrt:DF (match_operand:DF 1 "fr_register_operand" "f")))
3388 ;; Register r2 in optimization guide.
3389 (clobber (match_scratch:DI 2 "=r"))
3390 ;; Register f8 in optimization guide
3391 (clobber (match_scratch:XF 3 "=&f"))
3392 ;; Register f9 in optimization guide
3393 (clobber (match_scratch:XF 4 "=&f"))
3394 ;; Register f10 in optimization guide
3395 (clobber (match_scratch:XF 5 "=&f"))
3396 ;; Register p6 in optimization guide.
3397 (clobber (match_scratch:BI 6 "=c"))]
3398 "TARGET_INLINE_SQRT == INL_MAX_THR"
3400 "&& reload_completed"
3401 [ ;; exponent of +1/2 in r2
3402 (set (match_dup 2) (const_int 65534))
3405 (unspec:XF [(match_dup 2)] UNSPEC_SETF_EXP))
3407 ;; y0 = 1/sqrt(a) in f7
3408 (parallel [(set (match_dup 7)
3409 (div:XF (const_int 1)
3410 (sqrt:XF (match_dup 8))))
3412 (unspec:BI [(match_dup 8)]
3413 UNSPEC_FR_SQRT_RECIP_APPROX))
3414 (use (const_int 0))])
3416 ;; H0 = 1/2 * y0 in f8
3417 (cond_exec (ne (match_dup 6) (const_int 0))
3418 (parallel [(set (match_dup 3)
3419 (plus:XF (mult:XF (match_dup 5) (match_dup 7))
3421 (use (const_int 1))]))
3423 ;; G0 = a * y0 in f7
3424 (cond_exec (ne (match_dup 6) (const_int 0))
3425 (parallel [(set (match_dup 7)
3426 (plus:XF (mult:XF (match_dup 8) (match_dup 7))
3428 (use (const_int 1))]))
3430 ;; r0 = 1/2 - G0 * H0 in f9
3431 (cond_exec (ne (match_dup 6) (const_int 0))
3432 (parallel [(set (match_dup 4)
3433 (minus:XF (match_dup 5)
3434 (mult:XF (match_dup 7) (match_dup 3))))
3435 (use (const_int 1))]))
3437 ;; H1 = H0 + r0 * H0 in f8
3438 (cond_exec (ne (match_dup 6) (const_int 0))
3439 (parallel [(set (match_dup 3)
3440 (plus:XF (mult:XF (match_dup 4) (match_dup 3))
3442 (use (const_int 1))]))
3444 ;; G1 = G0 + r0 * G0 in f7
3445 (cond_exec (ne (match_dup 6) (const_int 0))
3446 (parallel [(set (match_dup 7)
3447 (plus:XF (mult:XF (match_dup 4) (match_dup 7))
3449 (use (const_int 1))]))
3451 ;; r1 = 1/2 - G1 * H1 in f9
3452 (cond_exec (ne (match_dup 6) (const_int 0))
3453 (parallel [(set (match_dup 4)
3454 (minus:XF (match_dup 5)
3455 (mult:XF (match_dup 7) (match_dup 3))))
3456 (use (const_int 1))]))
3458 ;; H2 = H1 + r1 * H1 in f8
3459 (cond_exec (ne (match_dup 6) (const_int 0))
3460 (parallel [(set (match_dup 3)
3461 (plus:XF (mult:XF (match_dup 4) (match_dup 3))
3463 (use (const_int 1))]))
3465 ;; G2 = G1 + r1 * G1 in f7
3466 (cond_exec (ne (match_dup 6) (const_int 0))
3467 (parallel [(set (match_dup 7)
3468 (plus:XF (mult:XF (match_dup 4) (match_dup 7))
3470 (use (const_int 1))]))
3472 ;; d2 = a - G2 * G2 in f9
3473 (cond_exec (ne (match_dup 6) (const_int 0))
3474 (parallel [(set (match_dup 4)
3475 (minus:XF (match_dup 8)
3476 (mult:XF (match_dup 7) (match_dup 7))))
3477 (use (const_int 1))]))
3479 ;; G3 = G2 + d2 * H2 in f7
3480 (cond_exec (ne (match_dup 6) (const_int 0))
3481 (parallel [(set (match_dup 7)
3482 (plus:XF (mult:XF (match_dup 4) (match_dup 3))
3484 (use (const_int 1))]))
3486 ;; d3 = a - G3 * G3 in f9
3487 (cond_exec (ne (match_dup 6) (const_int 0))
3488 (parallel [(set (match_dup 4)
3489 (minus:XF (match_dup 8)
3490 (mult:XF (match_dup 7) (match_dup 7))))
3491 (use (const_int 1))]))
3493 ;; S = G3 + d3 * H2 in f7
3494 (cond_exec (ne (match_dup 6) (const_int 0))
3495 (parallel [(set (match_dup 0)
3497 (plus:XF (mult:XF (match_dup 4) (match_dup 3))
3499 (use (const_int 0))]))]
3501 /* Generate 82-bit versions of the input and output operands. */
3502 operands[7] = gen_rtx_REG (XFmode, REGNO (operands[0]));
3503 operands[8] = gen_rtx_REG (XFmode, REGNO (operands[1]));
3504 /* Generate required floating-point constants. */
3505 operands[9] = CONST0_RTX (XFmode);
3507 [(set_attr "predicable" "no")])
3509 ;; ::::::::::::::::::::
3511 ;; :: 80 bit floating point arithmetic
3513 ;; ::::::::::::::::::::
3515 (define_insn "addxf3"
3516 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3517 (plus:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3518 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")))]
3520 "fadd %0 = %F1, %F2"
3521 [(set_attr "itanium_class" "fmac")])
3523 (define_insn "*addxf3_truncsf"
3524 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3526 (plus:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3527 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))))]
3529 "fadd.s %0 = %F1, %F2"
3530 [(set_attr "itanium_class" "fmac")])
3532 (define_insn "*addxf3_truncdf"
3533 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3535 (plus:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3536 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))))]
3538 "fadd.d %0 = %F1, %F2"
3539 [(set_attr "itanium_class" "fmac")])
3541 (define_insn "subxf3"
3542 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3543 (minus:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3544 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")))]
3546 "fsub %0 = %F1, %F2"
3547 [(set_attr "itanium_class" "fmac")])
3549 (define_insn "*subxf3_truncsf"
3550 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3552 (minus:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3553 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))))]
3555 "fsub.s %0 = %F1, %F2"
3556 [(set_attr "itanium_class" "fmac")])
3558 (define_insn "*subxf3_truncdf"
3559 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3561 (minus:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3562 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))))]
3564 "fsub.d %0 = %F1, %F2"
3565 [(set_attr "itanium_class" "fmac")])
3567 (define_insn "mulxf3"
3568 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3569 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3570 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")))]
3572 "fmpy %0 = %F1, %F2"
3573 [(set_attr "itanium_class" "fmac")])
3575 (define_insn "*mulxf3_truncsf"
3576 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3578 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3579 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))))]
3581 "fmpy.s %0 = %F1, %F2"
3582 [(set_attr "itanium_class" "fmac")])
3584 (define_insn "*mulxf3_truncdf"
3585 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3587 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3588 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))))]
3590 "fmpy.d %0 = %F1, %F2"
3591 [(set_attr "itanium_class" "fmac")])
3593 (define_insn "*mulxf3_alts"
3594 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3595 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3596 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")))
3597 (use (match_operand:SI 3 "const_int_operand" ""))]
3599 "fmpy.s%3 %0 = %F1, %F2"
3600 [(set_attr "itanium_class" "fmac")])
3602 (define_insn "*mulxf3_truncsf_alts"
3603 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3605 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3606 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))))
3607 (use (match_operand:SI 3 "const_int_operand" ""))]
3609 "fmpy.s.s%3 %0 = %F1, %F2"
3610 [(set_attr "itanium_class" "fmac")])
3612 (define_insn "*mulxf3_truncdf_alts"
3613 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3615 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3616 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))))
3617 (use (match_operand:SI 3 "const_int_operand" ""))]
3619 "fmpy.d.s%3 %0 = %F1, %F2"
3620 [(set_attr "itanium_class" "fmac")])
3622 (define_insn "absxf2"
3623 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3624 (abs:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")))]
3627 [(set_attr "itanium_class" "fmisc")])
3629 (define_insn "negxf2"
3630 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3631 (neg:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")))]
3634 [(set_attr "itanium_class" "fmisc")])
3636 (define_insn "*nabsxf2"
3637 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3638 (neg:XF (abs:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG"))))]
3641 [(set_attr "itanium_class" "fmisc")])
3643 (define_insn "copysignxf3"
3644 [(set (match_operand:XF 0 "register_operand" "=f")
3645 (unspec:XF [(match_operand:XF 1 "fr_reg_or_fp01_operand" "fG")
3646 (match_operand:XF 2 "fr_reg_or_fp01_operand" "fG")]
3649 "fmerge.s %0 = %F2, %F1"
3650 [(set_attr "itanium_class" "fmisc")])
3652 (define_insn "*ncopysignxf3"
3653 [(set (match_operand:XF 0 "register_operand" "=f")
3654 (neg:XF (unspec:XF [(match_operand:XF 1 "fr_reg_or_fp01_operand" "fG")
3655 (match_operand:XF 2 "fr_reg_or_fp01_operand" "fG")]
3658 "fmerge.ns %0 = %F2, %F1"
3659 [(set_attr "itanium_class" "fmisc")])
3661 (define_insn "sminxf3"
3662 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3663 (smin:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3664 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")))]
3666 "fmin %0 = %F1, %F2"
3667 [(set_attr "itanium_class" "fmisc")])
3669 (define_insn "smaxxf3"
3670 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3671 (smax:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3672 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")))]
3674 "fmax %0 = %F1, %F2"
3675 [(set_attr "itanium_class" "fmisc")])
3677 (define_insn "*maddxf4"
3678 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3679 (plus:XF (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3680 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))
3681 (match_operand:XF 3 "xfreg_or_fp01_operand" "fG")))]
3683 "fma %0 = %F1, %F2, %F3"
3684 [(set_attr "itanium_class" "fmac")])
3686 (define_insn "*maddxf4_truncsf"
3687 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3689 (plus:XF (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3690 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))
3691 (match_operand:XF 3 "xfreg_or_fp01_operand" "fG"))))]
3693 "fma.s %0 = %F1, %F2, %F3"
3694 [(set_attr "itanium_class" "fmac")])
3696 (define_insn "*maddxf4_truncdf"
3697 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3699 (plus:XF (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3700 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))
3701 (match_operand:XF 3 "xfreg_or_fp01_operand" "fG"))))]
3703 "fma.d %0 = %F1, %F2, %F3"
3704 [(set_attr "itanium_class" "fmac")])
3706 (define_insn "*maddxf4_alts"
3707 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3708 (plus:XF (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3709 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))
3710 (match_operand:XF 3 "xfreg_or_fp01_operand" "fG")))
3711 (use (match_operand:SI 4 "const_int_operand" ""))]
3713 "fma.s%4 %0 = %F1, %F2, %F3"
3714 [(set_attr "itanium_class" "fmac")])
3716 (define_insn "*maddxf4_alts_truncsf"
3717 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3719 (plus:XF (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3720 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))
3721 (match_operand:XF 3 "xfreg_or_fp01_operand" "fG"))))
3722 (use (match_operand:SI 4 "const_int_operand" ""))]
3724 "fma.s.s%4 %0 = %F1, %F2, %F3"
3725 [(set_attr "itanium_class" "fmac")])
3727 (define_insn "*maddxf4_alts_truncdf"
3728 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3730 (plus:XF (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3731 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))
3732 (match_operand:XF 3 "xfreg_or_fp01_operand" "fG"))))
3733 (use (match_operand:SI 4 "const_int_operand" ""))]
3735 "fma.d.s%4 %0 = %F1, %F2, %F3"
3736 [(set_attr "itanium_class" "fmac")])
3738 (define_insn "*msubxf4"
3739 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3740 (minus:XF (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3741 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))
3742 (match_operand:XF 3 "xfreg_or_fp01_operand" "fG")))]
3744 "fms %0 = %F1, %F2, %F3"
3745 [(set_attr "itanium_class" "fmac")])
3747 (define_insn "*msubxf4_truncsf"
3748 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3750 (minus:XF (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3751 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))
3752 (match_operand:XF 3 "xfreg_or_fp01_operand" "fG"))))]
3754 "fms.s %0 = %F1, %F2, %F3"
3755 [(set_attr "itanium_class" "fmac")])
3757 (define_insn "*msubxf4_truncdf"
3758 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3760 (minus:XF (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3761 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))
3762 (match_operand:XF 3 "xfreg_or_fp01_operand" "fG"))))]
3764 "fms.d %0 = %F1, %F2, %F3"
3765 [(set_attr "itanium_class" "fmac")])
3767 (define_insn "*nmulxf3"
3768 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3769 (neg:XF (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3770 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG"))))]
3772 "fnmpy %0 = %F1, %F2"
3773 [(set_attr "itanium_class" "fmac")])
3775 (define_insn "*nmulxf3_truncsf"
3776 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3779 (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3780 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")))))]
3782 "fnmpy.s %0 = %F1, %F2"
3783 [(set_attr "itanium_class" "fmac")])
3785 (define_insn "*nmulxf3_truncdf"
3786 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3789 (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3790 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")))))]
3792 "fnmpy.d %0 = %F1, %F2"
3793 [(set_attr "itanium_class" "fmac")])
3795 (define_insn "*nmaddxf4"
3796 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3797 (minus:XF (match_operand:XF 3 "xfreg_or_fp01_operand" "fG")
3798 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3799 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")
3802 "fnma %0 = %F1, %F2, %F3"
3803 [(set_attr "itanium_class" "fmac")])
3805 (define_insn "*nmaddxf4_truncsf"
3806 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3808 (minus:XF (match_operand:XF 3 "xfreg_or_fp01_operand" "fG")
3809 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3810 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")
3813 "fnma.s %0 = %F1, %F2, %F3"
3814 [(set_attr "itanium_class" "fmac")])
3816 (define_insn "*nmaddxf4_truncdf"
3817 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3819 (minus:XF (match_operand:XF 3 "xfreg_or_fp01_operand" "fG")
3820 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3821 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")
3824 "fnma.d %0 = %F1, %F2, %F3"
3825 [(set_attr "itanium_class" "fmac")])
3827 (define_insn "*nmaddxf4_alts"
3828 [(set (match_operand:XF 0 "fr_register_operand" "=f")
3829 (minus:XF (match_operand:XF 3 "xfreg_or_fp01_operand" "fG")
3830 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3831 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")
3833 (use (match_operand:SI 4 "const_int_operand" ""))]
3835 "fnma.s%4 %0 = %F1, %F2, %F3"
3836 [(set_attr "itanium_class" "fmac")])
3838 (define_insn "*nmaddxf4_truncsf_alts"
3839 [(set (match_operand:SF 0 "fr_register_operand" "=f")
3841 (minus:XF (match_operand:XF 3 "xfreg_or_fp01_operand" "fG")
3842 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3843 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")
3845 (use (match_operand:SI 4 "const_int_operand" ""))]
3847 "fnma.s.s%4 %0 = %F1, %F2, %F3"
3848 [(set_attr "itanium_class" "fmac")])
3850 (define_insn "*nmaddxf4_truncdf_alts"
3851 [(set (match_operand:DF 0 "fr_register_operand" "=f")
3853 (minus:XF (match_operand:XF 3 "xfreg_or_fp01_operand" "fG")
3854 (mult:XF (match_operand:XF 1 "xfreg_or_fp01_operand" "fG")
3855 (match_operand:XF 2 "xfreg_or_fp01_operand" "fG")
3857 (use (match_operand:SI 4 "const_int_operand" ""))]
3859 "fnma.d.s%4 %0 = %F1, %F2, %F3"
3860 [(set_attr "itanium_class" "fmac")])
3862 (define_expand "divxf3"
3863 [(set (match_operand:XF 0 "fr_register_operand" "")
3864 (div:XF (match_operand:XF 1 "fr_register_operand" "")
3865 (match_operand:XF 2 "fr_register_operand" "")))]
3866 "TARGET_INLINE_FLOAT_DIV"
3869 if (TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT)
3870 insn = gen_divxf3_internal_lat (operands[0], operands[1], operands[2]);
3872 insn = gen_divxf3_internal_thr (operands[0], operands[1], operands[2]);
3877 (define_insn_and_split "divxf3_internal_lat"
3878 [(set (match_operand:XF 0 "fr_register_operand" "=&f")
3879 (div:XF (match_operand:XF 1 "fr_register_operand" "f")
3880 (match_operand:XF 2 "fr_register_operand" "f")))
3881 (clobber (match_scratch:XF 3 "=&f"))
3882 (clobber (match_scratch:XF 4 "=&f"))
3883 (clobber (match_scratch:XF 5 "=&f"))
3884 (clobber (match_scratch:XF 6 "=&f"))
3885 (clobber (match_scratch:BI 7 "=c"))]
3886 "TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT"
3888 "&& reload_completed"
3889 [(parallel [(set (match_dup 0) (div:XF (const_int 1) (match_dup 2)))
3890 (set (match_dup 7) (unspec:BI [(match_dup 1) (match_dup 2)]
3891 UNSPEC_FR_RECIP_APPROX))
3892 (use (const_int 0))])
3893 (cond_exec (ne (match_dup 7) (const_int 0))
3894 (parallel [(set (match_dup 3)
3895 (minus:XF (match_dup 8)
3896 (mult:XF (match_dup 2) (match_dup 0))))
3897 (use (const_int 1))]))
3898 (cond_exec (ne (match_dup 7) (const_int 0))
3899 (parallel [(set (match_dup 4) (mult:XF (match_dup 1) (match_dup 0)))
3900 (use (const_int 1))]))
3901 (cond_exec (ne (match_dup 7) (const_int 0))
3902 (parallel [(set (match_dup 5) (mult:XF (match_dup 3) (match_dup 3)))
3903 (use (const_int 1))]))
3904 (cond_exec (ne (match_dup 7) (const_int 0))
3905 (parallel [(set (match_dup 6)
3906 (plus:XF (mult:XF (match_dup 3) (match_dup 3))
3908 (use (const_int 1))]))
3909 (cond_exec (ne (match_dup 7) (const_int 0))
3910 (parallel [(set (match_dup 3)
3911 (plus:XF (mult:XF (match_dup 5) (match_dup 5))
3913 (use (const_int 1))]))
3914 (cond_exec (ne (match_dup 7) (const_int 0))
3915 (parallel [(set (match_dup 5)
3916 (plus:XF (mult:XF (match_dup 6) (match_dup 0))
3918 (use (const_int 1))]))
3919 (cond_exec (ne (match_dup 7) (const_int 0))
3920 (parallel [(set (match_dup 0)
3921 (plus:XF (mult:XF (match_dup 5) (match_dup 3))
3923 (use (const_int 1))]))
3924 (cond_exec (ne (match_dup 7) (const_int 0))
3925 (parallel [(set (match_dup 4)
3926 (minus:XF (match_dup 1)
3927 (mult:XF (match_dup 2) (match_dup 4))))
3928 (use (const_int 1))]))
3929 (cond_exec (ne (match_dup 7) (const_int 0))
3930 (parallel [(set (match_dup 3)
3931 (plus:XF (mult:XF (match_dup 3) (match_dup 0))
3933 (use (const_int 1))]))
3934 (cond_exec (ne (match_dup 7) (const_int 0))
3935 (parallel [(set (match_dup 5)
3936 (minus:XF (match_dup 8)
3937 (mult:XF (match_dup 2) (match_dup 0))))
3938 (use (const_int 1))]))
3939 (cond_exec (ne (match_dup 7) (const_int 0))
3940 (parallel [(set (match_dup 0)
3941 (plus:XF (mult:XF (match_dup 4) (match_dup 0))
3943 (use (const_int 1))]))
3944 (cond_exec (ne (match_dup 7) (const_int 0))
3945 (parallel [(set (match_dup 4)
3946 (minus:XF (match_dup 1)
3947 (mult:XF (match_dup 2) (match_dup 3))))
3948 (use (const_int 1))]))
3949 (cond_exec (ne (match_dup 7) (const_int 0))
3951 (plus:XF (mult:XF (match_dup 4) (match_dup 0))
3954 "operands[8] = CONST1_RTX (XFmode);"
3955 [(set_attr "predicable" "no")])
3957 (define_insn_and_split "divxf3_internal_thr"
3958 [(set (match_operand:XF 0 "fr_register_operand" "=&f")
3959 (div:XF (match_operand:XF 1 "fr_register_operand" "f")
3960 (match_operand:XF 2 "fr_register_operand" "f")))
3961 (clobber (match_scratch:XF 3 "=&f"))
3962 (clobber (match_scratch:XF 4 "=&f"))
3963 (clobber (match_scratch:BI 5 "=c"))]
3964 "TARGET_INLINE_FLOAT_DIV == INL_MAX_THR"
3966 "&& reload_completed"
3967 [(parallel [(set (match_dup 0) (div:XF (const_int 1) (match_dup 2)))
3968 (set (match_dup 5) (unspec:BI [(match_dup 1) (match_dup 2)]
3969 UNSPEC_FR_RECIP_APPROX))
3970 (use (const_int 0))])
3971 (cond_exec (ne (match_dup 5) (const_int 0))
3972 (parallel [(set (match_dup 3)
3973 (minus:XF (match_dup 6)
3974 (mult:XF (match_dup 2) (match_dup 0))))
3975 (use (const_int 1))]))
3976 (cond_exec (ne (match_dup 5) (const_int 0))
3977 (parallel [(set (match_dup 4)
3978 (plus:XF (mult:XF (match_dup 3) (match_dup 0))
3980 (use (const_int 1))]))
3981 (cond_exec (ne (match_dup 5) (const_int 0))
3982 (parallel [(set (match_dup 3) (mult:XF (match_dup 3) (match_dup 3)))
3983 (use (const_int 1))]))
3984 (cond_exec (ne (match_dup 5) (const_int 0))
3985 (parallel [(set (match_dup 3)
3986 (plus:XF (mult:XF (match_dup 3) (match_dup 4))
3988 (use (const_int 1))]))
3989 (cond_exec (ne (match_dup 5) (const_int 0))
3990 (parallel [(set (match_dup 4) (mult:XF (match_dup 1) (match_dup 0)))
3991 (use (const_int 1))]))
3992 (cond_exec (ne (match_dup 5) (const_int 0))
3993 (parallel [(set (match_dup 0)
3994 (minus:XF (match_dup 6)
3995 (mult:XF (match_dup 2) (match_dup 3))))
3996 (use (const_int 1))]))
3997 (cond_exec (ne (match_dup 5) (const_int 0))
3998 (parallel [(set (match_dup 0)
3999 (plus:XF (mult:XF (match_dup 0) (match_dup 3))
4001 (use (const_int 1))]))
4002 (cond_exec (ne (match_dup 5) (const_int 0))
4003 (parallel [(set (match_dup 3)
4004 (minus:XF (match_dup 1)
4005 (mult:XF (match_dup 2) (match_dup 4))))
4006 (use (const_int 1))]))
4007 (cond_exec (ne (match_dup 5) (const_int 0))
4008 (parallel [(set (match_dup 3)
4009 (plus:XF (mult:XF (match_dup 3) (match_dup 0))
4011 (use (const_int 1))]))
4012 (cond_exec (ne (match_dup 5) (const_int 0))
4013 (parallel [(set (match_dup 4)
4014 (minus:XF (match_dup 6)
4015 (mult:XF (match_dup 2) (match_dup 0))))
4016 (use (const_int 1))]))
4017 (cond_exec (ne (match_dup 5) (const_int 0))
4018 (parallel [(set (match_dup 0)
4019 (plus:XF (mult:XF (match_dup 4) (match_dup 0))
4021 (use (const_int 1))]))
4022 (cond_exec (ne (match_dup 5) (const_int 0))
4023 (parallel [(set (match_dup 4)
4024 (minus:XF (match_dup 1)
4025 (mult:XF (match_dup 2) (match_dup 3))))
4026 (use (const_int 1))]))
4027 (cond_exec (ne (match_dup 5) (const_int 0))
4029 (plus:XF (mult:XF (match_dup 4) (match_dup 0))
4032 "operands[6] = CONST1_RTX (XFmode);"
4033 [(set_attr "predicable" "no")])
4035 ;; Inline square root.
4037 (define_expand "sqrtxf2"
4038 [(set (match_operand:XF 0 "fr_register_operand" "=&f")
4039 (sqrt:XF (match_operand:XF 1 "fr_register_operand" "f")))]
4040 "TARGET_INLINE_SQRT"
4044 if (TARGET_INLINE_SQRT == INL_MIN_LAT)
4045 insn = gen_sqrtxf2_internal_lat (operands[0], operands[1]);
4048 gcc_assert (TARGET_INLINE_SQRT != INL_MIN_LAT);
4050 insn = gen_sqrtxf2_internal_thr (operands[0], operands[1]);
4055 ;; Latency-optimized square root.
4056 ;; FIXME: Implement.
4058 ;; Throughput-optimized square root.
4060 (define_insn_and_split "sqrtxf2_internal_thr"
4061 [(set (match_operand:XF 0 "fr_register_operand" "=&f")
4062 (sqrt:XF (match_operand:XF 1 "fr_register_operand" "f")))
4063 ;; Register r2 in optimization guide.
4064 (clobber (match_scratch:DI 2 "=r"))
4065 ;; Register f8 in optimization guide
4066 (clobber (match_scratch:XF 3 "=&f"))
4067 ;; Register f9 in optimization guide
4068 (clobber (match_scratch:XF 4 "=&f"))
4069 ;; Register f10 in optimization guide
4070 (clobber (match_scratch:XF 5 "=&f"))
4071 ;; Register f11 in optimization guide
4072 (clobber (match_scratch:XF 6 "=&f"))
4073 ;; Register p6 in optimization guide.
4074 (clobber (match_scratch:BI 7 "=c"))]
4075 "TARGET_INLINE_SQRT == INL_MAX_THR"
4077 "&& reload_completed"
4078 [ ;; exponent of +1/2 in r2
4079 (set (match_dup 2) (const_int 65534))
4080 ;; +1/2 in f8. The Intel manual mistakenly specifies f10.
4082 (unspec:XF [(match_dup 2)] UNSPEC_SETF_EXP))
4084 ;; y0 = 1/sqrt(a) in f7
4085 (parallel [(set (match_dup 8)
4086 (div:XF (const_int 1)
4087 (sqrt:XF (match_dup 9))))
4089 (unspec:BI [(match_dup 9)]
4090 UNSPEC_FR_SQRT_RECIP_APPROX))
4091 (use (const_int 0))])
4093 ;; H0 = 1/2 * y0 in f9
4094 (cond_exec (ne (match_dup 7) (const_int 0))
4095 (parallel [(set (match_dup 4)
4096 (plus:XF (mult:XF (match_dup 3) (match_dup 8))
4098 (use (const_int 1))]))
4100 ;; S0 = a * y0 in f7
4101 (cond_exec (ne (match_dup 7) (const_int 0))
4102 (parallel [(set (match_dup 8)
4103 (plus:XF (mult:XF (match_dup 9) (match_dup 8))
4105 (use (const_int 1))]))
4107 ;; d0 = 1/2 - S0 * H0 in f10
4108 (cond_exec (ne (match_dup 7) (const_int 0))
4109 (parallel [(set (match_dup 5)
4110 (minus:XF (match_dup 3)
4111 (mult:XF (match_dup 8) (match_dup 4))))
4112 (use (const_int 1))]))
4114 ;; H1 = H0 + d0 * H0 in f9
4115 (cond_exec (ne (match_dup 7) (const_int 0))
4116 (parallel [(set (match_dup 4)
4117 (plus:XF (mult:XF (match_dup 5) (match_dup 4))
4119 (use (const_int 1))]))
4121 ;; S1 = S0 + d0 * S0 in f7
4122 (cond_exec (ne (match_dup 7) (const_int 0))
4123 (parallel [(set (match_dup 8)
4124 (plus:XF (mult:XF (match_dup 5) (match_dup 8))
4126 (use (const_int 1))]))
4128 ;; d1 = 1/2 - S1 * H1 in f10
4129 (cond_exec (ne (match_dup 7) (const_int 0))
4130 (parallel [(set (match_dup 5)
4131 (minus:XF (match_dup 3)
4132 (mult:XF (match_dup 8) (match_dup 4))))
4133 (use (const_int 1))]))
4135 ;; H2 = H1 + d1 * H1 in f9
4136 (cond_exec (ne (match_dup 7) (const_int 0))
4137 (parallel [(set (match_dup 4)
4138 (plus:XF (mult:XF (match_dup 5) (match_dup 4))
4140 (use (const_int 1))]))
4142 ;; S2 = S1 + d1 * S1 in f7
4143 (cond_exec (ne (match_dup 7) (const_int 0))
4144 (parallel [(set (match_dup 8)
4145 (plus:XF (mult:XF (match_dup 5) (match_dup 8))
4147 (use (const_int 1))]))
4149 ;; d2 = 1/2 - S2 * H2 in f10
4150 (cond_exec (ne (match_dup 7) (const_int 0))
4151 (parallel [(set (match_dup 5)
4152 (minus:XF (match_dup 3)
4153 (mult:XF (match_dup 8) (match_dup 4))))
4154 (use (const_int 1))]))
4156 ;; e2 = a - S2 * S2 in f8
4157 (cond_exec (ne (match_dup 7) (const_int 0))
4158 (parallel [(set (match_dup 3)
4159 (minus:XF (match_dup 9)
4160 (mult:XF (match_dup 8) (match_dup 8))))
4161 (use (const_int 1))]))
4163 ;; S3 = S2 + e2 * H2 in f7
4164 (cond_exec (ne (match_dup 7) (const_int 0))
4165 (parallel [(set (match_dup 8)
4166 (plus:XF (mult:XF (match_dup 3) (match_dup 4))
4168 (use (const_int 1))]))
4170 ;; H3 = H2 + d2 * H2 in f9
4171 (cond_exec (ne (match_dup 7) (const_int 0))
4172 (parallel [(set (match_dup 4)
4173 (plus:XF (mult:XF (match_dup 5) (match_dup 4))
4175 (use (const_int 1))]))
4177 ;; e3 = a - S3 * S3 in f8
4178 (cond_exec (ne (match_dup 7) (const_int 0))
4179 (parallel [(set (match_dup 3)
4180 (minus:XF (match_dup 9)
4181 (mult:XF (match_dup 8) (match_dup 8))))
4182 (use (const_int 1))]))
4184 ;; S = S3 + e3 * H3 in f7
4185 (cond_exec (ne (match_dup 7) (const_int 0))
4186 (parallel [(set (match_dup 0)
4187 (plus:XF (mult:XF (match_dup 3) (match_dup 4))
4189 (use (const_int 0))]))]
4191 /* Generate 82-bit versions of the input and output operands. */
4192 operands[8] = gen_rtx_REG (XFmode, REGNO (operands[0]));
4193 operands[9] = gen_rtx_REG (XFmode, REGNO (operands[1]));
4194 /* Generate required floating-point constants. */
4195 operands[10] = CONST0_RTX (XFmode);
4197 [(set_attr "predicable" "no")])
4199 ;; ??? frcpa works like cmp.foo.unc.
4201 (define_insn "*recip_approx"
4202 [(set (match_operand:XF 0 "fr_register_operand" "=f")
4203 (div:XF (const_int 1)
4204 (match_operand:XF 3 "fr_register_operand" "f")))
4205 (set (match_operand:BI 1 "register_operand" "=c")
4206 (unspec:BI [(match_operand:XF 2 "fr_register_operand" "f")
4207 (match_dup 3)] UNSPEC_FR_RECIP_APPROX))
4208 (use (match_operand:SI 4 "const_int_operand" ""))]
4210 "frcpa.s%4 %0, %1 = %2, %3"
4211 [(set_attr "itanium_class" "fmisc")
4212 (set_attr "predicable" "no")])
4214 ;; ::::::::::::::::::::
4216 ;; :: 32 bit Integer Shifts and Rotates
4218 ;; ::::::::::::::::::::
4220 (define_expand "ashlsi3"
4221 [(set (match_operand:SI 0 "gr_register_operand" "")
4222 (ashift:SI (match_operand:SI 1 "gr_register_operand" "")
4223 (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))]
4226 if (GET_CODE (operands[2]) != CONST_INT)
4228 /* Why oh why didn't Intel arrange for SHIFT_COUNT_TRUNCATED? Now
4229 we've got to get rid of stray bits outside the SImode register. */
4230 rtx subshift = gen_reg_rtx (DImode);
4231 emit_insn (gen_zero_extendsidi2 (subshift, operands[2]));
4232 operands[2] = subshift;
4236 (define_insn "*ashlsi3_internal"
4237 [(set (match_operand:SI 0 "gr_register_operand" "=r,r,r")
4238 (ashift:SI (match_operand:SI 1 "gr_register_operand" "r,r,r")
4239 (match_operand:DI 2 "gr_reg_or_5bit_operand" "R,n,r")))]
4242 shladd %0 = %1, %2, r0
4243 dep.z %0 = %1, %2, %E2
4245 [(set_attr "itanium_class" "ialu,ishf,mmshf")])
4247 (define_expand "ashrsi3"
4248 [(set (match_operand:SI 0 "gr_register_operand" "")
4249 (ashiftrt:SI (match_operand:SI 1 "gr_register_operand" "")
4250 (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))]
4253 rtx subtarget = gen_reg_rtx (DImode);
4254 if (GET_CODE (operands[2]) == CONST_INT)
4255 emit_insn (gen_extv (subtarget, gen_lowpart (DImode, operands[1]),
4256 GEN_INT (32 - INTVAL (operands[2])), operands[2]));
4259 rtx subshift = gen_reg_rtx (DImode);
4260 emit_insn (gen_extendsidi2 (subtarget, operands[1]));
4261 emit_insn (gen_zero_extendsidi2 (subshift, operands[2]));
4262 emit_insn (gen_ashrdi3 (subtarget, subtarget, subshift));
4264 emit_move_insn (gen_lowpart (DImode, operands[0]), subtarget);
4268 (define_expand "lshrsi3"
4269 [(set (match_operand:SI 0 "gr_register_operand" "")
4270 (lshiftrt:SI (match_operand:SI 1 "gr_register_operand" "")
4271 (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))]
4274 rtx subtarget = gen_reg_rtx (DImode);
4275 if (GET_CODE (operands[2]) == CONST_INT)
4276 emit_insn (gen_extzv (subtarget, gen_lowpart (DImode, operands[1]),
4277 GEN_INT (32 - INTVAL (operands[2])), operands[2]));
4280 rtx subshift = gen_reg_rtx (DImode);
4281 emit_insn (gen_zero_extendsidi2 (subtarget, operands[1]));
4282 emit_insn (gen_zero_extendsidi2 (subshift, operands[2]));
4283 emit_insn (gen_lshrdi3 (subtarget, subtarget, subshift));
4285 emit_move_insn (gen_lowpart (DImode, operands[0]), subtarget);
4289 ;; Use mix4.r/shr to implement rotrsi3. We only get 32 bits of valid result
4290 ;; here, instead of 64 like the patterns above. Keep the pattern together
4291 ;; until after combine; otherwise it won't get matched often.
4293 (define_expand "rotrsi3"
4294 [(set (match_operand:SI 0 "gr_register_operand" "")
4295 (rotatert:SI (match_operand:SI 1 "gr_register_operand" "")
4296 (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))]
4299 if (GET_MODE (operands[2]) != VOIDmode)
4301 rtx tmp = gen_reg_rtx (DImode);
4302 emit_insn (gen_zero_extendsidi2 (tmp, operands[2]));
4307 (define_insn_and_split "*rotrsi3_internal"
4308 [(set (match_operand:SI 0 "gr_register_operand" "=&r")
4309 (rotatert:SI (match_operand:SI 1 "gr_register_operand" "r")
4310 (match_operand:DI 2 "gr_reg_or_5bit_operand" "rM")))]
4315 (ior:DI (zero_extend:DI (match_dup 1))
4316 (ashift:DI (zero_extend:DI (match_dup 1)) (const_int 32))))
4318 (lshiftrt:DI (match_dup 3) (match_dup 2)))]
4319 "operands[3] = gen_rtx_REG (DImode, REGNO (operands[0]));")
4321 (define_expand "rotlsi3"
4322 [(set (match_operand:SI 0 "gr_register_operand" "")
4323 (rotate:SI (match_operand:SI 1 "gr_register_operand" "")
4324 (match_operand:SI 2 "gr_reg_or_5bit_operand" "")))]
4327 if (! shift_32bit_count_operand (operands[2], SImode))
4329 rtx tmp = gen_reg_rtx (SImode);
4330 emit_insn (gen_subsi3 (tmp, GEN_INT (32), operands[2]));
4331 emit_insn (gen_rotrsi3 (operands[0], operands[1], tmp));
4336 (define_insn_and_split "*rotlsi3_internal"
4337 [(set (match_operand:SI 0 "gr_register_operand" "=r")
4338 (rotate:SI (match_operand:SI 1 "gr_register_operand" "r")
4339 (match_operand:SI 2 "shift_32bit_count_operand" "n")))]
4344 (ior:DI (zero_extend:DI (match_dup 1))
4345 (ashift:DI (zero_extend:DI (match_dup 1)) (const_int 32))))
4347 (lshiftrt:DI (match_dup 3) (match_dup 2)))]
4349 operands[3] = gen_rtx_REG (DImode, REGNO (operands[0]));
4350 operands[2] = GEN_INT (32 - INTVAL (operands[2]));
4353 ;; ::::::::::::::::::::
4355 ;; :: 64 bit Integer Shifts and Rotates
4357 ;; ::::::::::::::::::::
4359 (define_insn "ashldi3"
4360 [(set (match_operand:DI 0 "gr_register_operand" "=r,r,r")
4361 (ashift:DI (match_operand:DI 1 "gr_register_operand" "r,r,r")
4362 (match_operand:DI 2 "gr_reg_or_6bit_operand" "R,r,rM")))]
4365 shladd %0 = %1, %2, r0
4368 [(set_attr "itanium_class" "ialu,mmshf,mmshfi")])
4370 ;; ??? Maybe combine this with the multiply and add instruction?
4372 (define_insn "*shladd"
4373 [(set (match_operand:DI 0 "gr_register_operand" "=r")
4374 (plus:DI (mult:DI (match_operand:DI 1 "gr_register_operand" "r")
4375 (match_operand:DI 2 "shladd_operand" "n"))
4376 (match_operand:DI 3 "gr_register_operand" "r")))]
4378 "shladd %0 = %1, %S2, %3"
4379 [(set_attr "itanium_class" "ialu")])
4381 ;; This can be created by register elimination if operand3 of shladd is an
4382 ;; eliminable register or has reg_equiv_constant set.
4384 ;; We have to use nonmemory_operand for operand 4, to ensure that the
4385 ;; validate_changes call inside eliminate_regs will always succeed. If it
4386 ;; doesn't succeed, then this remain a shladd pattern, and will be reloaded
4389 (define_insn_and_split "*shladd_elim"
4390 [(set (match_operand:DI 0 "gr_register_operand" "=&r")
4391 (plus:DI (plus:DI (mult:DI (match_operand:DI 1 "gr_register_operand" "r")
4392 (match_operand:DI 2 "shladd_operand" "n"))
4393 (match_operand:DI 3 "nonmemory_operand" "r"))
4394 (match_operand:DI 4 "nonmemory_operand" "rI")))]
4395 "reload_in_progress"
4396 "* gcc_unreachable ();"
4398 [(set (match_dup 0) (plus:DI (mult:DI (match_dup 1) (match_dup 2))
4400 (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 4)))]
4402 [(set_attr "itanium_class" "unknown")])
4404 (define_insn "ashrdi3"
4405 [(set (match_operand:DI 0 "gr_register_operand" "=r,r")
4406 (ashiftrt:DI (match_operand:DI 1 "gr_register_operand" "r,r")
4407 (match_operand:DI 2 "gr_reg_or_6bit_operand" "r,rM")))]
4412 [(set_attr "itanium_class" "mmshf,mmshfi")])
4414 (define_insn "lshrdi3"
4415 [(set (match_operand:DI 0 "gr_register_operand" "=r,r")
4416 (lshiftrt:DI (match_operand:DI 1 "gr_register_operand" "r,r")
4417 (match_operand:DI 2 "gr_reg_or_6bit_operand" "r,rM")))]
4422 [(set_attr "itanium_class" "mmshf,mmshfi")])
4424 ;; Using a predicate that accepts only constants doesn't work, because optabs
4425 ;; will load the operand into a register and call the pattern if the predicate
4426 ;; did not accept it on the first try. So we use nonmemory_operand and then
4427 ;; verify that we have an appropriate constant in the expander.
4429 (define_expand "rotrdi3"
4430 [(set (match_operand:DI 0 "gr_register_operand" "")
4431 (rotatert:DI (match_operand:DI 1 "gr_register_operand" "")
4432 (match_operand:DI 2 "nonmemory_operand" "")))]
4435 if (! shift_count_operand (operands[2], DImode))
4439 (define_insn "*rotrdi3_internal"
4440 [(set (match_operand:DI 0 "gr_register_operand" "=r")
4441 (rotatert:DI (match_operand:DI 1 "gr_register_operand" "r")
4442 (match_operand:DI 2 "shift_count_operand" "M")))]
4444 "shrp %0 = %1, %1, %2"
4445 [(set_attr "itanium_class" "ishf")])
4447 (define_expand "rotldi3"
4448 [(set (match_operand:DI 0 "gr_register_operand" "")
4449 (rotate:DI (match_operand:DI 1 "gr_register_operand" "")
4450 (match_operand:DI 2 "nonmemory_operand" "")))]
4453 if (! shift_count_operand (operands[2], DImode))
4457 (define_insn "*rotldi3_internal"
4458 [(set (match_operand:DI 0 "gr_register_operand" "=r")
4459 (rotate:DI (match_operand:DI 1 "gr_register_operand" "r")
4460 (match_operand:DI 2 "shift_count_operand" "M")))]
4462 "shrp %0 = %1, %1, %e2"
4463 [(set_attr "itanium_class" "ishf")])
4465 ;; ::::::::::::::::::::
4467 ;; :: 128 bit Integer Shifts and Rotates
4469 ;; ::::::::::::::::::::
4471 (define_expand "ashlti3"
4472 [(set (match_operand:TI 0 "gr_register_operand" "")
4473 (ashift:TI (match_operand:TI 1 "gr_register_operand" "")
4474 (match_operand:DI 2 "nonmemory_operand" "")))]
4477 if (!dshift_count_operand (operands[2], DImode))
4481 (define_insn_and_split "*ashlti3_internal"
4482 [(set (match_operand:TI 0 "gr_register_operand" "=&r")
4483 (ashift:TI (match_operand:TI 1 "gr_register_operand" "r")
4484 (match_operand:DI 2 "dshift_count_operand" "n")))]
4490 HOST_WIDE_INT shift = INTVAL (operands[2]);
4491 rtx rl = gen_lowpart (DImode, operands[0]);
4492 rtx rh = gen_highpart (DImode, operands[0]);
4493 rtx lo = gen_lowpart (DImode, operands[1]);
4494 rtx shiftlo = GEN_INT (shift & 63);
4498 emit_move_insn (rl, const0_rtx);
4500 emit_insn (gen_ashldi3 (rh, lo, shiftlo));
4502 emit_move_insn (rh, lo);
4506 rtx hi = gen_highpart (DImode, operands[1]);
4508 emit_insn (gen_shrp (rh, hi, lo, GEN_INT (-shift & 63)));
4509 emit_insn (gen_ashldi3 (rl, lo, shiftlo));
4514 (define_expand "ashrti3"
4515 [(set (match_operand:TI 0 "gr_register_operand" "")
4516 (ashiftrt:TI (match_operand:TI 1 "gr_register_operand" "")
4517 (match_operand:DI 2 "nonmemory_operand" "")))]
4520 if (!dshift_count_operand (operands[2], DImode))
4524 (define_insn_and_split "*ashrti3_internal"
4525 [(set (match_operand:TI 0 "gr_register_operand" "=&r")
4526 (ashiftrt:TI (match_operand:TI 1 "gr_register_operand" "r")
4527 (match_operand:DI 2 "dshift_count_operand" "n")))]
4533 HOST_WIDE_INT shift = INTVAL (operands[2]);
4534 rtx rl = gen_lowpart (DImode, operands[0]);
4535 rtx rh = gen_highpart (DImode, operands[0]);
4536 rtx hi = gen_highpart (DImode, operands[1]);
4537 rtx shiftlo = GEN_INT (shift & 63);
4542 emit_insn (gen_ashrdi3 (rl, hi, shiftlo));
4544 emit_move_insn (rl, hi);
4545 emit_insn (gen_ashrdi3 (rh, hi, GEN_INT (63)));
4549 rtx lo = gen_lowpart (DImode, operands[1]);
4551 emit_insn (gen_shrp (rl, hi, lo, shiftlo));
4552 emit_insn (gen_ashrdi3 (rh, hi, shiftlo));
4557 (define_expand "lshrti3"
4558 [(set (match_operand:TI 0 "gr_register_operand" "")
4559 (lshiftrt:TI (match_operand:TI 1 "gr_register_operand" "")
4560 (match_operand:DI 2 "nonmemory_operand" "")))]
4563 if (!dshift_count_operand (operands[2], DImode))
4567 (define_insn_and_split "*lshrti3_internal"
4568 [(set (match_operand:TI 0 "gr_register_operand" "=&r")
4569 (lshiftrt:TI (match_operand:TI 1 "gr_register_operand" "r")
4570 (match_operand:DI 2 "dshift_count_operand" "n")))]
4576 HOST_WIDE_INT shift = INTVAL (operands[2]);
4577 rtx rl = gen_lowpart (DImode, operands[0]);
4578 rtx rh = gen_highpart (DImode, operands[0]);
4579 rtx hi = gen_highpart (DImode, operands[1]);
4580 rtx shiftlo = GEN_INT (shift & 63);
4585 emit_insn (gen_lshrdi3 (rl, hi, shiftlo));
4587 emit_move_insn (rl, hi);
4588 emit_move_insn (rh, const0_rtx);
4592 rtx lo = gen_lowpart (DImode, operands[1]);
4594 emit_insn (gen_shrp (rl, hi, lo, shiftlo));
4595 emit_insn (gen_lshrdi3 (rh, hi, shiftlo));
4601 [(set (match_operand:DI 0 "gr_register_operand" "=r")
4602 (unspec:DI [(match_operand:DI 1 "gr_register_operand" "r")
4603 (match_operand:DI 2 "gr_register_operand" "r")
4604 (match_operand:DI 3 "shift_count_operand" "M")]
4607 "shrp %0 = %1, %2, %3"
4608 [(set_attr "itanium_class" "ishf")])
4610 ;; ::::::::::::::::::::
4612 ;; :: 32 bit Integer Logical operations
4614 ;; ::::::::::::::::::::
4616 ;; We don't seem to need any other 32-bit logical operations, because gcc
4617 ;; generates zero-extend;zero-extend;DImode-op, which combine optimizes to
4618 ;; DImode-op;zero-extend, and then we can optimize away the zero-extend.
4619 ;; This doesn't work for unary logical operations, because we don't call
4620 ;; apply_distributive_law for them.
4622 ;; ??? Likewise, this doesn't work for andnot, which isn't handled by
4623 ;; apply_distributive_law. We get inefficient code for
4624 ;; int sub4 (int i, int j) { return i & ~j; }
4625 ;; We could convert (and (not (sign_extend A)) (sign_extend B)) to
4626 ;; (zero_extend (and (not A) B)) in combine.
4627 ;; Or maybe fix this by adding andsi3/iorsi3/xorsi3 patterns like the
4628 ;; one_cmplsi2 pattern.
4630 (define_insn "one_cmplsi2"
4631 [(set (match_operand:SI 0 "gr_register_operand" "=r")
4632 (not:SI (match_operand:SI 1 "gr_register_operand" "r")))]
4635 [(set_attr "itanium_class" "ilog")])
4637 ;; ::::::::::::::::::::
4639 ;; :: 64 bit Integer Logical operations
4641 ;; ::::::::::::::::::::
4643 (define_insn "anddi3"
4644 [(set (match_operand:DI 0 "grfr_register_operand" "=r,*f")
4645 (and:DI (match_operand:DI 1 "grfr_register_operand" "%r,*f")
4646 (match_operand:DI 2 "grfr_reg_or_8bit_operand" "rK,*f")))]
4651 [(set_attr "itanium_class" "ilog,fmisc")])
4653 (define_insn "*andnot"
4654 [(set (match_operand:DI 0 "grfr_register_operand" "=r,*f")
4655 (and:DI (not:DI (match_operand:DI 1 "grfr_register_operand" "r,*f"))
4656 (match_operand:DI 2 "grfr_reg_or_8bit_operand" "rK,*f")))]
4661 [(set_attr "itanium_class" "ilog,fmisc")])
4663 (define_insn "iordi3"
4664 [(set (match_operand:DI 0 "grfr_register_operand" "=r,*f")
4665 (ior:DI (match_operand:DI 1 "grfr_register_operand" "%r,*f")
4666 (match_operand:DI 2 "grfr_reg_or_8bit_operand" "rK,*f")))]
4671 [(set_attr "itanium_class" "ilog,fmisc")])
4673 (define_insn "xordi3"
4674 [(set (match_operand:DI 0 "grfr_register_operand" "=r,*f")
4675 (xor:DI (match_operand:DI 1 "grfr_register_operand" "%r,*f")
4676 (match_operand:DI 2 "grfr_reg_or_8bit_operand" "rK,*f")))]
4681 [(set_attr "itanium_class" "ilog,fmisc")])
4683 (define_insn "one_cmpldi2"
4684 [(set (match_operand:DI 0 "gr_register_operand" "=r")
4685 (not:DI (match_operand:DI 1 "gr_register_operand" "r")))]
4688 [(set_attr "itanium_class" "ilog")])
4690 ;; ::::::::::::::::::::
4694 ;; ::::::::::::::::::::
4696 (define_expand "cmpbi"
4698 (compare (match_operand:BI 0 "register_operand" "")
4699 (match_operand:BI 1 "const_int_operand" "")))]
4702 ia64_compare_op0 = operands[0];
4703 ia64_compare_op1 = operands[1];
4707 (define_expand "cmpsi"
4709 (compare (match_operand:SI 0 "gr_register_operand" "")
4710 (match_operand:SI 1 "gr_reg_or_8bit_and_adjusted_operand" "")))]
4713 ia64_compare_op0 = operands[0];
4714 ia64_compare_op1 = operands[1];
4718 (define_expand "cmpdi"
4720 (compare (match_operand:DI 0 "gr_register_operand" "")
4721 (match_operand:DI 1 "gr_reg_or_8bit_and_adjusted_operand" "")))]
4724 ia64_compare_op0 = operands[0];
4725 ia64_compare_op1 = operands[1];
4729 (define_expand "cmpsf"
4731 (compare (match_operand:SF 0 "fr_reg_or_fp01_operand" "")
4732 (match_operand:SF 1 "fr_reg_or_fp01_operand" "")))]
4735 ia64_compare_op0 = operands[0];
4736 ia64_compare_op1 = operands[1];
4740 (define_expand "cmpdf"
4742 (compare (match_operand:DF 0 "fr_reg_or_fp01_operand" "")
4743 (match_operand:DF 1 "fr_reg_or_fp01_operand" "")))]
4746 ia64_compare_op0 = operands[0];
4747 ia64_compare_op1 = operands[1];
4751 (define_expand "cmpxf"
4753 (compare (match_operand:XF 0 "xfreg_or_fp01_operand" "")
4754 (match_operand:XF 1 "xfreg_or_fp01_operand" "")))]
4757 ia64_compare_op0 = operands[0];
4758 ia64_compare_op1 = operands[1];
4762 (define_expand "cmptf"
4764 (compare (match_operand:TF 0 "gr_register_operand" "")
4765 (match_operand:TF 1 "gr_register_operand" "")))]
4768 ia64_compare_op0 = operands[0];
4769 ia64_compare_op1 = operands[1];
4773 (define_insn "*cmpsi_normal"
4774 [(set (match_operand:BI 0 "register_operand" "=c")
4775 (match_operator:BI 1 "normal_comparison_operator"
4776 [(match_operand:SI 2 "gr_register_operand" "r")
4777 (match_operand:SI 3 "gr_reg_or_8bit_operand" "rK")]))]
4779 "cmp4.%C1 %0, %I0 = %3, %2"
4780 [(set_attr "itanium_class" "icmp")])
4782 ;; We use %r3 because it is possible for us to match a 0, and two of the
4783 ;; unsigned comparisons don't accept immediate operands of zero.
4785 (define_insn "*cmpsi_adjusted"
4786 [(set (match_operand:BI 0 "register_operand" "=c")
4787 (match_operator:BI 1 "adjusted_comparison_operator"
4788 [(match_operand:SI 2 "gr_register_operand" "r")
4789 (match_operand:SI 3 "gr_reg_or_8bit_adjusted_operand" "rL")]))]
4791 "cmp4.%C1 %0, %I0 = %r3, %2"
4792 [(set_attr "itanium_class" "icmp")])
4794 (define_insn "*cmpdi_normal"
4795 [(set (match_operand:BI 0 "register_operand" "=c")
4796 (match_operator:BI 1 "normal_comparison_operator"
4797 [(match_operand:DI 2 "gr_reg_or_0_operand" "rO")
4798 (match_operand:DI 3 "gr_reg_or_8bit_operand" "rK")]))]
4800 "cmp.%C1 %0, %I0 = %3, %r2"
4801 [(set_attr "itanium_class" "icmp")])
4803 ;; We use %r3 because it is possible for us to match a 0, and two of the
4804 ;; unsigned comparisons don't accept immediate operands of zero.
4806 (define_insn "*cmpdi_adjusted"
4807 [(set (match_operand:BI 0 "register_operand" "=c")
4808 (match_operator:BI 1 "adjusted_comparison_operator"
4809 [(match_operand:DI 2 "gr_register_operand" "r")
4810 (match_operand:DI 3 "gr_reg_or_8bit_adjusted_operand" "rL")]))]
4812 "cmp.%C1 %0, %I0 = %r3, %2"
4813 [(set_attr "itanium_class" "icmp")])
4815 (define_insn "*cmpsf_internal"
4816 [(set (match_operand:BI 0 "register_operand" "=c")
4817 (match_operator:BI 1 "comparison_operator"
4818 [(match_operand:SF 2 "fr_reg_or_fp01_operand" "fG")
4819 (match_operand:SF 3 "fr_reg_or_fp01_operand" "fG")]))]
4821 "fcmp.%D1 %0, %I0 = %F2, %F3"
4822 [(set_attr "itanium_class" "fcmp")])
4824 (define_insn "*cmpdf_internal"
4825 [(set (match_operand:BI 0 "register_operand" "=c")
4826 (match_operator:BI 1 "comparison_operator"
4827 [(match_operand:DF 2 "fr_reg_or_fp01_operand" "fG")
4828 (match_operand:DF 3 "fr_reg_or_fp01_operand" "fG")]))]
4830 "fcmp.%D1 %0, %I0 = %F2, %F3"
4831 [(set_attr "itanium_class" "fcmp")])
4833 (define_insn "*cmpxf_internal"
4834 [(set (match_operand:BI 0 "register_operand" "=c")
4835 (match_operator:BI 1 "comparison_operator"
4836 [(match_operand:XF 2 "xfreg_or_fp01_operand" "fG")
4837 (match_operand:XF 3 "xfreg_or_fp01_operand" "fG")]))]
4839 "fcmp.%D1 %0, %I0 = %F2, %F3"
4840 [(set_attr "itanium_class" "fcmp")])
4842 ;; ??? Can this pattern be generated?
4844 (define_insn "*bit_zero"
4845 [(set (match_operand:BI 0 "register_operand" "=c")
4846 (eq:BI (zero_extract:DI (match_operand:DI 1 "gr_register_operand" "r")
4848 (match_operand:DI 2 "immediate_operand" "n"))
4851 "tbit.z %0, %I0 = %1, %2"
4852 [(set_attr "itanium_class" "tbit")])
4854 (define_insn "*bit_one"
4855 [(set (match_operand:BI 0 "register_operand" "=c")
4856 (ne:BI (zero_extract:DI (match_operand:DI 1 "gr_register_operand" "r")
4858 (match_operand:DI 2 "immediate_operand" "n"))
4861 "tbit.nz %0, %I0 = %1, %2"
4862 [(set_attr "itanium_class" "tbit")])
4864 ;; ::::::::::::::::::::
4868 ;; ::::::::::::::::::::
4870 (define_expand "beq"
4872 (if_then_else (match_dup 1)
4873 (label_ref (match_operand 0 "" ""))
4876 "operands[1] = ia64_expand_compare (EQ, VOIDmode);")
4878 (define_expand "bne"
4880 (if_then_else (match_dup 1)
4881 (label_ref (match_operand 0 "" ""))
4884 "operands[1] = ia64_expand_compare (NE, VOIDmode);")
4886 (define_expand "blt"
4888 (if_then_else (match_dup 1)
4889 (label_ref (match_operand 0 "" ""))
4892 "operands[1] = ia64_expand_compare (LT, VOIDmode);")
4894 (define_expand "ble"
4896 (if_then_else (match_dup 1)
4897 (label_ref (match_operand 0 "" ""))
4900 "operands[1] = ia64_expand_compare (LE, VOIDmode);")
4902 (define_expand "bgt"
4904 (if_then_else (match_dup 1)
4905 (label_ref (match_operand 0 "" ""))
4908 "operands[1] = ia64_expand_compare (GT, VOIDmode);")
4910 (define_expand "bge"
4912 (if_then_else (match_dup 1)
4913 (label_ref (match_operand 0 "" ""))
4916 "operands[1] = ia64_expand_compare (GE, VOIDmode);")
4918 (define_expand "bltu"
4920 (if_then_else (match_dup 1)
4921 (label_ref (match_operand 0 "" ""))
4924 "operands[1] = ia64_expand_compare (LTU, VOIDmode);")
4926 (define_expand "bleu"
4928 (if_then_else (match_dup 1)
4929 (label_ref (match_operand 0 "" ""))
4932 "operands[1] = ia64_expand_compare (LEU, VOIDmode);")
4934 (define_expand "bgtu"
4936 (if_then_else (match_dup 1)
4937 (label_ref (match_operand 0 "" ""))
4940 "operands[1] = ia64_expand_compare (GTU, VOIDmode);")
4942 (define_expand "bgeu"
4944 (if_then_else (match_dup 1)
4945 (label_ref (match_operand 0 "" ""))
4948 "operands[1] = ia64_expand_compare (GEU, VOIDmode);")
4950 (define_expand "bunordered"
4952 (if_then_else (match_dup 1)
4953 (label_ref (match_operand 0 "" ""))
4956 "operands[1] = ia64_expand_compare (UNORDERED, VOIDmode);")
4958 (define_expand "bordered"
4960 (if_then_else (match_dup 1)
4961 (label_ref (match_operand 0 "" ""))
4964 "operands[1] = ia64_expand_compare (ORDERED, VOIDmode);")
4966 (define_insn "*br_true"
4968 (if_then_else (match_operator 0 "predicate_operator"
4969 [(match_operand:BI 1 "register_operand" "c")
4971 (label_ref (match_operand 2 "" ""))
4974 "(%J0) br.cond%+ %l2"
4975 [(set_attr "itanium_class" "br")
4976 (set_attr "predicable" "no")])
4978 (define_insn "*br_false"
4980 (if_then_else (match_operator 0 "predicate_operator"
4981 [(match_operand:BI 1 "register_operand" "c")
4984 (label_ref (match_operand 2 "" ""))))]
4986 "(%j0) br.cond%+ %l2"
4987 [(set_attr "itanium_class" "br")
4988 (set_attr "predicable" "no")])
4990 ;; ::::::::::::::::::::
4992 ;; :: Counted loop operations
4994 ;; ::::::::::::::::::::
4996 (define_expand "doloop_end"
4997 [(use (match_operand 0 "" "")) ; loop pseudo
4998 (use (match_operand 1 "" "")) ; iterations; zero if unknown
4999 (use (match_operand 2 "" "")) ; max iterations
5000 (use (match_operand 3 "" "")) ; loop level
5001 (use (match_operand 4 "" ""))] ; label
5004 /* Only use cloop on innermost loops. */
5005 if (INTVAL (operands[3]) > 1)
5007 emit_jump_insn (gen_doloop_end_internal (gen_rtx_REG (DImode, AR_LC_REGNUM),
5012 (define_insn "doloop_end_internal"
5013 [(set (pc) (if_then_else (ne (match_operand:DI 0 "ar_lc_reg_operand" "")
5015 (label_ref (match_operand 1 "" ""))
5017 (set (match_dup 0) (if_then_else:DI (ne (match_dup 0) (const_int 0))
5018 (plus:DI (match_dup 0) (const_int -1))
5021 "br.cloop.sptk.few %l1"
5022 [(set_attr "itanium_class" "br")
5023 (set_attr "predicable" "no")])
5025 ;; ::::::::::::::::::::
5027 ;; :: Set flag operations
5029 ;; ::::::::::::::::::::
5031 (define_expand "seq"
5032 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5034 "operands[1] = ia64_expand_compare (EQ, DImode);")
5036 (define_expand "sne"
5037 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5039 "operands[1] = ia64_expand_compare (NE, DImode);")
5041 (define_expand "slt"
5042 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5044 "operands[1] = ia64_expand_compare (LT, DImode);")
5046 (define_expand "sle"
5047 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5049 "operands[1] = ia64_expand_compare (LE, DImode);")
5051 (define_expand "sgt"
5052 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5054 "operands[1] = ia64_expand_compare (GT, DImode);")
5056 (define_expand "sge"
5057 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5059 "operands[1] = ia64_expand_compare (GE, DImode);")
5061 (define_expand "sltu"
5062 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5064 "operands[1] = ia64_expand_compare (LTU, DImode);")
5066 (define_expand "sleu"
5067 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5069 "operands[1] = ia64_expand_compare (LEU, DImode);")
5071 (define_expand "sgtu"
5072 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5074 "operands[1] = ia64_expand_compare (GTU, DImode);")
5076 (define_expand "sgeu"
5077 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5079 "operands[1] = ia64_expand_compare (GEU, DImode);")
5081 (define_expand "sunordered"
5082 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5084 "operands[1] = ia64_expand_compare (UNORDERED, DImode);")
5086 (define_expand "sordered"
5087 [(set (match_operand:DI 0 "gr_register_operand" "") (match_dup 1))]
5089 "operands[1] = ia64_expand_compare (ORDERED, DImode);")
5091 ;; Don't allow memory as destination here, because cmov/cmov/st is more
5092 ;; efficient than mov/mov/cst/cst.
5094 (define_insn_and_split "*sne_internal"
5095 [(set (match_operand:DI 0 "gr_register_operand" "=r")
5096 (ne:DI (match_operand:BI 1 "register_operand" "c")
5101 [(cond_exec (ne (match_dup 1) (const_int 0))
5102 (set (match_dup 0) (const_int 1)))
5103 (cond_exec (eq (match_dup 1) (const_int 0))
5104 (set (match_dup 0) (const_int 0)))]
5106 [(set_attr "itanium_class" "unknown")])
5108 (define_insn_and_split "*seq_internal"
5109 [(set (match_operand:DI 0 "gr_register_operand" "=r")
5110 (eq:DI (match_operand:BI 1 "register_operand" "c")
5115 [(cond_exec (ne (match_dup 1) (const_int 0))
5116 (set (match_dup 0) (const_int 0)))
5117 (cond_exec (eq (match_dup 1) (const_int 0))
5118 (set (match_dup 0) (const_int 1)))]
5120 [(set_attr "itanium_class" "unknown")])
5122 ;; ::::::::::::::::::::
5124 ;; :: Conditional move instructions.
5126 ;; ::::::::::::::::::::
5128 ;; ??? Add movXXcc patterns?
5131 ;; DImode if_then_else patterns.
5134 (define_insn "*cmovdi_internal"
5135 [(set (match_operand:DI 0 "destination_operand"
5136 "= r, r, r, r, r, r, r, r, r, r, m, Q, *f,*b,*d*e")
5138 (match_operator 4 "predicate_operator"
5139 [(match_operand:BI 1 "register_operand"
5140 "c,c,c,c,c,c,c,c,c,c,c,c,c,c,c")
5142 (match_operand:DI 2 "move_operand"
5143 "rim, *f, *b,*d*e,rim,rim, rim,*f,*b,*d*e,rO,*f,rOQ,rO, rK")
5144 (match_operand:DI 3 "move_operand"
5145 "rim,rim,rim, rim, *f, *b,*d*e,*f,*b,*d*e,rO,*f,rOQ,rO, rK")))]
5146 "ia64_move_ok (operands[0], operands[2])
5147 && ia64_move_ok (operands[0], operands[3])"
5148 { gcc_unreachable (); }
5149 [(set_attr "predicable" "no")])
5152 [(set (match_operand 0 "destination_operand" "")
5154 (match_operator 4 "predicate_operator"
5155 [(match_operand:BI 1 "register_operand" "")
5157 (match_operand 2 "move_operand" "")
5158 (match_operand 3 "move_operand" "")))]
5162 bool emitted_something = false;
5163 rtx dest = operands[0];
5164 rtx srct = operands[2];
5165 rtx srcf = operands[3];
5166 rtx cond = operands[4];
5168 if (! rtx_equal_p (dest, srct))
5170 ia64_emit_cond_move (dest, srct, cond);
5171 emitted_something = true;
5173 if (! rtx_equal_p (dest, srcf))
5175 cond = gen_rtx_fmt_ee (GET_CODE (cond) == NE ? EQ : NE,
5176 VOIDmode, operands[1], const0_rtx);
5177 ia64_emit_cond_move (dest, srcf, cond);
5178 emitted_something = true;
5180 if (! emitted_something)
5181 emit_note (NOTE_INSN_DELETED);
5185 ;; Absolute value pattern.
5187 (define_insn "*absdi2_internal"
5188 [(set (match_operand:DI 0 "gr_register_operand" "=r,r")
5190 (match_operator 4 "predicate_operator"
5191 [(match_operand:BI 1 "register_operand" "c,c")
5193 (neg:DI (match_operand:DI 2 "gr_reg_or_22bit_operand" "rI,rI"))
5194 (match_operand:DI 3 "gr_reg_or_22bit_operand" "0,rI")))]
5197 [(set_attr "itanium_class" "ialu,unknown")
5198 (set_attr "predicable" "no")])
5201 [(set (match_operand:DI 0 "register_operand" "")
5203 (match_operator 4 "predicate_operator"
5204 [(match_operand:BI 1 "register_operand" "c,c")
5206 (neg:DI (match_operand:DI 2 "gr_reg_or_22bit_operand" ""))
5207 (match_operand:DI 3 "gr_reg_or_22bit_operand" "")))]
5208 "reload_completed && rtx_equal_p (operands[0], operands[3])"
5212 (neg:DI (match_dup 2))))]
5216 [(set (match_operand:DI 0 "register_operand" "")
5218 (match_operator 4 "predicate_operator"
5219 [(match_operand:BI 1 "register_operand" "c,c")
5221 (neg:DI (match_operand:DI 2 "gr_reg_or_22bit_operand" ""))
5222 (match_operand:DI 3 "gr_reg_or_22bit_operand" "")))]
5226 (set (match_dup 0) (neg:DI (match_dup 2))))
5229 (set (match_dup 0) (match_dup 3)))]
5231 operands[5] = gen_rtx_fmt_ee (GET_CODE (operands[4]) == NE ? EQ : NE,
5232 VOIDmode, operands[1], const0_rtx);
5236 ;; SImode if_then_else patterns.
5239 (define_insn "*cmovsi_internal"
5240 [(set (match_operand:SI 0 "destination_operand" "=r,m,*f,r,m,*f,r,m,*f")
5242 (match_operator 4 "predicate_operator"
5243 [(match_operand:BI 1 "register_operand" "c,c,c,c,c,c,c,c,c")
5245 (match_operand:SI 2 "move_operand"
5246 "0,0,0,rim*f,rO,rO,rim*f,rO,rO")
5247 (match_operand:SI 3 "move_operand"
5248 "rim*f,rO,rO,0,0,0,rim*f,rO,rO")))]
5249 "ia64_move_ok (operands[0], operands[2])
5250 && ia64_move_ok (operands[0], operands[3])"
5251 { gcc_unreachable (); }
5252 [(set_attr "predicable" "no")])
5254 (define_insn "*abssi2_internal"
5255 [(set (match_operand:SI 0 "gr_register_operand" "=r,r")
5257 (match_operator 4 "predicate_operator"
5258 [(match_operand:BI 1 "register_operand" "c,c")
5260 (neg:SI (match_operand:SI 3 "gr_reg_or_22bit_operand" "rI,rI"))
5261 (match_operand:SI 2 "gr_reg_or_22bit_operand" "0,rI")))]
5264 [(set_attr "itanium_class" "ialu,unknown")
5265 (set_attr "predicable" "no")])
5268 [(set (match_operand:SI 0 "register_operand" "")
5270 (match_operator 4 "predicate_operator"
5271 [(match_operand:BI 1 "register_operand" "c,c")
5273 (neg:SI (match_operand:SI 2 "gr_reg_or_22bit_operand" ""))
5274 (match_operand:SI 3 "gr_reg_or_22bit_operand" "")))]
5275 "reload_completed && rtx_equal_p (operands[0], operands[3])"
5279 (neg:SI (match_dup 2))))]
5283 [(set (match_operand:SI 0 "register_operand" "")
5285 (match_operator 4 "predicate_operator"
5286 [(match_operand:BI 1 "register_operand" "c,c")
5288 (neg:SI (match_operand:SI 2 "gr_reg_or_22bit_operand" ""))
5289 (match_operand:SI 3 "gr_reg_or_22bit_operand" "")))]
5293 (set (match_dup 0) (neg:SI (match_dup 2))))
5296 (set (match_dup 0) (match_dup 3)))]
5298 operands[5] = gen_rtx_fmt_ee (GET_CODE (operands[4]) == NE ? EQ : NE,
5299 VOIDmode, operands[1], const0_rtx);
5302 (define_insn_and_split "*cond_opsi2_internal"
5303 [(set (match_operand:SI 0 "gr_register_operand" "=r")
5304 (match_operator:SI 5 "condop_operator"
5306 (match_operator 6 "predicate_operator"
5307 [(match_operand:BI 1 "register_operand" "c")
5309 (match_operand:SI 2 "gr_register_operand" "r")
5310 (match_operand:SI 3 "gr_register_operand" "r"))
5311 (match_operand:SI 4 "gr_register_operand" "r")]))]
5317 (set (match_dup 0) (match_op_dup:SI 5 [(match_dup 2) (match_dup 4)])))
5320 (set (match_dup 0) (match_op_dup:SI 5 [(match_dup 3) (match_dup 4)])))]
5322 operands[7] = gen_rtx_fmt_ee (GET_CODE (operands[6]) == NE ? EQ : NE,
5323 VOIDmode, operands[1], const0_rtx);
5325 [(set_attr "itanium_class" "ialu")
5326 (set_attr "predicable" "no")])
5329 (define_insn_and_split "*cond_opsi2_internal_b"
5330 [(set (match_operand:SI 0 "gr_register_operand" "=r")
5331 (match_operator:SI 5 "condop_operator"
5332 [(match_operand:SI 4 "gr_register_operand" "r")
5334 (match_operator 6 "predicate_operator"
5335 [(match_operand:BI 1 "register_operand" "c")
5337 (match_operand:SI 2 "gr_register_operand" "r")
5338 (match_operand:SI 3 "gr_register_operand" "r"))]))]
5344 (set (match_dup 0) (match_op_dup:SI 5 [(match_dup 4) (match_dup 2)])))
5347 (set (match_dup 0) (match_op_dup:SI 5 [(match_dup 4) (match_dup 3)])))]
5349 operands[7] = gen_rtx_fmt_ee (GET_CODE (operands[6]) == NE ? EQ : NE,
5350 VOIDmode, operands[1], const0_rtx);
5352 [(set_attr "itanium_class" "ialu")
5353 (set_attr "predicable" "no")])
5356 ;; ::::::::::::::::::::
5358 ;; :: Call and branch instructions
5360 ;; ::::::::::::::::::::
5362 ;; Subroutine call instruction returning no value. Operand 0 is the function
5363 ;; to call; operand 1 is the number of bytes of arguments pushed (in mode
5364 ;; `SImode', except it is normally a `const_int'); operand 2 is the number of
5365 ;; registers used as operands.
5367 ;; On most machines, operand 2 is not actually stored into the RTL pattern. It
5368 ;; is supplied for the sake of some RISC machines which need to put this
5369 ;; information into the assembler code; they can put it in the RTL instead of
5372 (define_expand "call"
5373 [(use (match_operand:DI 0 "" ""))
5374 (use (match_operand 1 "" ""))
5375 (use (match_operand 2 "" ""))
5376 (use (match_operand 3 "" ""))]
5379 ia64_expand_call (NULL_RTX, operands[0], operands[2], false);
5383 (define_expand "sibcall"
5384 [(use (match_operand:DI 0 "" ""))
5385 (use (match_operand 1 "" ""))
5386 (use (match_operand 2 "" ""))
5387 (use (match_operand 3 "" ""))]
5390 ia64_expand_call (NULL_RTX, operands[0], operands[2], true);
5394 ;; Subroutine call instruction returning a value. Operand 0 is the hard
5395 ;; register in which the value is returned. There are three more operands,
5396 ;; the same as the three operands of the `call' instruction (but with numbers
5397 ;; increased by one).
5399 ;; Subroutines that return `BLKmode' objects use the `call' insn.
5401 (define_expand "call_value"
5402 [(use (match_operand 0 "" ""))
5403 (use (match_operand:DI 1 "" ""))
5404 (use (match_operand 2 "" ""))
5405 (use (match_operand 3 "" ""))
5406 (use (match_operand 4 "" ""))]
5409 ia64_expand_call (operands[0], operands[1], operands[3], false);
5413 (define_expand "sibcall_value"
5414 [(use (match_operand 0 "" ""))
5415 (use (match_operand:DI 1 "" ""))
5416 (use (match_operand 2 "" ""))
5417 (use (match_operand 3 "" ""))
5418 (use (match_operand 4 "" ""))]
5421 ia64_expand_call (operands[0], operands[1], operands[3], true);
5425 ;; Call subroutine returning any type.
5427 (define_expand "untyped_call"
5428 [(parallel [(call (match_operand 0 "" "")
5430 (match_operand 1 "" "")
5431 (match_operand 2 "" "")])]
5436 emit_call_insn (gen_call (operands[0], const0_rtx, NULL, const0_rtx));
5438 for (i = 0; i < XVECLEN (operands[2], 0); i++)
5440 rtx set = XVECEXP (operands[2], 0, i);
5441 emit_move_insn (SET_DEST (set), SET_SRC (set));
5444 /* The optimizer does not know that the call sets the function value
5445 registers we stored in the result block. We avoid problems by
5446 claiming that all hard registers are used and clobbered at this
5448 emit_insn (gen_blockage ());
5453 (define_insn "call_nogp"
5454 [(call (mem:DI (match_operand:DI 0 "call_operand" "?b,i"))
5456 (clobber (match_operand:DI 1 "register_operand" "=b,b"))]
5458 "br.call%+.many %1 = %0"
5459 [(set_attr "itanium_class" "br,scall")])
5461 (define_insn "call_value_nogp"
5462 [(set (match_operand 0 "" "=X,X")
5463 (call (mem:DI (match_operand:DI 1 "call_operand" "?b,i"))
5465 (clobber (match_operand:DI 2 "register_operand" "=b,b"))]
5467 "br.call%+.many %2 = %1"
5468 [(set_attr "itanium_class" "br,scall")])
5470 (define_insn "sibcall_nogp"
5471 [(call (mem:DI (match_operand:DI 0 "call_operand" "?b,i"))
5475 [(set_attr "itanium_class" "br,scall")])
5477 (define_insn "call_gp"
5478 [(call (mem:DI (match_operand:DI 0 "call_operand" "?r,i"))
5480 (clobber (match_operand:DI 1 "register_operand" "=b,b"))
5481 (clobber (match_scratch:DI 2 "=&r,X"))
5482 (clobber (match_scratch:DI 3 "=b,X"))]
5485 [(set_attr "itanium_class" "br,scall")])
5487 ;; Irritatingly, we don't have access to INSN within the split body.
5488 ;; See commentary in ia64_split_call as to why these aren't peep2.
5490 [(call (mem (match_operand 0 "call_operand" ""))
5492 (clobber (match_operand:DI 1 "register_operand" ""))
5493 (clobber (match_scratch:DI 2 ""))
5494 (clobber (match_scratch:DI 3 ""))]
5495 "reload_completed && find_reg_note (insn, REG_NORETURN, NULL_RTX)"
5498 ia64_split_call (NULL_RTX, operands[0], operands[1], operands[2],
5499 operands[3], true, false);
5504 [(call (mem (match_operand 0 "call_operand" ""))
5506 (clobber (match_operand:DI 1 "register_operand" ""))
5507 (clobber (match_scratch:DI 2 ""))
5508 (clobber (match_scratch:DI 3 ""))]
5512 ia64_split_call (NULL_RTX, operands[0], operands[1], operands[2],
5513 operands[3], false, false);
5517 (define_insn "call_value_gp"
5518 [(set (match_operand 0 "" "=X,X")
5519 (call (mem:DI (match_operand:DI 1 "call_operand" "?r,i"))
5521 (clobber (match_operand:DI 2 "register_operand" "=b,b"))
5522 (clobber (match_scratch:DI 3 "=&r,X"))
5523 (clobber (match_scratch:DI 4 "=b,X"))]
5526 [(set_attr "itanium_class" "br,scall")])
5529 [(set (match_operand 0 "" "")
5530 (call (mem:DI (match_operand:DI 1 "call_operand" ""))
5532 (clobber (match_operand:DI 2 "register_operand" ""))
5533 (clobber (match_scratch:DI 3 ""))
5534 (clobber (match_scratch:DI 4 ""))]
5535 "reload_completed && find_reg_note (insn, REG_NORETURN, NULL_RTX)"
5538 ia64_split_call (operands[0], operands[1], operands[2], operands[3],
5539 operands[4], true, false);
5544 [(set (match_operand 0 "" "")
5545 (call (mem:DI (match_operand:DI 1 "call_operand" ""))
5547 (clobber (match_operand:DI 2 "register_operand" ""))
5548 (clobber (match_scratch:DI 3 ""))
5549 (clobber (match_scratch:DI 4 ""))]
5553 ia64_split_call (operands[0], operands[1], operands[2], operands[3],
5554 operands[4], false, false);
5558 (define_insn_and_split "sibcall_gp"
5559 [(call (mem:DI (match_operand:DI 0 "call_operand" "?r,i"))
5561 (clobber (match_scratch:DI 1 "=&r,X"))
5562 (clobber (match_scratch:DI 2 "=b,X"))]
5568 ia64_split_call (NULL_RTX, operands[0], NULL_RTX, operands[1],
5569 operands[2], true, true);
5572 [(set_attr "itanium_class" "br")])
5574 (define_insn "return_internal"
5576 (use (match_operand:DI 0 "register_operand" "b"))]
5578 "br.ret.sptk.many %0"
5579 [(set_attr "itanium_class" "br")])
5581 (define_insn "return"
5583 "ia64_direct_return ()"
5584 "br.ret.sptk.many rp"
5585 [(set_attr "itanium_class" "br")])
5587 (define_insn "*return_true"
5589 (if_then_else (match_operator 0 "predicate_operator"
5590 [(match_operand:BI 1 "register_operand" "c")
5594 "ia64_direct_return ()"
5595 "(%J0) br.ret%+.many rp"
5596 [(set_attr "itanium_class" "br")
5597 (set_attr "predicable" "no")])
5599 (define_insn "*return_false"
5601 (if_then_else (match_operator 0 "predicate_operator"
5602 [(match_operand:BI 1 "register_operand" "c")
5606 "ia64_direct_return ()"
5607 "(%j0) br.ret%+.many rp"
5608 [(set_attr "itanium_class" "br")
5609 (set_attr "predicable" "no")])
5612 [(set (pc) (label_ref (match_operand 0 "" "")))]
5615 [(set_attr "itanium_class" "br")])
5617 (define_insn "indirect_jump"
5618 [(set (pc) (match_operand:DI 0 "register_operand" "b"))]
5621 [(set_attr "itanium_class" "br")])
5623 (define_expand "tablejump"
5624 [(parallel [(set (pc) (match_operand:DI 0 "memory_operand" ""))
5625 (use (label_ref (match_operand 1 "" "")))])]
5628 rtx op0 = operands[0];
5631 /* ??? Bother -- do_tablejump is "helpful" and pulls the table
5632 element into a register without bothering to see whether that
5633 is necessary given the operand predicate. Check for MEM just
5634 in case someone fixes this. */
5635 if (GET_CODE (op0) == MEM)
5636 addr = XEXP (op0, 0);
5639 /* Otherwise, cheat and guess that the previous insn in the
5640 stream was the memory load. Grab the address from that.
5641 Note we have to momentarily pop out of the sequence started
5642 by the insn-emit wrapper in order to grab the last insn. */
5646 last = get_last_insn ();
5648 set = single_set (last);
5650 gcc_assert (rtx_equal_p (SET_DEST (set), op0)
5651 && GET_CODE (SET_SRC (set)) == MEM);
5652 addr = XEXP (SET_SRC (set), 0);
5653 gcc_assert (!rtx_equal_p (addr, op0));
5656 /* Jump table elements are stored pc-relative. That is, a displacement
5657 from the entry to the label. Thus to convert to an absolute address
5658 we add the address of the memory from which the value is loaded. */
5659 operands[0] = expand_simple_binop (DImode, PLUS, op0, addr,
5660 NULL_RTX, 1, OPTAB_DIRECT);
5663 (define_insn "*tablejump_internal"
5664 [(set (pc) (match_operand:DI 0 "register_operand" "b"))
5665 (use (label_ref (match_operand 1 "" "")))]
5668 [(set_attr "itanium_class" "br")])
5671 ;; ::::::::::::::::::::
5673 ;; :: Prologue and Epilogue instructions
5675 ;; ::::::::::::::::::::
5677 (define_expand "prologue"
5681 ia64_expand_prologue ();
5685 (define_expand "epilogue"
5689 ia64_expand_epilogue (0);
5693 (define_expand "sibcall_epilogue"
5697 ia64_expand_epilogue (1);
5701 ;; This prevents the scheduler from moving the SP decrement past FP-relative
5702 ;; stack accesses. This is the same as adddi3 plus the extra set.
5704 (define_insn "prologue_allocate_stack"
5705 [(set (match_operand:DI 0 "register_operand" "=r,r,r")
5706 (plus:DI (match_operand:DI 1 "register_operand" "%r,r,a")
5707 (match_operand:DI 2 "gr_reg_or_22bit_operand" "r,I,J")))
5708 (set (match_operand:DI 3 "register_operand" "+r,r,r")
5715 [(set_attr "itanium_class" "ialu")])
5717 ;; This prevents the scheduler from moving the SP restore past FP-relative
5718 ;; stack accesses. This is similar to movdi plus the extra set.
5720 (define_insn "epilogue_deallocate_stack"
5721 [(set (match_operand:DI 0 "register_operand" "=r")
5722 (match_operand:DI 1 "register_operand" "+r"))
5723 (set (match_dup 1) (match_dup 1))]
5726 [(set_attr "itanium_class" "ialu")])
5728 ;; As USE insns aren't meaningful after reload, this is used instead
5729 ;; to prevent deleting instructions setting registers for EH handling
5730 (define_insn "prologue_use"
5731 [(unspec:DI [(match_operand:DI 0 "register_operand" "")]
5732 UNSPEC_PROLOGUE_USE)]
5735 [(set_attr "itanium_class" "ignore")
5736 (set_attr "predicable" "no")
5737 (set_attr "empty" "yes")])
5739 ;; Allocate a new register frame.
5741 (define_insn "alloc"
5742 [(set (match_operand:DI 0 "register_operand" "=r")
5743 (unspec_volatile:DI [(const_int 0)] UNSPECV_ALLOC))
5744 (use (match_operand:DI 1 "const_int_operand" "i"))
5745 (use (match_operand:DI 2 "const_int_operand" "i"))
5746 (use (match_operand:DI 3 "const_int_operand" "i"))
5747 (use (match_operand:DI 4 "const_int_operand" "i"))]
5749 "alloc %0 = ar.pfs, %1, %2, %3, %4"
5750 [(set_attr "itanium_class" "syst_m0")
5751 (set_attr "predicable" "no")
5752 (set_attr "first_insn" "yes")])
5755 (define_expand "gr_spill"
5756 [(parallel [(set (match_operand:DI 0 "memory_operand" "=m")
5757 (unspec:DI [(match_operand:DI 1 "register_operand" "r")
5758 (match_operand:DI 2 "const_int_operand" "")]
5760 (clobber (match_dup 3))])]
5762 "operands[3] = gen_rtx_REG (DImode, AR_UNAT_REGNUM);")
5764 (define_insn "gr_spill_internal"
5765 [(set (match_operand:DI 0 "memory_operand" "=m")
5766 (unspec:DI [(match_operand:DI 1 "register_operand" "r")
5767 (match_operand:DI 2 "const_int_operand" "")]
5769 (clobber (match_operand:DI 3 "register_operand" ""))]
5772 /* Note that we use a C output pattern here to avoid the predicate
5773 being automatically added before the .mem.offset directive. */
5774 return ".mem.offset %2, 0\;%,st8.spill %0 = %1%P0";
5776 [(set_attr "itanium_class" "st")])
5779 (define_expand "gr_restore"
5780 [(parallel [(set (match_operand:DI 0 "register_operand" "=r")
5781 (unspec:DI [(match_operand:DI 1 "memory_operand" "m")
5782 (match_operand:DI 2 "const_int_operand" "")]
5784 (use (match_dup 3))])]
5786 "operands[3] = gen_rtx_REG (DImode, AR_UNAT_REGNUM);")
5788 (define_insn "gr_restore_internal"
5789 [(set (match_operand:DI 0 "register_operand" "=r")
5790 (unspec:DI [(match_operand:DI 1 "memory_operand" "m")
5791 (match_operand:DI 2 "const_int_operand" "")]
5793 (use (match_operand:DI 3 "register_operand" ""))]
5795 { return ".mem.offset %2, 0\;%,ld8.fill %0 = %1%P1"; }
5796 [(set_attr "itanium_class" "ld")])
5798 (define_insn "fr_spill"
5799 [(set (match_operand:XF 0 "memory_operand" "=m")
5800 (unspec:XF [(match_operand:XF 1 "register_operand" "f")]
5803 "stf.spill %0 = %1%P0"
5804 [(set_attr "itanium_class" "stf")])
5806 (define_insn "fr_restore"
5807 [(set (match_operand:XF 0 "register_operand" "=f")
5808 (unspec:XF [(match_operand:XF 1 "memory_operand" "m")]
5809 UNSPEC_FR_RESTORE))]
5811 "ldf.fill %0 = %1%P1"
5812 [(set_attr "itanium_class" "fld")])
5814 ;; ??? The explicit stop is not ideal. It would be better if
5815 ;; rtx_needs_barrier took care of this, but this is something that can be
5816 ;; fixed later. This avoids an RSE DV.
5818 (define_insn "bsp_value"
5819 [(set (match_operand:DI 0 "register_operand" "=r")
5820 (unspec:DI [(const_int 0)] UNSPEC_BSP_VALUE))]
5824 return \";;\;%,mov %0 = ar.bsp\";
5826 [(set_attr "itanium_class" "frar_i")])
5828 (define_insn "set_bsp"
5829 [(unspec_volatile [(match_operand:DI 0 "register_operand" "r")]
5847 [(set_attr "itanium_class" "unknown")
5848 (set_attr "predicable" "no")])
5850 ;; ??? The explicit stops are not ideal. It would be better if
5851 ;; rtx_needs_barrier took care of this, but this is something that can be
5852 ;; fixed later. This avoids an RSE DV.
5854 (define_insn "flushrs"
5855 [(unspec [(const_int 0)] UNSPEC_FLUSHRS)]
5858 [(set_attr "itanium_class" "rse_m")
5859 (set_attr "predicable" "no")])
5861 ;; ::::::::::::::::::::
5863 ;; :: Miscellaneous instructions
5865 ;; ::::::::::::::::::::
5867 ;; ??? Emitting a NOP instruction isn't very useful. This should probably
5868 ;; be emitting ";;" to force a break in the instruction packing.
5870 ;; No operation, needed in case the user uses -g but not -O.
5875 [(set_attr "itanium_class" "nop")])
5877 (define_insn "nop_m"
5881 [(set_attr "itanium_class" "nop_m")])
5883 (define_insn "nop_i"
5887 [(set_attr "itanium_class" "nop_i")])
5889 (define_insn "nop_f"
5893 [(set_attr "itanium_class" "nop_f")])
5895 (define_insn "nop_b"
5899 [(set_attr "itanium_class" "nop_b")])
5901 (define_insn "nop_x"
5905 [(set_attr "itanium_class" "nop_x")
5906 (set_attr "empty" "yes")])
5908 ;; The following insn will be never generated. It is used only by
5909 ;; insn scheduler to change state before advancing cycle.
5910 (define_insn "pre_cycle"
5914 [(set_attr "itanium_class" "pre_cycle")])
5916 (define_insn "bundle_selector"
5917 [(unspec [(match_operand 0 "const_int_operand" "")] UNSPEC_BUNDLE_SELECTOR)]
5919 { return get_bundle_name (INTVAL (operands[0])); }
5920 [(set_attr "itanium_class" "ignore")
5921 (set_attr "predicable" "no")])
5923 ;; Pseudo instruction that prevents the scheduler from moving code above this
5925 (define_insn "blockage"
5926 [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)]
5929 [(set_attr "itanium_class" "ignore")
5930 (set_attr "predicable" "no")])
5932 (define_insn "insn_group_barrier"
5933 [(unspec_volatile [(match_operand 0 "const_int_operand" "")]
5934 UNSPECV_INSN_GROUP_BARRIER)]
5937 [(set_attr "itanium_class" "stop_bit")
5938 (set_attr "predicable" "no")
5939 (set_attr "empty" "yes")])
5941 (define_expand "trap"
5942 [(trap_if (const_int 1) (const_int 0))]
5946 ;; ??? We don't have a match-any slot type. Setting the type to unknown
5947 ;; produces worse code that setting the slot type to A.
5949 (define_insn "*trap"
5950 [(trap_if (const_int 1) (match_operand 0 "const_int_operand" ""))]
5953 [(set_attr "itanium_class" "chk_s")])
5955 (define_expand "conditional_trap"
5956 [(trap_if (match_operand 0 "" "") (match_operand 1 "" ""))]
5959 operands[0] = ia64_expand_compare (GET_CODE (operands[0]), VOIDmode);
5962 (define_insn "*conditional_trap"
5963 [(trap_if (match_operator 0 "predicate_operator"
5964 [(match_operand:BI 1 "register_operand" "c")
5966 (match_operand 2 "const_int_operand" ""))]
5969 [(set_attr "itanium_class" "chk_s")
5970 (set_attr "predicable" "no")])
5972 (define_insn "break_f"
5973 [(unspec_volatile [(const_int 0)] UNSPECV_BREAK)]
5976 [(set_attr "itanium_class" "nop_f")])
5978 (define_insn "prefetch"
5979 [(prefetch (match_operand:DI 0 "address_operand" "p")
5980 (match_operand:DI 1 "const_int_operand" "n")
5981 (match_operand:DI 2 "const_int_operand" "n"))]
5984 static const char * const alt[2][4] = {
5986 "%,lfetch.nta [%0]",
5987 "%,lfetch.nt1 [%0]",
5988 "%,lfetch.nt2 [%0]",
5992 "%,lfetch.excl.nta [%0]",
5993 "%,lfetch.excl.nt1 [%0]",
5994 "%,lfetch.excl.nt2 [%0]",
5995 "%,lfetch.excl [%0]"
5998 int i = (INTVAL (operands[1]));
5999 int j = (INTVAL (operands[2]));
6001 gcc_assert (i == 0 || i == 1);
6002 gcc_assert (j >= 0 && j <= 3);
6005 [(set_attr "itanium_class" "lfetch")])
6007 ;; Non-local goto support.
6009 (define_expand "save_stack_nonlocal"
6010 [(use (match_operand:OI 0 "memory_operand" ""))
6011 (use (match_operand:DI 1 "register_operand" ""))]
6014 emit_library_call (gen_rtx_SYMBOL_REF (Pmode,
6015 \"__ia64_save_stack_nonlocal\"),
6016 0, VOIDmode, 2, XEXP (operands[0], 0), Pmode,
6017 operands[1], Pmode);
6021 (define_expand "nonlocal_goto"
6022 [(use (match_operand 0 "general_operand" ""))
6023 (use (match_operand 1 "general_operand" ""))
6024 (use (match_operand 2 "general_operand" ""))
6025 (use (match_operand 3 "general_operand" ""))]
6028 emit_library_call (gen_rtx_SYMBOL_REF (Pmode, \"__ia64_nonlocal_goto\"),
6029 LCT_NORETURN, VOIDmode, 3,
6031 copy_to_reg (XEXP (operands[2], 0)), Pmode,
6032 operands[3], Pmode);
6037 (define_insn_and_split "builtin_setjmp_receiver"
6038 [(unspec_volatile [(match_operand:DI 0 "" "")] UNSPECV_SETJMP_RECEIVER)]
6048 (define_expand "eh_epilogue"
6049 [(use (match_operand:DI 0 "register_operand" "r"))
6050 (use (match_operand:DI 1 "register_operand" "r"))
6051 (use (match_operand:DI 2 "register_operand" "r"))]
6054 rtx bsp = gen_rtx_REG (Pmode, 10);
6055 rtx sp = gen_rtx_REG (Pmode, 9);
6057 if (GET_CODE (operands[0]) != REG || REGNO (operands[0]) != 10)
6059 emit_move_insn (bsp, operands[0]);
6062 if (GET_CODE (operands[2]) != REG || REGNO (operands[2]) != 9)
6064 emit_move_insn (sp, operands[2]);
6067 emit_insn (gen_rtx_USE (VOIDmode, sp));
6068 emit_insn (gen_rtx_USE (VOIDmode, bsp));
6070 cfun->machine->ia64_eh_epilogue_sp = sp;
6071 cfun->machine->ia64_eh_epilogue_bsp = bsp;
6074 ;; Builtin apply support.
6076 (define_expand "restore_stack_nonlocal"
6077 [(use (match_operand:DI 0 "register_operand" ""))
6078 (use (match_operand:OI 1 "memory_operand" ""))]
6081 emit_library_call (gen_rtx_SYMBOL_REF (Pmode,
6082 "__ia64_restore_stack_nonlocal"),
6084 copy_to_reg (XEXP (operands[1], 0)), Pmode);
6092 [(match_operator 0 "predicate_operator"
6093 [(match_operand:BI 1 "register_operand" "c")
6098 (define_insn "pred_rel_mutex"
6099 [(set (match_operand:BI 0 "register_operand" "+c")
6100 (unspec:BI [(match_dup 0)] UNSPEC_PRED_REL_MUTEX))]
6102 ".pred.rel.mutex %0, %I0"
6103 [(set_attr "itanium_class" "ignore")
6104 (set_attr "predicable" "no")])
6106 (define_insn "safe_across_calls_all"
6107 [(unspec_volatile [(const_int 0)] UNSPECV_PSAC_ALL)]
6109 ".pred.safe_across_calls p1-p63"
6110 [(set_attr "itanium_class" "ignore")
6111 (set_attr "predicable" "no")])
6113 (define_insn "safe_across_calls_normal"
6114 [(unspec_volatile [(const_int 0)] UNSPECV_PSAC_NORMAL)]
6117 emit_safe_across_calls ();
6120 [(set_attr "itanium_class" "ignore")
6121 (set_attr "predicable" "no")])
6123 ;; UNSPEC instruction definition to "swizzle" 32 bit pointer into 64 bit
6124 ;; pointer. This is used by the HP-UX 32 bit mode.
6126 (define_insn "ptr_extend"
6127 [(set (match_operand:DI 0 "gr_register_operand" "=r")
6128 (unspec:DI [(match_operand:SI 1 "gr_register_operand" "r")]
6132 [(set_attr "itanium_class" "ialu")])
6135 ;; Optimizations for ptr_extend
6137 (define_insn "ptr_extend_plus_imm"
6138 [(set (match_operand:DI 0 "gr_register_operand" "=r")
6140 [(plus:SI (match_operand:SI 1 "basereg_operand" "r")
6141 (match_operand:SI 2 "gr_reg_or_14bit_operand" "rI"))]
6143 "addp4_optimize_ok (operands[1], operands[2])"
6145 [(set_attr "itanium_class" "ialu")])
6147 (define_insn "*ptr_extend_plus_2"
6148 [(set (match_operand:DI 0 "gr_register_operand" "=r")
6150 [(plus:SI (match_operand:SI 1 "gr_register_operand" "r")
6151 (match_operand:SI 2 "basereg_operand" "r"))]
6153 "addp4_optimize_ok (operands[1], operands[2])"
6155 [(set_attr "itanium_class" "ialu")])
6158 ;; Get instruction pointer
6160 (define_insn "ip_value"
6161 [(set (match_operand:DI 0 "register_operand" "=r")
6165 [(set_attr "itanium_class" "ialu")])
6167 ;; Vector operations
6169 ;; Atomic operations