1 ;; iq2000.md Machine Description for Vitesse IQ2000 processors
2 ;; Copyright (C) 2003 Free Software Foundation, Inc.
4 ;; This file is part of GCC.
6 ;; GCC is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 2, or (at your option)
11 ;; GCC is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;; GNU General Public License for more details.
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING. If not, write to
18 ;; the Free Software Foundation, 59 Temple Place - Suite 330,
19 ;; Boston, MA 02111-1307, USA.
21 ;; ??? Currently does not have define_function_unit support for the R8000.
22 ;; Must include new entries for fmadd in addition to existing entries.
73 ;; UNSPEC values used in iq2000.md
76 ;; 1 movsi_us, get_fnaddr
78 ;; 20 builtin_setjmp_setup
80 ;; UNSPEC_VOLATILE values
84 ;; 4 exception_receiver
96 ;; ....................
100 ;; ....................
102 ;; Classification of each insn.
103 ;; branch conditional branch
104 ;; jump unconditional jump
105 ;; call unconditional call
106 ;; load load instruction(s)
107 ;; store store instruction(s)
108 ;; move data movement within same register set
109 ;; xfer transfer to/from coprocessor
110 ;; arith integer arithmetic instruction
111 ;; darith double precision integer arithmetic instructions
112 ;; imul integer multiply
113 ;; idiv integer divide
114 ;; icmp integer compare
115 ;; fadd floating point add/subtract
116 ;; fmul floating point multiply
117 ;; fmadd floating point multiply-add
118 ;; fdiv floating point divide
119 ;; fabs floating point absolute value
120 ;; fneg floating point negation
121 ;; fcmp floating point compare
122 ;; fcvt floating point convert
123 ;; fsqrt floating point square root
124 ;; multi multiword sequence (or user asm statements)
128 "unknown,branch,jump,call,load,store,move,xfer,arith,darith,imul,idiv,icmp,fadd,fmul,fmadd,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,multi,nop"
129 (const_string "unknown"))
131 ;; Main data type used by the insn
132 (define_attr "mode" "unknown,none,QI,HI,SI,DI,SF,DF,FPSW" (const_string "unknown"))
134 ;; Length (in # of bytes). A conditional branch is allowed only to a
135 ;; location within a signed 18-bit offset of the delay slot. If that
136 ;; provides too small a range, we use the `j' instruction. This
137 ;; instruction takes a 28-bit value, but that value is not an offset.
138 ;; Instead, it's bitwise-ored with the high-order four bits of the
139 ;; instruction in the delay slot, which means it cannot be used to
140 ;; cross a 256MB boundary. We could fall back back on the jr,
141 ;; instruction which allows full access to the entire address space,
142 ;; but we do not do so at present.
144 (define_attr "length" ""
145 (cond [(eq_attr "type" "branch")
146 (cond [(lt (abs (minus (match_dup 1) (plus (pc) (const_int 4))))
154 (const (symbol_ref "iq2000_cpu_attr")))
156 ;; Does the instruction have a mandatory delay slot? has_dslot
157 ;; Can the instruction be in a delay slot? ok_in_dslot
158 ;; Can the instruction not be in a delay slot? not_in_dslot
159 (define_attr "dslot" "has_dslot,ok_in_dslot,not_in_dslot"
160 (if_then_else (eq_attr "type" "branch,jump,call,xfer,fcmp")
161 (const_string "has_dslot")
162 (const_string "ok_in_dslot")))
164 ;; Attribute defining whether or not we can use the branch-likely instructions
166 (define_attr "branch_likely" "no,yes"
168 (if_then_else (ne (symbol_ref "GENERATE_BRANCHLIKELY") (const_int 0))
170 (const_string "no"))))
173 ;; Describe a user's asm statement.
174 (define_asm_attributes
175 [(set_attr "type" "multi")])
179 ;; .........................
181 ;; Delay slots, can't describe load/fcmp/xfer delay slots here
183 ;; .........................
185 (define_delay (eq_attr "type" "jump")
186 [(and (eq_attr "dslot" "ok_in_dslot") (eq_attr "length" "4"))
190 (define_delay (eq_attr "type" "branch")
191 [(and (eq_attr "dslot" "ok_in_dslot") (eq_attr "length" "4"))
193 (and (eq_attr "branch_likely" "yes") (and (eq_attr "dslot" "ok_in_dslot") (eq_attr "length" "4")))])
195 (define_delay (eq_attr "type" "call")
196 [(and (eq_attr "dslot" "ok_in_dslot") (eq_attr "length" "4"))
202 ;; .........................
206 ;; .........................
208 ; (define_function_unit NAME MULTIPLICITY SIMULTANEITY
209 ; TEST READY-DELAY ISSUE-DELAY [CONFLICT-LIST])
211 ;; Make the default case (PROCESSOR_DEFAULT) handle the worst case
213 (define_function_unit "memory" 1 0
214 (and (eq_attr "type" "load")
215 (eq_attr "cpu" "iq2000"))
218 (define_function_unit "memory" 1 0
219 (and (eq_attr "type" "move")
220 (eq_attr "cpu" "iq2000"))
223 (define_function_unit "memory" 1 0
224 (and (eq_attr "type" "arith")
225 (eq_attr "cpu" "iq2000"))
228 (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0)
230 (define_function_unit "memory" 1 0 (eq_attr "type" "xfer") 2 0)
233 ;; ....................
237 ;; ....................
241 [(trap_if (const_int 1) (const_int 0))]
249 ;; ....................
253 ;; ....................
256 (define_expand "addsi3"
257 [(set (match_operand:SI 0 "register_operand" "=d")
258 (plus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ")
259 (match_operand:SI 2 "arith_operand" "dI")))]
263 (define_insn "addsi3_internal"
264 [(set (match_operand:SI 0 "register_operand" "=d,=d")
265 (plus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")
266 (match_operand:SI 2 "arith_operand" "d,I")))]
271 [(set_attr "type" "arith")
272 (set_attr "mode" "SI")])
275 ;; ....................
279 ;; ....................
282 (define_expand "subsi3"
283 [(set (match_operand:SI 0 "register_operand" "=d")
284 (minus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ")
285 (match_operand:SI 2 "arith_operand" "dI")))]
289 (define_insn "subsi3_internal"
290 [(set (match_operand:SI 0 "register_operand" "=d,=d")
291 (minus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")
292 (match_operand:SI 2 "arith_operand" "d,I")))]
297 [(set_attr "type" "arith")
298 (set_attr "mode" "SI")])
301 ;; ....................
303 ;; NEGATION and ONE'S COMPLEMENT
305 ;; ....................
307 (define_insn "negsi2"
308 [(set (match_operand:SI 0 "register_operand" "=d")
309 (neg:SI (match_operand:SI 1 "register_operand" "d")))]
313 operands[2] = const0_rtx;
314 return \"subu\\t%0,%z2,%1\";
316 [(set_attr "type" "arith")
317 (set_attr "mode" "SI")])
319 (define_insn "one_cmplsi2"
320 [(set (match_operand:SI 0 "register_operand" "=d")
321 (not:SI (match_operand:SI 1 "register_operand" "d")))]
325 operands[2] = const0_rtx;
326 return \"nor\\t%0,%z2,%1\";
328 [(set_attr "type" "arith")
329 (set_attr "mode" "SI")])
332 ;; ....................
336 ;; ....................
339 (define_expand "andsi3"
340 [(set (match_operand:SI 0 "register_operand" "=d,d,d")
341 (and:SI (match_operand:SI 1 "uns_arith_operand" "%d,d,d")
342 (match_operand:SI 2 "nonmemory_operand" "d,K,N")))]
347 [(set (match_operand:SI 0 "register_operand" "=d,d,d")
348 (and:SI (match_operand:SI 1 "uns_arith_operand" "%d,d,d")
349 (match_operand:SI 2 "nonmemory_operand" "d,K,N")))]
353 if (which_alternative == 0)
354 return \"and\\t%0,%1,%2\";
355 else if (which_alternative == 1)
356 return \"andi\\t%0,%1,%x2\";
357 else if (which_alternative == 2)
359 if ((INTVAL (operands[2]) & 0xffff) == 0xffff)
361 operands[2] = GEN_INT (INTVAL (operands[2]) >> 16);
362 return \"andoui\\t%0,%1,%x2\";
366 operands[2] = GEN_INT (INTVAL (operands[2]) & 0xffff);
367 return \"andoi\\t%0,%1,%x2\";
371 [(set_attr "type" "arith")
372 (set_attr "mode" "SI")])
374 (define_expand "iorsi3"
375 [(set (match_operand:SI 0 "register_operand" "=d,d")
376 (ior:SI (match_operand:SI 1 "uns_arith_operand" "%d,d")
377 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
382 [(set (match_operand:SI 0 "register_operand" "=d,d")
383 (ior:SI (match_operand:SI 1 "uns_arith_operand" "%d,d")
384 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
389 [(set_attr "type" "arith")
390 (set_attr "mode" "SI")])
392 (define_expand "xorsi3"
393 [(set (match_operand:SI 0 "register_operand" "=d,d")
394 (xor:SI (match_operand:SI 1 "uns_arith_operand" "%d,d")
395 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
400 [(set (match_operand:SI 0 "register_operand" "=d,d")
401 (xor:SI (match_operand:SI 1 "uns_arith_operand" "%d,d")
402 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
407 [(set_attr "type" "arith")
408 (set_attr "mode" "SI")])
410 (define_insn "*norsi3"
411 [(set (match_operand:SI 0 "register_operand" "=d")
412 (and:SI (not:SI (match_operand:SI 1 "register_operand" "d"))
413 (not:SI (match_operand:SI 2 "register_operand" "d"))))]
416 [(set_attr "type" "arith")
417 (set_attr "mode" "SI")])
420 ;; ....................
424 ;; ....................
427 ;; Those for integer source operand are ordered widest source type first.
429 (define_expand "zero_extendhisi2"
430 [(set (match_operand:SI 0 "register_operand" "")
431 (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
436 [(set (match_operand:SI 0 "register_operand" "=d,d,d")
437 (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "d,R,m")))]
441 if (which_alternative == 0)
442 return \"andi\\t%0,%1,0xffff\";
444 return iq2000_move_1word (operands, insn, TRUE);
446 [(set_attr "type" "arith,load,load")
447 (set_attr "mode" "SI")
448 (set_attr "length" "4,4,8")])
450 (define_expand "zero_extendqihi2"
451 [(set (match_operand:HI 0 "register_operand" "")
452 (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
457 [(set (match_operand:HI 0 "register_operand" "=d,d,d")
458 (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "d,R,m")))]
462 if (which_alternative == 0)
463 return \"andi\\t%0,%1,0x00ff\";
465 return iq2000_move_1word (operands, insn, TRUE);
467 [(set_attr "type" "arith,load,load")
468 (set_attr "mode" "HI")
469 (set_attr "length" "4,4,8")])
471 (define_expand "zero_extendqisi2"
472 [(set (match_operand:SI 0 "register_operand" "")
473 (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
478 [(set (match_operand:SI 0 "register_operand" "=d,d,d")
479 (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "d,R,m")))]
483 if (which_alternative == 0)
484 return \"andi\\t%0,%1,0x00ff\";
486 return iq2000_move_1word (operands, insn, TRUE);
488 [(set_attr "type" "arith,load,load")
489 (set_attr "mode" "SI")
490 (set_attr "length" "4,4,8")])
493 ;; ....................
497 ;; ....................
500 ;; Those for integer source operand are ordered widest source type first.
502 ;; These patterns originally accepted general_operands, however, slightly
503 ;; better code is generated by only accepting register_operands, and then
504 ;; letting combine generate the lh and lb insns.
506 (define_expand "extendhisi2"
507 [(set (match_operand:SI 0 "register_operand" "")
508 (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
512 if (optimize && GET_CODE (operands[1]) == MEM)
513 operands[1] = force_not_mem (operands[1]);
515 if (GET_CODE (operands[1]) != MEM)
517 rtx op1 = gen_lowpart (SImode, operands[1]);
518 rtx temp = gen_reg_rtx (SImode);
519 rtx shift = GEN_INT (16);
521 emit_insn (gen_ashlsi3 (temp, op1, shift));
522 emit_insn (gen_ashrsi3 (operands[0], temp, shift));
527 (define_insn "extendhisi2_internal"
528 [(set (match_operand:SI 0 "register_operand" "=d,d")
529 (sign_extend:SI (match_operand:HI 1 "memory_operand" "R,m")))]
531 "* return iq2000_move_1word (operands, insn, FALSE);"
532 [(set_attr "type" "load")
533 (set_attr "mode" "SI")
534 (set_attr "length" "4,8")])
536 (define_expand "extendqihi2"
537 [(set (match_operand:HI 0 "register_operand" "")
538 (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
542 if (optimize && GET_CODE (operands[1]) == MEM)
543 operands[1] = force_not_mem (operands[1]);
545 if (GET_CODE (operands[1]) != MEM)
547 rtx op0 = gen_lowpart (SImode, operands[0]);
548 rtx op1 = gen_lowpart (SImode, operands[1]);
549 rtx temp = gen_reg_rtx (SImode);
550 rtx shift = GEN_INT (24);
552 emit_insn (gen_ashlsi3 (temp, op1, shift));
553 emit_insn (gen_ashrsi3 (op0, temp, shift));
558 (define_insn "extendqihi2_internal"
559 [(set (match_operand:HI 0 "register_operand" "=d,d")
560 (sign_extend:HI (match_operand:QI 1 "memory_operand" "R,m")))]
562 "* return iq2000_move_1word (operands, insn, FALSE);"
563 [(set_attr "type" "load")
564 (set_attr "mode" "SI")
565 (set_attr "length" "4,8")])
568 (define_expand "extendqisi2"
569 [(set (match_operand:SI 0 "register_operand" "")
570 (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
574 if (optimize && GET_CODE (operands[1]) == MEM)
575 operands[1] = force_not_mem (operands[1]);
577 if (GET_CODE (operands[1]) != MEM)
579 rtx op1 = gen_lowpart (SImode, operands[1]);
580 rtx temp = gen_reg_rtx (SImode);
581 rtx shift = GEN_INT (24);
583 emit_insn (gen_ashlsi3 (temp, op1, shift));
584 emit_insn (gen_ashrsi3 (operands[0], temp, shift));
589 (define_insn "extendqisi2_insn"
590 [(set (match_operand:SI 0 "register_operand" "=d,d")
591 (sign_extend:SI (match_operand:QI 1 "memory_operand" "R,m")))]
593 "* return iq2000_move_1word (operands, insn, FALSE);"
594 [(set_attr "type" "load")
595 (set_attr "mode" "SI")
596 (set_attr "length" "4,8")])
599 ;; ........................
601 ;; BIT FIELD EXTRACTION
603 ;; ........................
606 [(set (match_operand:SI 0 "register_operand" "=r")
607 (zero_extract:SI (match_operand:SI 1 "register_operand" "r")
608 (match_operand:SI 2 "const_int_operand" "O")
609 (match_operand:SI 3 "const_int_operand" "O")))]
614 value[2] = INTVAL (operands[2]);
615 value[3] = INTVAL (operands[3]);
616 operands[2] = GEN_INT ((value[3]));
617 operands[3] = GEN_INT ((32 - value[2]));
618 return \"ram\\t%0,%1,%2,%3,0x0\";
620 [(set_attr "type" "arith")])
623 ;; ....................
627 ;; ....................
629 /* Take care of constants that don't fit in single instruction */
631 [(set (match_operand:SI 0 "register_operand" "")
632 (match_operand:SI 1 "general_operand" ""))]
633 "(reload_in_progress || reload_completed)
634 && large_int (operands[1], SImode)"
637 (high:SI (match_dup 1)))
639 (lo_sum:SI (match_dup 0)
643 ;; ??? iq2000_move_1word has support for HIGH, so this pattern may be
647 [(set (match_operand:SI 0 "register_operand" "=r")
648 (high:SI (match_operand:SI 1 "immediate_operand" "")))]
650 "lui\\t%0,%%hi(%1) # high"
651 [(set_attr "type" "move")])
654 [(set (match_operand:SI 0 "register_operand" "=r")
655 (lo_sum:SI (match_operand:SI 1 "register_operand" "r")
656 (match_operand:SI 2 "immediate_operand" "")))]
658 "addiu\\t%0,%1,%%lo(%2) # low"
659 [(set_attr "type" "arith")
660 (set_attr "mode" "SI")])
662 ;; 32-bit Integer moves
665 [(set (match_operand:SI 0 "register_operand" "")
666 (match_operand:SI 1 "large_int" ""))]
667 "reload_in_progress | reload_completed"
671 (ior:SI (match_dup 0)
675 operands[2] = GEN_INT (trunc_int_for_mode (INTVAL (operands[1])
678 operands[3] = GEN_INT (INTVAL (operands[1]) & BITMASK_LOWER16);
681 ;; Unlike most other insns, the move insns can't be split with
682 ;; different predicates, because register spilling and other parts of
683 ;; the compiler, have memoized the insn number already.
685 (define_expand "movsi"
686 [(set (match_operand:SI 0 "nonimmediate_operand" "")
687 (match_operand:SI 1 "general_operand" ""))]
691 if (iq2000_check_split (operands[1], SImode))
693 enum machine_mode mode = GET_MODE (operands[0]);
694 rtx tem = ((reload_in_progress | reload_completed)
695 ? operands[0] : gen_reg_rtx (mode));
697 emit_insn (gen_rtx_SET (VOIDmode, tem,
698 gen_rtx_HIGH (mode, operands[1])));
700 operands[1] = gen_rtx_LO_SUM (mode, tem, operands[1]);
703 if ((reload_in_progress | reload_completed) == 0
704 && !register_operand (operands[0], SImode)
705 && !register_operand (operands[1], SImode)
706 && (GET_CODE (operands[1]) != CONST_INT
707 || INTVAL (operands[1]) != 0))
709 rtx temp = force_reg (SImode, operands[1]);
710 emit_move_insn (operands[0], temp);
714 /* Take care of constants that don't fit in single instruction */
715 if ((reload_in_progress || reload_completed)
716 && CONSTANT_P (operands[1])
717 && GET_CODE (operands[1]) != HIGH
718 && GET_CODE (operands[1]) != LO_SUM
719 && ! SMALL_INT_UNSIGNED (operands[1]))
721 rtx tem = ((reload_in_progress | reload_completed)
722 ? operands[0] : gen_reg_rtx (SImode));
724 emit_insn (gen_rtx_SET (VOIDmode, tem,
725 gen_rtx_HIGH (SImode, operands[1])));
726 operands[1] = gen_rtx_LO_SUM (SImode, tem, operands[1]);
730 ;; The difference between these two is whether or not ints are allowed
731 ;; in FP registers (off by default, use -mdebugh to enable).
733 (define_insn "movsi_internal2"
734 [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*z,*x,*d,*x,*d")
735 (match_operand:SI 1 "move_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,*z,*d,J,*x,*d,*a"))]
736 "(register_operand (operands[0], SImode)
737 || register_operand (operands[1], SImode)
738 || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
739 "* return iq2000_move_1word (operands, insn, FALSE);"
740 [(set_attr "type" "move,load,arith,arith,load,load,store,store,xfer,xfer,move,move,move,move")
741 (set_attr "mode" "SI")
742 (set_attr "length" "4,8,4,8,4,8,4,8,4,4,4,4,4,4")])
744 ;; 16-bit Integer moves
746 ;; Unlike most other insns, the move insns can't be split with
747 ;; different predicates, because register spilling and other parts of
748 ;; the compiler, have memoized the insn number already.
749 ;; Unsigned loads are used because BYTE_LOADS_ZERO_EXTEND is defined
751 (define_expand "movhi"
752 [(set (match_operand:HI 0 "nonimmediate_operand" "")
753 (match_operand:HI 1 "general_operand" ""))]
757 if ((reload_in_progress | reload_completed) == 0
758 && !register_operand (operands[0], HImode)
759 && !register_operand (operands[1], HImode)
760 && ((GET_CODE (operands[1]) != CONST_INT
761 || INTVAL (operands[1]) != 0)))
763 rtx temp = force_reg (HImode, operands[1]);
764 emit_move_insn (operands[0], temp);
769 ;; The difference between these two is whether or not ints are allowed
770 ;; in FP registers (off by default, use -mdebugh to enable).
772 (define_insn "movhi_internal2"
773 [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*z,*x,*d")
774 (match_operand:HI 1 "general_operand" "d,IK,R,m,dJ,dJ,*z,*d,*d,*x"))]
775 "(register_operand (operands[0], HImode)
776 || register_operand (operands[1], HImode)
777 || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
778 "* return iq2000_move_1word (operands, insn, TRUE);"
779 [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,move,move")
780 (set_attr "mode" "HI")
781 (set_attr "length" "4,4,4,8,4,8,4,4,4,4")])
783 ;; 8-bit Integer moves
785 ;; Unlike most other insns, the move insns can't be split with
786 ;; different predicates, because register spilling and other parts of
787 ;; the compiler, have memoized the insn number already.
788 ;; Unsigned loads are used because BYTE_LOADS_ZERO_EXTEND is defined
790 (define_expand "movqi"
791 [(set (match_operand:QI 0 "nonimmediate_operand" "")
792 (match_operand:QI 1 "general_operand" ""))]
796 if ((reload_in_progress | reload_completed) == 0
797 && !register_operand (operands[0], QImode)
798 && !register_operand (operands[1], QImode)
799 && (GET_CODE (operands[1]) != CONST_INT
800 || INTVAL (operands[1]) != 0))
802 rtx temp = force_reg (QImode, operands[1]);
803 emit_move_insn (operands[0], temp);
808 ;; The difference between these two is whether or not ints are allowed
809 ;; in FP registers (off by default, use -mdebugh to enable).
811 (define_insn "movqi_internal2"
812 [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*z,*x,*d")
813 (match_operand:QI 1 "general_operand" "d,IK,R,m,dJ,dJ,*z,*d,*d,*x"))]
814 "(register_operand (operands[0], QImode)
815 || register_operand (operands[1], QImode)
816 || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
817 "* return iq2000_move_1word (operands, insn, TRUE);"
818 [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,move,move")
819 (set_attr "mode" "QI")
820 (set_attr "length" "4,4,4,8,4,8,4,4,4,4")])
822 ;; 32-bit floating point moves
824 (define_expand "movsf"
825 [(set (match_operand:SF 0 "general_operand" "")
826 (match_operand:SF 1 "general_operand" ""))]
830 if (!reload_in_progress
832 && GET_CODE (operands[0]) == MEM
833 && (GET_CODE (operands[1]) == MEM
834 || GET_CODE (operands[1]) == CONST_DOUBLE))
835 operands[1] = copy_to_mode_reg (SFmode, operands[1]);
837 /* Take care of reg <- SF constant */
838 if ( const_double_operand (operands[1], GET_MODE (operands[1]) ) )
840 emit_insn (gen_movsf_high (operands[0], operands[1]));
841 emit_insn (gen_movsf_lo_sum (operands[0], operands[0], operands[1]));
846 (define_insn "movsf_lo_sum"
847 [(set (match_operand:SF 0 "register_operand" "=r")
848 (lo_sum:SF (match_operand:SF 1 "register_operand" "r")
849 (match_operand:SF 2 "const_double_operand" "")))]
856 REAL_VALUE_FROM_CONST_DOUBLE (r, operands[2]);
857 REAL_VALUE_TO_TARGET_SINGLE (r, i);
858 operands[2] = GEN_INT (i);
859 return \"addiu\\t%0,%1,%%lo(%2) # low\";
861 [(set_attr "length" "4")
862 (set_attr "type" "arith")])
864 (define_insn "movsf_high"
865 [(set (match_operand:SF 0 "register_operand" "=r")
866 (high:SF (match_operand:SF 1 "const_double_operand" "")))]
873 REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]);
874 REAL_VALUE_TO_TARGET_SINGLE (r, i);
875 operands[1] = GEN_INT (i);
876 return \"lui\\t%0,%%hi(%1) # high\";
878 [(set_attr "length" "4")
879 (set_attr "type" "arith")])
881 (define_insn "*movsf_internal"
882 [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,m")
883 (match_operand:SF 1 "nonimmediate_operand" "r,m,r"))]
884 "!memory_operand (operands[0], SFmode) || !memory_operand (operands[1], SFmode)"
887 iq2000_fill_delay_slot (\"\", DELAY_LOAD, operands, insn);
888 if (which_alternative == 0)
889 return \"or\\t%0,%1,%1\";
890 else if (which_alternative == 1)
891 return \"lw\\t%0,%1\";
892 else if (which_alternative == 2)
893 return \"sw\\t%1,%0\";
895 [(set_attr "length" "4,4,4")
896 (set_attr "type" "arith,load,store")]
900 ;; ....................
904 ;; ....................
906 (define_expand "ashlsi3"
907 [(set (match_operand:SI 0 "register_operand" "=d")
908 (ashift:SI (match_operand:SI 1 "register_operand" "d")
909 (match_operand:SI 2 "arith_operand" "dI")))]
913 (define_insn "ashlsi3_internal1"
914 [(set (match_operand:SI 0 "register_operand" "=d")
915 (ashift:SI (match_operand:SI 1 "register_operand" "d")
916 (match_operand:SI 2 "arith_operand" "dI")))]
920 if (GET_CODE (operands[2]) == CONST_INT)
922 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
923 return \"sll\\t%0,%1,%2\";
926 return \"sllv\\t%0,%1,%2\";
928 [(set_attr "type" "arith")
929 (set_attr "mode" "SI")])
931 (define_expand "ashrsi3"
932 [(set (match_operand:SI 0 "register_operand" "=d")
933 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d")
934 (match_operand:SI 2 "arith_operand" "dI")))]
938 (define_insn "ashrsi3_internal1"
939 [(set (match_operand:SI 0 "register_operand" "=d")
940 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d")
941 (match_operand:SI 2 "arith_operand" "dI")))]
945 if (GET_CODE (operands[2]) == CONST_INT)
947 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
948 return \"sra\\t%0,%1,%2\";
951 return \"srav\\t%0,%1,%2\";
953 [(set_attr "type" "arith")
954 (set_attr "mode" "SI")])
956 (define_expand "lshrsi3"
957 [(set (match_operand:SI 0 "register_operand" "=d")
958 (lshiftrt:SI (match_operand:SI 1 "register_operand" "d")
959 (match_operand:SI 2 "arith_operand" "dI")))]
963 (define_insn "lshrsi3_internal1"
964 [(set (match_operand:SI 0 "register_operand" "=d")
965 (lshiftrt:SI (match_operand:SI 1 "register_operand" "d")
966 (match_operand:SI 2 "arith_operand" "dI")))]
970 if (GET_CODE (operands[2]) == CONST_INT)
972 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
973 return \"srl\\t%0,%1,%2\";
976 return \"srlv\\t%0,%1,%2\";
978 [(set_attr "type" "arith")
979 (set_attr "mode" "SI")])
982 (define_insn "rotrsi3"
983 [(set (match_operand:SI 0 "register_operand" "=r")
984 (rotatert:SI (match_operand:SI 1 "register_operand" "r")
985 (match_operand:SI 2 "uns_arith_operand" "O")))]
987 "ram %0,%1,%2,0x0,0x0"
988 [(set_attr "type" "arith")])
992 ;; ....................
996 ;; ....................
998 ;; Flow here is rather complex:
1000 ;; 1) The cmp{si,di,sf,df} routine is called. It deposits the
1001 ;; arguments into the branch_cmp array, and the type into
1002 ;; branch_type. No RTL is generated.
1004 ;; 2) The appropriate branch define_expand is called, which then
1005 ;; creates the appropriate RTL for the comparison and branch.
1006 ;; Different CC modes are used, based on what type of branch is
1007 ;; done, so that we can constrain things appropriately. There
1008 ;; are assumptions in the rest of GCC that break if we fold the
1009 ;; operands into the branches for integer operations, and use cc0
1010 ;; for floating point, so we use the fp status register instead.
1011 ;; If needed, an appropriate temporary is created to hold the
1012 ;; of the integer compare.
1014 (define_expand "cmpsi"
1016 (compare:CC (match_operand:SI 0 "register_operand" "")
1017 (match_operand:SI 1 "arith_operand" "")))]
1021 if (operands[0]) /* avoid unused code message */
1023 branch_cmp[0] = operands[0];
1024 branch_cmp[1] = operands[1];
1025 branch_type = CMP_SI;
1030 (define_expand "tstsi"
1032 (match_operand:SI 0 "register_operand" ""))]
1036 if (operands[0]) /* avoid unused code message */
1038 branch_cmp[0] = operands[0];
1039 branch_cmp[1] = const0_rtx;
1040 branch_type = CMP_SI;
1046 ;; ....................
1048 ;; CONDITIONAL BRANCHES
1050 ;; ....................
1052 ;; Conditional branches on comparisons with zero.
1054 (define_insn "branch_zero"
1057 (match_operator:SI 0 "cmp_op"
1058 [(match_operand:SI 2 "register_operand" "d")
1060 (label_ref (match_operand 1 "" ""))
1065 return iq2000_output_conditional_branch (insn,
1067 /*two_operands_p=*/0,
1070 get_attr_length (insn));
1072 [(set_attr "type" "branch")
1073 (set_attr "mode" "none")])
1075 (define_insn "branch_zero_inverted"
1078 (match_operator:SI 0 "cmp_op"
1079 [(match_operand:SI 2 "register_operand" "d")
1082 (label_ref (match_operand 1 "" ""))))]
1086 return iq2000_output_conditional_branch (insn,
1088 /*two_operands_p=*/0,
1091 get_attr_length (insn));
1093 [(set_attr "type" "branch")
1094 (set_attr "mode" "none")])
1096 ;; Conditional branch on equality comparison.
1098 (define_insn "branch_equality"
1101 (match_operator:SI 0 "equality_op"
1102 [(match_operand:SI 2 "register_operand" "d")
1103 (match_operand:SI 3 "register_operand" "d")])
1104 (label_ref (match_operand 1 "" ""))
1109 return iq2000_output_conditional_branch (insn,
1111 /*two_operands_p=*/1,
1114 get_attr_length (insn));
1116 [(set_attr "type" "branch")
1117 (set_attr "mode" "none")])
1119 (define_insn "branch_equality_inverted"
1122 (match_operator:SI 0 "equality_op"
1123 [(match_operand:SI 2 "register_operand" "d")
1124 (match_operand:SI 3 "register_operand" "d")])
1126 (label_ref (match_operand 1 "" ""))))]
1130 return iq2000_output_conditional_branch (insn,
1132 /*two_operands_p=*/1,
1135 get_attr_length (insn));
1137 [(set_attr "type" "branch")
1138 (set_attr "mode" "none")])
1140 (define_expand "beq"
1142 (if_then_else (eq:CC (cc0)
1144 (label_ref (match_operand 0 "" ""))
1149 if (operands[0]) /* avoid unused code warning */
1151 gen_conditional_branch (operands, EQ);
1156 (define_expand "bne"
1158 (if_then_else (ne:CC (cc0)
1160 (label_ref (match_operand 0 "" ""))
1165 if (operands[0]) /* avoid unused code warning */
1167 gen_conditional_branch (operands, NE);
1172 (define_expand "bgt"
1174 (if_then_else (gt:CC (cc0)
1176 (label_ref (match_operand 0 "" ""))
1181 if (operands[0]) /* avoid unused code warning */
1183 gen_conditional_branch (operands, GT);
1188 (define_expand "bge"
1190 (if_then_else (ge:CC (cc0)
1192 (label_ref (match_operand 0 "" ""))
1197 if (operands[0]) /* avoid unused code warning */
1199 gen_conditional_branch (operands, GE);
1204 (define_expand "blt"
1206 (if_then_else (lt:CC (cc0)
1208 (label_ref (match_operand 0 "" ""))
1213 if (operands[0]) /* avoid unused code warning */
1215 gen_conditional_branch (operands, LT);
1220 (define_expand "ble"
1222 (if_then_else (le:CC (cc0)
1224 (label_ref (match_operand 0 "" ""))
1229 if (operands[0]) /* avoid unused code warning */
1231 gen_conditional_branch (operands, LE);
1236 (define_expand "bgtu"
1238 (if_then_else (gtu:CC (cc0)
1240 (label_ref (match_operand 0 "" ""))
1245 if (operands[0]) /* avoid unused code warning */
1247 gen_conditional_branch (operands, GTU);
1252 (define_expand "bgeu"
1254 (if_then_else (geu:CC (cc0)
1256 (label_ref (match_operand 0 "" ""))
1261 if (operands[0]) /* avoid unused code warning */
1263 gen_conditional_branch (operands, GEU);
1269 (define_expand "bltu"
1271 (if_then_else (ltu:CC (cc0)
1273 (label_ref (match_operand 0 "" ""))
1278 if (operands[0]) /* avoid unused code warning */
1280 gen_conditional_branch (operands, LTU);
1285 (define_expand "bleu"
1287 (if_then_else (leu:CC (cc0)
1289 (label_ref (match_operand 0 "" ""))
1294 if (operands[0]) /* avoid unused code warning */
1296 gen_conditional_branch (operands, LEU);
1301 ;; Recognize bbi and bbin instructions. These use two unusual template
1302 ;; patterns, %Ax and %Px. %Ax outputs an 'i' if operand `x' is a LABEL_REF
1303 ;; otherwise it outputs an 'in'. %Px does nothing if `x' is PC
1304 ;; and outputs the operand if `x' is a LABEL_REF.
1309 (ne (sign_extract:SI (match_operand:SI 0 "register_operand" "r")
1311 (match_operand:SI 1 "arith_operand" "I"))
1313 (match_operand 2 "pc_or_label_operand" "")
1314 (match_operand 3 "pc_or_label_operand" "")))]
1316 "bb%A2\\t%0(31-%1),%P2%P3"
1317 [(set_attr "length" "4")
1318 (set_attr "type" "branch")])
1323 (eq (sign_extract:SI (match_operand:SI 0 "register_operand" "r")
1325 (match_operand:SI 1 "arith_operand" "I"))
1327 (match_operand 2 "pc_or_label_operand" "")
1328 (match_operand 3 "pc_or_label_operand" "")))]
1330 "bb%A3\\t%0(31-%1),%P2%P3"
1331 [(set_attr "length" "4")
1332 (set_attr "type" "branch")])
1337 (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
1339 (match_operand:SI 1 "arith_operand" "I"))
1341 (match_operand 2 "pc_or_label_operand" "")
1342 (match_operand 3 "pc_or_label_operand" "")))]
1344 "bb%A2\\t%0(31-%1),%P2%P3"
1345 [(set_attr "length" "4")
1346 (set_attr "type" "branch")])
1351 (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
1353 (match_operand:SI 1 "arith_operand" "I"))
1355 (match_operand 2 "pc_or_label_operand" "")
1356 (match_operand 3 "pc_or_label_operand" "")))]
1358 "bb%A3\\t%0(31-%1),%P2%P3"
1359 [(set_attr "length" "4")
1360 (set_attr "type" "branch")])
1365 (eq (and:SI (match_operand:SI 0 "register_operand" "r")
1366 (match_operand:SI 1 "power_of_2_operand" "I"))
1368 (match_operand 2 "pc_or_label_operand" "")
1369 (match_operand 3 "pc_or_label_operand" "")))]
1371 "bb%A3\\t%0(%p1),%P2%P3"
1372 [(set_attr "length" "4")
1373 (set_attr "type" "branch")])
1378 (ne (and:SI (match_operand:SI 0 "register_operand" "r")
1379 (match_operand:SI 1 "power_of_2_operand" "I"))
1381 (match_operand 2 "pc_or_label_operand" "")
1382 (match_operand 3 "pc_or_label_operand" "")))]
1384 "bb%A2\\t%0(%p1),%P2%P3"
1385 [(set_attr "length" "4")
1386 (set_attr "type" "branch")])
1389 ;; ....................
1391 ;; SETTING A REGISTER FROM A COMPARISON
1393 ;; ....................
1395 (define_expand "seq"
1396 [(set (match_operand:SI 0 "register_operand" "=d")
1397 (eq:SI (match_dup 1)
1402 if (branch_type != CMP_SI && (branch_type != CMP_DI))
1405 /* set up operands from compare. */
1406 operands[1] = branch_cmp[0];
1407 operands[2] = branch_cmp[1];
1409 gen_int_relational (EQ, operands[0], operands[1], operands[2], (int *)0);
1414 (define_insn "seq_si_zero"
1415 [(set (match_operand:SI 0 "register_operand" "=d")
1416 (eq:SI (match_operand:SI 1 "register_operand" "d")
1420 [(set_attr "type" "arith")
1421 (set_attr "mode" "SI")])
1423 (define_expand "sne"
1424 [(set (match_operand:SI 0 "register_operand" "=d")
1425 (ne:SI (match_dup 1)
1430 if (branch_type != CMP_SI && (branch_type != CMP_DI))
1433 /* set up operands from compare. */
1434 operands[1] = branch_cmp[0];
1435 operands[2] = branch_cmp[1];
1437 gen_int_relational (NE, operands[0], operands[1], operands[2], (int *)0);
1441 (define_insn "sne_si_zero"
1442 [(set (match_operand:SI 0 "register_operand" "=d")
1443 (ne:SI (match_operand:SI 1 "register_operand" "d")
1447 [(set_attr "type" "arith")
1448 (set_attr "mode" "SI")])
1450 (define_expand "sgt"
1451 [(set (match_operand:SI 0 "register_operand" "=d")
1452 (gt:SI (match_dup 1)
1457 if (branch_type != CMP_SI && (branch_type != CMP_DI))
1460 /* set up operands from compare. */
1461 operands[1] = branch_cmp[0];
1462 operands[2] = branch_cmp[1];
1464 gen_int_relational (GT, operands[0], operands[1], operands[2], (int *)0);
1468 (define_insn "sgt_si"
1469 [(set (match_operand:SI 0 "register_operand" "=d,=d")
1470 (gt:SI (match_operand:SI 1 "register_operand" "d,d")
1471 (match_operand:SI 2 "reg_or_0_operand" "d,J")))]
1476 [(set_attr "type" "arith,arith")
1477 (set_attr "mode" "SI,SI")])
1479 (define_expand "sge"
1480 [(set (match_operand:SI 0 "register_operand" "=d")
1481 (ge:SI (match_dup 1)
1486 if (branch_type != CMP_SI && (branch_type != CMP_DI))
1489 /* set up operands from compare. */
1490 operands[1] = branch_cmp[0];
1491 operands[2] = branch_cmp[1];
1493 gen_int_relational (GE, operands[0], operands[1], operands[2], (int *)0);
1497 (define_expand "slt"
1498 [(set (match_operand:SI 0 "register_operand" "=d")
1499 (lt:SI (match_dup 1)
1504 if (branch_type != CMP_SI && (branch_type != CMP_DI))
1507 /* set up operands from compare. */
1508 operands[1] = branch_cmp[0];
1509 operands[2] = branch_cmp[1];
1511 gen_int_relational (LT, operands[0], operands[1], operands[2], (int *)0);
1515 (define_insn "slt_si"
1516 [(set (match_operand:SI 0 "register_operand" "=d,=d")
1517 (lt:SI (match_operand:SI 1 "register_operand" "d,d")
1518 (match_operand:SI 2 "arith_operand" "d,I")))]
1523 [(set_attr "type" "arith,arith")
1524 (set_attr "mode" "SI,SI")])
1526 (define_expand "sle"
1527 [(set (match_operand:SI 0 "register_operand" "=d")
1528 (le:SI (match_dup 1)
1533 if (branch_type != CMP_SI && (branch_type != CMP_DI))
1536 /* set up operands from compare. */
1537 operands[1] = branch_cmp[0];
1538 operands[2] = branch_cmp[1];
1540 gen_int_relational (LE, operands[0], operands[1], operands[2], (int *)0);
1544 (define_insn "sle_si_const"
1545 [(set (match_operand:SI 0 "register_operand" "=d")
1546 (le:SI (match_operand:SI 1 "register_operand" "d")
1547 (match_operand:SI 2 "small_int" "I")))]
1548 "INTVAL (operands[2]) < 32767"
1551 operands[2] = GEN_INT (INTVAL (operands[2])+1);
1552 return \"slti\\t%0,%1,%2\";
1554 [(set_attr "type" "arith")
1555 (set_attr "mode" "SI")])
1557 (define_expand "sgtu"
1558 [(set (match_operand:SI 0 "register_operand" "=d")
1559 (gtu:SI (match_dup 1)
1564 if (branch_type != CMP_SI && (branch_type != CMP_DI))
1567 /* set up operands from compare. */
1568 operands[1] = branch_cmp[0];
1569 operands[2] = branch_cmp[1];
1571 gen_int_relational (GTU, operands[0], operands[1], operands[2], (int *)0);
1575 (define_insn "sgtu_si"
1576 [(set (match_operand:SI 0 "register_operand" "=d")
1577 (gtu:SI (match_operand:SI 1 "register_operand" "d")
1578 (match_operand:SI 2 "reg_or_0_operand" "dJ")))]
1581 [(set_attr "type" "arith")
1582 (set_attr "mode" "SI")])
1585 [(set (match_operand:SI 0 "register_operand" "=t")
1586 (gtu:SI (match_operand:SI 1 "register_operand" "d")
1587 (match_operand:SI 2 "register_operand" "d")))]
1590 [(set_attr "type" "arith")
1591 (set_attr "mode" "SI")])
1593 (define_expand "sgeu"
1594 [(set (match_operand:SI 0 "register_operand" "=d")
1595 (geu:SI (match_dup 1)
1600 if (branch_type != CMP_SI && (branch_type != CMP_DI))
1603 /* set up operands from compare. */
1604 operands[1] = branch_cmp[0];
1605 operands[2] = branch_cmp[1];
1607 gen_int_relational (GEU, operands[0], operands[1], operands[2], (int *)0);
1611 (define_expand "sltu"
1612 [(set (match_operand:SI 0 "register_operand" "=d")
1613 (ltu:SI (match_dup 1)
1618 if (branch_type != CMP_SI && (branch_type != CMP_DI))
1621 /* set up operands from compare. */
1622 operands[1] = branch_cmp[0];
1623 operands[2] = branch_cmp[1];
1625 gen_int_relational (LTU, operands[0], operands[1], operands[2], (int *)0);
1629 (define_insn "sltu_si"
1630 [(set (match_operand:SI 0 "register_operand" "=d,=d")
1631 (ltu:SI (match_operand:SI 1 "register_operand" "d,d")
1632 (match_operand:SI 2 "arith_operand" "d,I")))]
1637 [(set_attr "type" "arith,arith")
1638 (set_attr "mode" "SI,SI")])
1640 (define_expand "sleu"
1641 [(set (match_operand:SI 0 "register_operand" "=d")
1642 (leu:SI (match_dup 1)
1647 if (branch_type != CMP_SI && (branch_type != CMP_DI))
1650 /* set up operands from compare. */
1651 operands[1] = branch_cmp[0];
1652 operands[2] = branch_cmp[1];
1654 gen_int_relational (LEU, operands[0], operands[1], operands[2], (int *)0);
1658 (define_insn "sleu_si_const"
1659 [(set (match_operand:SI 0 "register_operand" "=d")
1660 (leu:SI (match_operand:SI 1 "register_operand" "d")
1661 (match_operand:SI 2 "small_int" "I")))]
1662 "INTVAL (operands[2]) < 32767"
1665 operands[2] = GEN_INT (INTVAL (operands[2]) + 1);
1666 return \"sltiu\\t%0,%1,%2\";
1668 [(set_attr "type" "arith")
1669 (set_attr "mode" "SI")])
1673 ;; ....................
1675 ;; UNCONDITIONAL BRANCHES
1677 ;; ....................
1679 ;; Unconditional branches.
1683 (label_ref (match_operand 0 "" "")))]
1687 if (GET_CODE (operands[0]) == REG)
1690 /* return \"b\\t%l0\";*/
1692 [(set_attr "type" "jump")
1693 (set_attr "mode" "none")])
1695 (define_expand "indirect_jump"
1696 [(set (pc) (match_operand 0 "register_operand" "d"))]
1702 if (operands[0]) /* eliminate unused code warnings */
1705 if (GET_CODE (dest) != REG || GET_MODE (dest) != Pmode)
1706 operands[0] = copy_to_mode_reg (Pmode, dest);
1708 if (!(Pmode == DImode))
1709 emit_jump_insn (gen_indirect_jump_internal1 (operands[0]));
1711 emit_jump_insn (gen_indirect_jump_internal2 (operands[0]));
1717 (define_insn "indirect_jump_internal1"
1718 [(set (pc) (match_operand:SI 0 "register_operand" "d"))]
1719 "!(Pmode == DImode)"
1721 [(set_attr "type" "jump")
1722 (set_attr "mode" "none")])
1724 (define_expand "tablejump"
1726 (match_operand 0 "register_operand" "d"))
1727 (use (label_ref (match_operand 1 "" "")))]
1731 if (operands[0]) /* eliminate unused code warnings */
1733 if (GET_MODE (operands[0]) != Pmode)
1736 if (!(Pmode == DImode))
1737 emit_jump_insn (gen_tablejump_internal1 (operands[0], operands[1]));
1739 emit_jump_insn (gen_tablejump_internal2 (operands[0], operands[1]));
1745 (define_insn "tablejump_internal1"
1747 (match_operand:SI 0 "register_operand" "d"))
1748 (use (label_ref (match_operand 1 "" "")))]
1749 "!(Pmode == DImode)"
1751 [(set_attr "type" "jump")
1752 (set_attr "mode" "none")])
1754 (define_expand "tablejump_internal3"
1755 [(parallel [(set (pc)
1756 (plus:SI (match_operand:SI 0 "register_operand" "d")
1757 (label_ref:SI (match_operand 1 "" ""))))
1758 (use (label_ref:SI (match_dup 1)))])]
1762 ;;; Make sure that this only matches the insn before ADDR_DIFF_VEC. Otherwise
1763 ;;; it is not valid. ??? With the USE, the condition tests may not be required
1766 ;;; ??? The length depends on the ABI. It is two for o32, and one for n32.
1767 ;;; We just use the conservative number here.
1771 (plus:SI (match_operand:SI 0 "register_operand" "d")
1772 (label_ref:SI (match_operand 1 "" ""))))
1773 (use (label_ref:SI (match_dup 1)))]
1774 "!(Pmode == DImode) && next_active_insn (insn) != 0
1775 && GET_CODE (PATTERN (next_active_insn (insn))) == ADDR_DIFF_VEC
1776 && PREV_INSN (next_active_insn (insn)) == operands[1]"
1781 [(set_attr "type" "jump")
1782 (set_attr "mode" "none")
1783 (set_attr "length" "8")])
1786 ;; ....................
1788 ;; Function prologue/epilogue
1790 ;; ....................
1793 (define_expand "prologue"
1798 if (iq2000_isa >= 0) /* avoid unused code warnings */
1800 iq2000_expand_prologue ();
1805 ;; Block any insns from being moved before this point, since the
1806 ;; profiling call to mcount can use various registers that aren't
1807 ;; saved or used to pass arguments.
1809 (define_insn "blockage"
1810 [(unspec_volatile [(const_int 0)] 0)]
1813 [(set_attr "type" "unknown")
1814 (set_attr "mode" "none")
1815 (set_attr "length" "0")])
1817 (define_expand "epilogue"
1822 if (iq2000_isa >= 0) /* avoid unused code warnings */
1824 iq2000_expand_epilogue ();
1829 ;; Trivial return. Make it look like a normal return insn as that
1830 ;; allows jump optimizations to work better .
1831 (define_insn "return"
1833 "iq2000_can_use_return_insn ()"
1835 [(set_attr "type" "jump")
1836 (set_attr "mode" "none")])
1840 (define_insn "return_internal"
1841 [(use (match_operand 0 "pmode_register_operand" ""))
1848 [(set_attr "type" "jump")
1849 (set_attr "mode" "none")])
1851 (define_insn "eh_return_internal"
1858 [(set_attr "type" "jump")
1859 (set_attr "mode" "none")])
1861 (define_expand "eh_return"
1862 [(use (match_operand:SI 0 "register_operand" "r"))]
1866 iq2000_expand_eh_return (operands[0]);
1872 ;; ....................
1876 ;; ....................
1878 ;; calls.c now passes a third argument, make saber happy
1880 (define_expand "call"
1881 [(parallel [(call (match_operand 0 "memory_operand" "m")
1882 (match_operand 1 "" "i"))
1883 (clobber (reg:SI 31))
1884 (use (match_operand 2 "" "")) ;; next_arg_reg
1885 (use (match_operand 3 "" ""))])] ;; struct_value_size_rtx
1891 if (operands[0]) /* eliminate unused code warnings */
1893 addr = XEXP (operands[0], 0);
1894 if ((GET_CODE (addr) != REG && (!CONSTANT_ADDRESS_P (addr)))
1895 || ! call_insn_operand (addr, VOIDmode))
1896 XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, addr);
1898 /* In order to pass small structures by value in registers
1899 compatibly with the IQ2000 compiler, we need to shift the value
1900 into the high part of the register. Function_arg has encoded
1901 a PARALLEL rtx, holding a vector of adjustments to be made
1902 as the next_arg_reg variable, so we split up the insns,
1903 and emit them separately. */
1905 if (operands[2] != (rtx)0 && GET_CODE (operands[2]) == PARALLEL)
1907 rtvec adjust = XVEC (operands[2], 0);
1908 int num = GET_NUM_ELEM (adjust);
1911 for (i = 0; i < num; i++)
1912 emit_insn (RTVEC_ELT (adjust, i));
1915 emit_call_insn (gen_call_internal0 (operands[0], operands[1],
1916 gen_rtx_REG (SImode,
1917 GP_REG_FIRST + 31)));
1922 (define_expand "call_internal0"
1923 [(parallel [(call (match_operand 0 "" "")
1924 (match_operand 1 "" ""))
1925 (clobber (match_operand:SI 2 "" ""))])]
1929 (define_insn "call_internal1"
1930 [(call (mem (match_operand 0 "call_insn_operand" "ri"))
1931 (match_operand 1 "" "i"))
1932 (clobber (match_operand:SI 2 "register_operand" "=d"))]
1936 register rtx target = operands[0];
1938 if (GET_CODE (target) == CONST_INT)
1939 return \"li\\t%@,%0\\n\\tjalr\\t%2,%@\";
1940 else if (CONSTANT_ADDRESS_P (target))
1941 return \"jal\\t%0\";
1943 return \"jalr\\t%2,%0\";
1945 [(set_attr "type" "call")
1946 (set_attr "mode" "none")])
1948 ;; calls.c now passes a fourth argument, make saber happy
1950 (define_expand "call_value"
1951 [(parallel [(set (match_operand 0 "register_operand" "=df")
1952 (call (match_operand 1 "memory_operand" "m")
1953 (match_operand 2 "" "i")))
1954 (clobber (reg:SI 31))
1955 (use (match_operand 3 "" ""))])] ;; next_arg_reg
1961 if (operands[0]) /* eliminate unused code warning */
1963 addr = XEXP (operands[1], 0);
1964 if ((GET_CODE (addr) != REG && (!CONSTANT_ADDRESS_P (addr)))
1965 || ! call_insn_operand (addr, VOIDmode))
1966 XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, addr);
1968 /* In order to pass small structures by value in registers
1969 compatibly with the IQ2000 compiler, we need to shift the value
1970 into the high part of the register. Function_arg has encoded
1971 a PARALLEL rtx, holding a vector of adjustments to be made
1972 as the next_arg_reg variable, so we split up the insns,
1973 and emit them separately. */
1975 if (operands[3] != (rtx)0 && GET_CODE (operands[3]) == PARALLEL)
1977 rtvec adjust = XVEC (operands[3], 0);
1978 int num = GET_NUM_ELEM (adjust);
1981 for (i = 0; i < num; i++)
1982 emit_insn (RTVEC_ELT (adjust, i));
1985 if (GET_CODE (operands[0]) == PARALLEL && XVECLEN (operands[0], 0) > 1)
1987 emit_call_insn (gen_call_value_multiple_internal0
1988 (XEXP (XVECEXP (operands[0], 0, 0), 0),
1989 operands[1], operands[2],
1990 XEXP (XVECEXP (operands[0], 0, 1), 0),
1991 gen_rtx_REG (SImode, GP_REG_FIRST + 31)));
1995 /* We have a call returning a DImode structure in an FP reg.
1996 Strip off the now unnecessary PARALLEL. */
1997 if (GET_CODE (operands[0]) == PARALLEL)
1998 operands[0] = XEXP (XVECEXP (operands[0], 0, 0), 0);
2000 emit_call_insn (gen_call_value_internal0 (operands[0], operands[1], operands[2],
2001 gen_rtx_REG (SImode,
2002 GP_REG_FIRST + 31)));
2008 (define_expand "call_value_internal0"
2009 [(parallel [(set (match_operand 0 "" "")
2010 (call (match_operand 1 "" "")
2011 (match_operand 2 "" "")))
2012 (clobber (match_operand:SI 3 "" ""))])]
2016 (define_insn "call_value_internal1"
2017 [(set (match_operand 0 "register_operand" "=df")
2018 (call (mem (match_operand 1 "call_insn_operand" "ri"))
2019 (match_operand 2 "" "i")))
2020 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2024 register rtx target = operands[1];
2026 if (GET_CODE (target) == CONST_INT)
2027 return \"li\\t%@,%1\\n\\tjalr\\t%3,%@\";
2028 else if (CONSTANT_ADDRESS_P (target))
2029 return \"jal\\t%1\";
2031 return \"jalr\\t%3,%1\";
2033 [(set_attr "type" "call")
2034 (set_attr "mode" "none")])
2036 (define_expand "call_value_multiple_internal0"
2037 [(parallel [(set (match_operand 0 "" "")
2038 (call (match_operand 1 "" "")
2039 (match_operand 2 "" "")))
2040 (set (match_operand 3 "" "")
2043 (clobber (match_operand:SI 4 "" ""))])]
2047 ;; ??? May eventually need all 6 versions of the call patterns with multiple
2050 (define_insn "call_value_multiple_internal1"
2051 [(set (match_operand 0 "register_operand" "=df")
2052 (call (mem (match_operand 1 "call_insn_operand" "ri"))
2053 (match_operand 2 "" "i")))
2054 (set (match_operand 3 "register_operand" "=df")
2055 (call (mem (match_dup 1))
2057 (clobber (match_operand:SI 4 "register_operand" "=d"))]
2061 register rtx target = operands[1];
2063 if (GET_CODE (target) == CONST_INT)
2064 return \"li\\t%@,%1\\n\\tjalr\\t%4,%@\";
2065 else if (CONSTANT_ADDRESS_P (target))
2066 return \"jal\\t%1\";
2068 return \"jalr\\t%4,%1\";
2070 [(set_attr "type" "call")
2071 (set_attr "mode" "none")])
2073 ;; Call subroutine returning any type.
2075 (define_expand "untyped_call"
2076 [(parallel [(call (match_operand 0 "" "")
2078 (match_operand 1 "" "")
2079 (match_operand 2 "" "")])]
2083 if (operands[0]) /* silence statement not reached warnings */
2087 emit_call_insn (GEN_CALL (operands[0], const0_rtx, NULL, const0_rtx));
2089 for (i = 0; i < XVECLEN (operands[2], 0); i++)
2091 rtx set = XVECEXP (operands[2], 0, i);
2092 emit_move_insn (SET_DEST (set), SET_SRC (set));
2095 emit_insn (gen_blockage ());
2101 ;; ....................
2105 ;; ....................
2112 [(set_attr "type" "nop")
2113 (set_attr "mode" "none")])
2116 ;; For the rare case where we need to load an address into a register
2117 ;; that can not be recognized by the normal movsi/addsi instructions.
2118 ;; I have no idea how many insns this can actually generate. It should
2119 ;; be rare, so over-estimating as 10 instructions should not have any
2120 ;; real performance impact.
2121 (define_insn "leasi"
2122 [(set (match_operand:SI 0 "register_operand" "=d")
2123 (match_operand:SI 1 "address_operand" "p"))]
2129 xoperands[0] = operands[0];
2130 xoperands[1] = XEXP (operands[1], 0);
2131 xoperands[2] = XEXP (operands[1], 1);
2132 output_asm_insn (\"addiu\\t%0,%1,%2\", xoperands);
2135 [(set_attr "type" "arith")
2136 (set_attr "mode" "SI")
2137 (set_attr "length" "40")])
2139 (define_insn "ado16"
2140 [(set (match_operand:SI 0 "register_operand" "=r")
2141 (unspec:SI [(match_operand:SI 1 "register_operand" "r")
2142 (match_operand:SI 2 "register_operand" "r")]
2145 "ado16\\t%0, %1, %2"
2149 [(set (match_operand:SI 0 "register_operand" "=r")
2150 (unspec:SI [(match_operand:SI 1 "register_operand" "r")
2151 (match_operand:SI 2 "const_int_operand" "I")
2152 (match_operand:SI 3 "const_int_operand" "I")
2153 (match_operand:SI 4 "const_int_operand" "I")]
2156 "ram\\t%0, %1, %2, %3, %4"
2159 (define_insn "chkhdr"
2160 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "=r")
2161 (match_operand:SI 1 "register_operand" "r")]
2164 "* return iq2000_fill_delay_slot (\"chkhdr\\t%0, %1\", DELAY_LOAD, operands, insn);"
2165 [(set_attr "dslot" "not_in_dslot")]
2169 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2170 (match_operand:SI 1 "register_operand" "r")]
2173 "* return iq2000_fill_delay_slot (\"pkrl\\t%0, %1\", DELAY_NONE, operands, insn);"
2174 [(set_attr "dslot" "not_in_dslot")]
2178 [(set (match_operand:SI 0 "register_operand" "=r")
2179 (unspec_volatile:SI [(match_operand:SI 1 "const_int_operand" "I")]
2182 "* return iq2000_fill_delay_slot (\"cfc0\\t%0, %%%1\", DELAY_LOAD, operands, insn);"
2183 [(set_attr "dslot" "ok_in_dslot")]
2187 [(set (match_operand:SI 0 "register_operand" "=r")
2188 (unspec_volatile:SI [(match_operand:SI 1 "const_int_operand" "I")]
2191 "* return iq2000_fill_delay_slot (\"cfc1\\t%0, %%%1\", DELAY_LOAD, operands, insn);"
2192 [(set_attr "dslot" "ok_in_dslot")]
2196 [(set (match_operand:SI 0 "register_operand" "=r")
2197 (unspec_volatile:SI [(match_operand:SI 1 "const_int_operand" "I")]
2200 "* return iq2000_fill_delay_slot (\"cfc2\\t%0, %%%1\", DELAY_LOAD, operands, insn);"
2201 [(set_attr "dslot" "not_in_dslot")]
2205 [(set (match_operand:SI 0 "register_operand" "=r")
2206 (unspec_volatile:SI [(match_operand:SI 1 "const_int_operand" "I")]
2209 "* return iq2000_fill_delay_slot (\"cfc3\\t%0, %%%1\", DELAY_LOAD, operands, insn);"
2210 [(set_attr "dslot" "not_in_dslot")]
2214 [(unspec_volatile:SI [(match_operand:SI 0 "reg_or_0_operand" "rJ")
2215 (match_operand:SI 1 "const_int_operand" "I")]
2218 "* return iq2000_fill_delay_slot (\"ctc0\\t%z0, %%%1\", DELAY_NONE, operands, insn);"
2219 [(set_attr "dslot" "ok_in_dslot")]
2223 [(unspec_volatile:SI [(match_operand:SI 0 "reg_or_0_operand" "rJ")
2224 (match_operand:SI 1 "const_int_operand" "I")]
2227 "* return iq2000_fill_delay_slot (\"ctc1\\t%z0, %%%1\", DELAY_NONE, operands, insn);"
2228 [(set_attr "dslot" "ok_in_dslot")]
2232 [(unspec_volatile:SI [(match_operand:SI 0 "reg_or_0_operand" "rJ")
2233 (match_operand:SI 1 "const_int_operand" "I")]
2236 "* return iq2000_fill_delay_slot (\"ctc2\\t%z0, %%%1\", DELAY_NONE, operands, insn);"
2237 [(set_attr "dslot" "ok_in_dslot")]
2241 [(unspec_volatile:SI [(match_operand:SI 0 "reg_or_0_operand" "rJ")
2242 (match_operand:SI 1 "const_int_operand" "I")]
2245 "* return iq2000_fill_delay_slot (\"ctc3\\t%z0, %%%1\", DELAY_NONE, operands, insn);"
2246 [(set_attr "dslot" "ok_in_dslot")]
2250 [(set (match_operand:SI 0 "register_operand" "=r")
2251 (unspec_volatile:SI [(match_operand:SI 1 "const_int_operand" "I")]
2254 "* return iq2000_fill_delay_slot (\"mfc0\\t%0, %%%1\", DELAY_LOAD, operands, insn);"
2255 [(set_attr "dslot" "ok_in_dslot")]
2259 [(set (match_operand:SI 0 "register_operand" "=r")
2260 (unspec_volatile:SI [(match_operand:SI 1 "const_int_operand" "I")]
2263 "* return iq2000_fill_delay_slot (\"mfc1\\t%0, %%%1\", DELAY_LOAD, operands, insn);"
2264 [(set_attr "dslot" "ok_in_dslot")]
2268 [(set (match_operand:SI 0 "register_operand" "=r")
2269 (unspec_volatile:SI [(match_operand:SI 1 "const_int_operand" "I")]
2272 "* return iq2000_fill_delay_slot (\"mfc2\\t%0, %%%1\", DELAY_LOAD, operands, insn);"
2273 [(set_attr "dslot" "not_in_dslot")]
2277 [(set (match_operand:SI 0 "register_operand" "=r")
2278 (unspec_volatile:SI [(match_operand:SI 1 "const_int_operand" "I")]
2281 "* return iq2000_fill_delay_slot (\"mfc3\\t%0, %%%1\", DELAY_LOAD, operands, insn);"
2282 [(set_attr "dslot" "not_in_dslot")]
2286 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2287 (match_operand:SI 1 "const_int_operand" "I")]
2290 "* return iq2000_fill_delay_slot (\"mtc0\\t%0, %%%1\", DELAY_NONE, operands, insn);"
2291 [(set_attr "dslot" "ok_in_dslot")]
2295 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2296 (match_operand:SI 1 "const_int_operand" "I")]
2299 "* return iq2000_fill_delay_slot (\"mtc1\\t%0, %%%1\", DELAY_NONE, operands, insn);"
2300 [(set_attr "dslot" "ok_in_dslot")]
2304 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2305 (match_operand:SI 1 "const_int_operand" "I")]
2308 "* return iq2000_fill_delay_slot (\"mtc2\\t%0, %%%1\", DELAY_NONE, operands, insn);"
2309 [(set_attr "dslot" "ok_in_dslot")]
2313 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2314 (match_operand:SI 1 "const_int_operand" "I")]
2317 "* return iq2000_fill_delay_slot (\"mtc3\\t%0, %%%1\", DELAY_NONE, operands, insn);"
2318 [(set_attr "dslot" "ok_in_dslot")]
2322 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2323 (match_operand:SI 1 "register_operand" "r")]
2326 "* return iq2000_fill_delay_slot (\"lur\\t%0, %1\", DELAY_NONE, operands, insn);"
2327 [(set_attr "dslot" "not_in_dslot")]
2331 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2332 (match_operand:SI 1 "register_operand" "r")]
2335 "* return iq2000_fill_delay_slot (\"rb\\t%0, %1\", DELAY_NONE, operands, insn);"
2336 [(set_attr "dslot" "not_in_dslot")]
2340 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2341 (match_operand:SI 1 "register_operand" "r")]
2344 "* return iq2000_fill_delay_slot (\"rx\\t%0, %1\", DELAY_NONE, operands, insn);"
2345 [(set_attr "dslot" "not_in_dslot")]
2349 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")]
2352 "* return iq2000_fill_delay_slot (\"srrd\\t%0\", DELAY_NONE, operands, insn);"
2353 [(set_attr "dslot" "not_in_dslot")]
2357 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2358 (match_operand:SI 1 "register_operand" "r")]
2361 "* return iq2000_fill_delay_slot (\"srwr\\t%0, %1\", DELAY_NONE, operands, insn);"
2362 [(set_attr "dslot" "not_in_dslot")]
2366 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2367 (match_operand:SI 1 "register_operand" "r")]
2370 "* return iq2000_fill_delay_slot (\"wb\\t%0, %1\", DELAY_NONE, operands, insn);"
2371 [(set_attr "dslot" "not_in_dslot")]
2375 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2376 (match_operand:SI 1 "register_operand" "r")]
2379 "* return iq2000_fill_delay_slot (\"wx\\t%0, %1\", DELAY_NONE, operands, insn);"
2380 [(set_attr "dslot" "not_in_dslot")]
2383 (define_insn "luc32"
2384 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2385 (match_operand:SI 1 "register_operand" "r")]
2388 "* return iq2000_fill_delay_slot (\"luc32\\t%0, %1\", DELAY_NONE, operands, insn);"
2389 [(set_attr "dslot" "not_in_dslot")]
2392 (define_insn "luc32l"
2393 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2394 (match_operand:SI 1 "register_operand" "r")]
2397 "* return iq2000_fill_delay_slot (\"luc32l\\t%0, %1\", DELAY_NONE, operands, insn);"
2398 [(set_attr "dslot" "not_in_dslot")]
2401 (define_insn "luc64"
2402 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2403 (match_operand:SI 1 "register_operand" "r")]
2406 "* return iq2000_fill_delay_slot (\"luc64\\t%0, %1\", DELAY_NONE, operands, insn);"
2407 [(set_attr "dslot" "not_in_dslot")]
2410 (define_insn "luc64l"
2411 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2412 (match_operand:SI 1 "register_operand" "r")]
2415 "* return iq2000_fill_delay_slot (\"luc64l\\t%0, %1\", DELAY_NONE, operands, insn);"
2416 [(set_attr "dslot" "not_in_dslot")]
2420 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2421 (match_operand:SI 1 "register_operand" "r")]
2424 "* return iq2000_fill_delay_slot (\"luk\\t%0, %1\", DELAY_NONE, operands, insn);"
2425 [(set_attr "dslot" "ok_in_dslot")]
2428 (define_insn "lulck"
2429 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")]
2432 "* return iq2000_fill_delay_slot (\"lulck\\t%0\", DELAY_NONE, operands, insn);"
2433 [(set_attr "dslot" "not_in_dslot")]
2436 (define_insn "lum32"
2437 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2438 (match_operand:SI 1 "register_operand" "r")]
2441 "* return iq2000_fill_delay_slot (\"lum32\\t%0, %1\", DELAY_NONE, operands, insn);"
2442 [(set_attr "dslot" "not_in_dslot")]
2445 (define_insn "lum32l"
2446 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2447 (match_operand:SI 1 "register_operand" "r")]
2450 "* return iq2000_fill_delay_slot (\"lum32l\\t%0, %1\", DELAY_NONE, operands, insn);"
2451 [(set_attr "dslot" "not_in_dslot")]
2454 (define_insn "lum64"
2455 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2456 (match_operand:SI 1 "register_operand" "r")]
2459 "* return iq2000_fill_delay_slot (\"lum64\\t%0, %1\", DELAY_NONE, operands, insn);"
2460 [(set_attr "dslot" "not_in_dslot")]
2463 (define_insn "lum64l"
2464 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2465 (match_operand:SI 1 "register_operand" "r")]
2468 "* return iq2000_fill_delay_slot (\"lum64l\\t%0, %1\", DELAY_NONE, operands, insn);"
2469 [(set_attr "dslot" "not_in_dslot")]
2473 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2474 (match_operand:SI 1 "register_operand" "r")]
2477 "* return iq2000_fill_delay_slot (\"lurl\\t%0, %1\", DELAY_NONE, operands, insn);"
2478 [(set_attr "dslot" "not_in_dslot")]
2482 [(set (match_operand:SI 0 "register_operand" "=r")
2483 (unspec_volatile:SI [(match_operand:SI 1 "register_operand" "r")
2484 (match_operand:SI 2 "register_operand" "r")
2485 (match_operand:SI 3 "const_int_operand" "I")]
2488 "* return iq2000_fill_delay_slot (\"mrgb\\t%0, %1, %2, %3\", DELAY_LOAD, operands, insn);"
2489 [(set_attr "dslot" "ok_in_dslot")]
2492 (define_insn "srrdl"
2493 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")]
2496 "* return iq2000_fill_delay_slot (\"srrdl\\t%0\", DELAY_NONE, operands, insn);"
2497 [(set_attr "dslot" "not_in_dslot")]
2500 (define_insn "srulck"
2501 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")]
2504 "* return iq2000_fill_delay_slot (\"srulck\\t%0\", DELAY_NONE, operands, insn);"
2505 [(set_attr "dslot" "not_in_dslot")]
2508 (define_insn "srwru"
2509 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2510 (match_operand:SI 1 "register_operand" "r")]
2513 "* return iq2000_fill_delay_slot (\"srwru\\t%0, %1\", DELAY_NONE, operands, insn);"
2514 [(set_attr "dslot" "not_in_dslot")]
2517 (define_insn "trapqfl"
2518 [(unspec_volatile:SI [(const_int 1)] UNSPEC_TRAPQFL)]
2520 "* return iq2000_fill_delay_slot (\"trapqfl\", DELAY_NONE, operands, insn);"
2521 [(set_attr "dslot" "not_in_dslot")]
2524 (define_insn "trapqne"
2525 [(unspec_volatile:SI [(const_int 2)] UNSPEC_TRAPQNE)]
2527 "* return iq2000_fill_delay_slot (\"trapqne\", DELAY_NONE, operands, insn);"
2528 [(set_attr "dslot" "not_in_dslot")]
2531 (define_insn "traprel"
2532 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")]
2535 "* return iq2000_fill_delay_slot (\"traprel %0\", DELAY_NONE, operands, insn);"
2536 [(set_attr "dslot" "not_in_dslot")]
2540 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
2541 (match_operand:SI 1 "register_operand" "r")]
2544 "* return iq2000_fill_delay_slot (\"wbu\\t%0, %1\", DELAY_NONE, operands, insn);"
2545 [(set_attr "dslot" "not_in_dslot")]
2548 (define_insn "syscall"
2549 [(unspec_volatile:SI [(const_int 2)] UNSPEC_SYSCALL)]
2552 [(set_attr "dslot" "not_in_dslot")]