1 ;; Machine description for GNU compiler, Tahoe version
2 ;; Copyright (C) 1989, 1994, 1996, 1997 Free Software Foundation, Inc.
4 ;; This file is part of GNU CC.
6 ;; GNU CC 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 ;; GNU CC 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 GNU CC; see the file COPYING. If not, write to
18 ;; the Free Software Foundation, 59 Temple Place - Suite 330,
19 ;; Boston, MA 02111-1307, USA.
24 ; Original port made at the University of Buffalo by Devon Bowen,
25 ; Dale Wiles and Kevin Zachmann.
27 ; Piet van Oostrum (piet@cs.ruu.nl) made changes for HCX/UX, fixed
28 ; some bugs and made some improvements (hopefully).
30 ; Mail bugs reports or fixes to: gcc@cs.buffalo.edu
33 ; movdi must call the output_move_double routine to move it around since
34 ; the tahoe doesn't efficiently support 8 bit moves.
37 [(set (match_operand:DI 0 "general_operand" "=g")
38 (match_operand:DI 1 "general_operand" "g"))]
43 return output_move_double (operands);
47 ; the trick in the movsi is accessing the contents of the sp register. The
48 ; tahoe doesn't allow you to access it directly so you have to access the
49 ; address of the top of the stack instead.
52 [(set (match_operand:SI 0 "general_operand" "=g")
53 (match_operand:SI 1 "general_operand" "g"))]
58 if (operands[1] == const1_rtx
59 && (link = find_reg_note (insn, REG_WAS_0, 0))
60 && ! INSN_DELETED_P (XEXP (link, 0))
61 && GET_CODE (XEXP (link, 0)) != NOTE
62 && no_labels_between_p (XEXP (link, 0), insn)
63 /* Make sure the reg hasn't been clobbered. */
64 && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
66 if (GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == CONST)
68 if (push_operand (operands[0], SImode))
69 return \"pushab %a1\";
70 return \"movab %a1,%0\";
72 if (operands[1] == const0_rtx)
74 if (push_operand (operands[0], SImode))
76 if (GET_CODE(operands[1]) == REG && REGNO(operands[1]) == 14)
77 return \"moval (sp),%0\";
78 return \"movl %1,%0\";
83 [(set (match_operand:HI 0 "general_operand" "=g")
84 (match_operand:HI 1 "general_operand" "g"))]
89 if (operands[1] == const1_rtx
90 && (link = find_reg_note (insn, REG_WAS_0, 0))
91 && ! INSN_DELETED_P (XEXP (link, 0))
92 && GET_CODE (XEXP (link, 0)) != NOTE
93 && no_labels_between_p (XEXP (link, 0), insn)
94 /* Make sure the reg hasn't been clobbered. */
95 && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
97 if (operands[1] == const0_rtx)
99 return \"movw %1,%0\";
104 [(set (match_operand:QI 0 "general_operand" "=g")
105 (match_operand:QI 1 "general_operand" "g"))]
109 if (operands[1] == const0_rtx)
111 return \"movb %1,%0\";
115 ; movsf has three cases since they can move from one place to another
116 ; or to/from the fpp and since different instructions are needed for
117 ; each case. The fpp related instructions don't set the flags properly.
120 [(set (match_operand:SF 0 "general_operand" "=g,=a,=g")
121 (match_operand:SF 1 "general_operand" "g,g,a"))]
126 switch (which_alternative)
128 case 0: return \"movl %1,%0\";
129 case 1: return \"ldf %1\";
130 case 2: return \"stf %0\";
135 ; movdf has a number of different cases. If it's going to or from
136 ; the fpp, use the special instructions to do it. If not, use the
137 ; output_move_double function.
140 [(set (match_operand:DF 0 "general_operand" "=a,=g,?=g")
141 (match_operand:DF 1 "general_operand" "g,a,g"))]
146 switch (which_alternative)
151 if (push_operand (operands[0], DFmode))
156 return output_move_double (operands);
161 ;========================================================================
162 ; The tahoe has the following semantics for byte (and similar for word)
163 ; operands: if the operand is a register or immediate, it takes the full 32
164 ; bit operand, if the operand is memory, it sign-extends the byte. The
165 ; operation is performed on the 32 bit values. If the destination is a
166 ; register, the full 32 bit result is stored, if the destination is memory,
167 ; of course only the low part is stored. The condition code is based on the
168 ; 32 bit operation. Only on the movz instructions the byte from memory is
169 ; zero-extended rather than sign-extended.
171 ; This means that for arithmetic instructions we can use addb etc. to
172 ; perform a long add from a signed byte from memory to a register. Of
173 ; course this would also work for logical operations, but that doesn't seem
177 [(set (match_operand:SI 0 "register_operand" "=r")
178 (plus:SI (sign_extend:SI (match_operand:QI 1 "memory_operand" "m"))
179 (sign_extend:SI (match_operand:QI 2 "memory_operand" "m"))))]
184 [(set (match_operand:SI 0 "register_operand" "=r")
185 (plus:SI (match_operand:SI 1 "nonmemory_operand" "%ri")
186 (sign_extend:SI (match_operand:QI 2 "memory_operand" "m"))))]
190 if (rtx_equal_p (operands[0], operands[1]))
191 return \"addb2 %2,%0\";
192 return \"addb3 %1,%2,%0\";
195 ; We can also consider the result to be a half integer
198 [(set (match_operand:HI 0 "register_operand" "=r")
199 (plus:HI (sign_extend:HI (match_operand:QI 1 "memory_operand" "m"))
200 (sign_extend:HI (match_operand:QI 2 "memory_operand" "m"))))]
205 [(set (match_operand:HI 0 "register_operand" "=r")
206 (plus:HI (match_operand:HI 1 "nonmemory_operand" "%ri")
207 (sign_extend:HI (match_operand:QI 2 "memory_operand" "m"))))]
211 if (rtx_equal_p (operands[0], operands[1]))
212 return \"addb2 %2,%0\";
213 return \"addb3 %1,%2,%0\";
216 ; The same applies to words (HI)
219 [(set (match_operand:SI 0 "register_operand" "=r")
220 (plus:SI (sign_extend:SI (match_operand:HI 1 "memory_operand" "m"))
221 (sign_extend:SI (match_operand:HI 2 "memory_operand" "m"))))]
226 [(set (match_operand:SI 0 "register_operand" "=r")
227 (plus:SI (match_operand:SI 1 "nonmemory_operand" "%ri")
228 (sign_extend:SI (match_operand:HI 2 "memory_operand" "m"))))]
232 if (rtx_equal_p (operands[0], operands[1]))
233 return \"addw2 %2,%0\";
234 return \"addw3 %1,%2,%0\";
237 ; ======================= Now for subtract ==============================
240 [(set (match_operand:SI 0 "register_operand" "=r")
241 (minus:SI (sign_extend:SI (match_operand:QI 1 "memory_operand" "m"))
242 (sign_extend:SI (match_operand:QI 2 "memory_operand" "m"))))]
247 [(set (match_operand:SI 0 "register_operand" "=r")
248 (minus:SI (match_operand:SI 1 "nonmemory_operand" "ri")
249 (sign_extend:SI (match_operand:QI 2 "memory_operand" "m"))))]
253 if (rtx_equal_p (operands[0], operands[1]))
254 return \"subb2 %2,%0\";
255 return \"subb3 %2,%1,%0\";
259 [(set (match_operand:SI 0 "register_operand" "=r")
260 (minus:SI (sign_extend:SI (match_operand:QI 1 "memory_operand" "m"))
261 (match_operand:SI 2 "nonmemory_operand" "ri")))]
265 ; We can also consider the result to be a half integer
268 [(set (match_operand:HI 0 "register_operand" "=r")
269 (minus:HI (sign_extend:HI (match_operand:QI 1 "memory_operand" "m"))
270 (sign_extend:HI (match_operand:QI 2 "memory_operand" "m"))))]
275 [(set (match_operand:HI 0 "register_operand" "=r")
276 (minus:HI (match_operand:HI 1 "nonmemory_operand" "%ri")
277 (sign_extend:HI (match_operand:QI 2 "memory_operand" "m"))))]
281 if (rtx_equal_p (operands[0], operands[1]))
282 return \"subb2 %2,%0\";
283 return \"subb3 %2,%1,%0\";
287 [(set (match_operand:HI 0 "register_operand" "=r")
288 (minus:HI (sign_extend:HI (match_operand:QI 1 "memory_operand" "m"))
289 (match_operand:HI 2 "nonmemory_operand" "ri")))]
293 ; The same applies to words (HI)
296 [(set (match_operand:SI 0 "register_operand" "=r")
297 (minus:SI (sign_extend:SI (match_operand:HI 1 "memory_operand" "m"))
298 (sign_extend:SI (match_operand:HI 2 "memory_operand" "m"))))]
303 [(set (match_operand:SI 0 "register_operand" "=r")
304 (minus:SI (match_operand:SI 1 "nonmemory_operand" "ri")
305 (sign_extend:SI (match_operand:HI 2 "memory_operand" "m"))))]
309 if (rtx_equal_p (operands[0], operands[1]))
310 return \"subw2 %2,%0\";
311 return \"subw3 %2,%1,%0\";
315 [(set (match_operand:SI 0 "register_operand" "=r")
316 (minus:SI (sign_extend:SI (match_operand:HI 1 "memory_operand" "m"))
317 (match_operand:SI 2 "nonmemory_operand" "ri")))]
321 ; ======================= Now for neg ==============================
324 [(set (match_operand:SI 0 "register_operand" "=r")
325 (neg:SI (sign_extend:SI (match_operand:QI 1 "memory_operand" "m"))))]
330 [(set (match_operand:HI 0 "register_operand" "=r")
331 (neg:HI (sign_extend:HI (match_operand:QI 1 "memory_operand" "m"))))]
336 [(set (match_operand:SI 0 "register_operand" "=r")
337 (neg:SI (sign_extend:SI (match_operand:HI 1 "memory_operand" "m"))))]
341 ;========================================================================
344 (define_insn "addsi3"
345 [(set (match_operand:SI 0 "general_operand" "=g")
346 (plus:SI (match_operand:SI 1 "general_operand" "g")
347 (match_operand:SI 2 "general_operand" "g")))]
351 if (rtx_equal_p (operands[0], operands[1]))
353 if (operands[2] == const1_rtx)
355 if (GET_CODE (operands[2]) == CONST_INT
356 && INTVAL (operands[2]) == -1)
358 if (GET_CODE (operands[2]) == CONST_INT
359 && (unsigned) (- INTVAL (operands[2])) < 64)
360 return \"subl2 $%n2,%0\";
361 return \"addl2 %2,%0\";
363 if (rtx_equal_p (operands[0], operands[2]))
364 return \"addl2 %1,%0\";
365 if (GET_CODE (operands[2]) == CONST_INT
366 && GET_CODE (operands[1]) == REG)
368 if (push_operand (operands[0], SImode))
369 return \"pushab %c2(%1)\";
370 return \"movab %c2(%1),%0\";
372 if (GET_CODE (operands[2]) == CONST_INT
373 && (unsigned) (- INTVAL (operands[2])) < 64)
374 return \"subl3 $%n2,%1,%0\";
375 return \"addl3 %1,%2,%0\";
379 (define_insn "addhi3"
380 [(set (match_operand:HI 0 "general_operand" "=g")
381 (plus:HI (match_operand:HI 1 "general_operand" "g")
382 (match_operand:HI 2 "general_operand" "g")))]
386 if (rtx_equal_p (operands[0], operands[1]))
388 if (operands[2] == const1_rtx)
390 if (GET_CODE (operands[2]) == CONST_INT
391 && INTVAL (operands[2]) == -1)
393 if (GET_CODE (operands[2]) == CONST_INT
394 && (unsigned) (- INTVAL (operands[2])) < 64)
395 return \"subw2 $%n2,%0\";
396 return \"addw2 %2,%0\";
398 if (rtx_equal_p (operands[0], operands[2]))
399 return \"addw2 %1,%0\";
400 if (GET_CODE (operands[2]) == CONST_INT
401 && (unsigned) (- INTVAL (operands[2])) < 64)
402 return \"subw3 $%n2,%1,%0\";
403 return \"addw3 %1,%2,%0\";
407 (define_insn "addqi3"
408 [(set (match_operand:QI 0 "general_operand" "=g")
409 (plus:QI (match_operand:QI 1 "general_operand" "g")
410 (match_operand:QI 2 "general_operand" "g")))]
414 if (rtx_equal_p (operands[0], operands[1]))
416 if (operands[2] == const1_rtx)
418 if (GET_CODE (operands[2]) == CONST_INT
419 && INTVAL (operands[2]) == -1)
421 if (GET_CODE (operands[2]) == CONST_INT
422 && (unsigned) (- INTVAL (operands[2])) < 64)
423 return \"subb2 $%n2,%0\";
424 return \"addb2 %2,%0\";
426 if (rtx_equal_p (operands[0], operands[2]))
427 return \"addb2 %1,%0\";
428 if (GET_CODE (operands[2]) == CONST_INT
429 && (unsigned) (- INTVAL (operands[2])) < 64)
430 return \"subb3 $%n2,%1,%0\";
431 return \"addb3 %1,%2,%0\";
434 ; addsf3 can only add into the fpp register since the fpp is treated
435 ; as a separate unit in the machine. It also doesn't set the flags at
438 (define_insn "addsf3"
439 [(set (match_operand:SF 0 "register_operand" "=a")
440 (plus:SF (match_operand:SF 1 "register_operand" "%0")
441 (match_operand:SF 2 "general_operand" "g")))]
450 ; adddf3 can only add into the fpp reg since the fpp is treated as a
451 ; separate entity. Doubles can only be read from a register or memory
452 ; since a double is not an immediate mode. Flags are not set by this
455 (define_insn "adddf3"
456 [(set (match_operand:DF 0 "register_operand" "=a")
457 (plus:DF (match_operand:DF 1 "register_operand" "%0")
458 (match_operand:DF 2 "general_operand" "rm")))]
467 ; Subtraction from the sp (needed by the built in alloc function) needs
468 ; to be different since the sp cannot be directly read on the tahoe.
469 ; If it's a simple constant, you just use displacement. Otherwise, you
470 ; push the sp, and then do the subtraction off the stack.
472 (define_insn "subsi3"
473 [(set (match_operand:SI 0 "general_operand" "=g")
474 (minus:SI (match_operand:SI 1 "general_operand" "g")
475 (match_operand:SI 2 "general_operand" "g")))]
479 if (rtx_equal_p (operands[0], operands[1]))
481 if (operands[2] == const1_rtx)
483 if (GET_CODE(operands[0]) == REG && REGNO(operands[0]) == 14)
485 if (GET_CODE(operands[2]) == CONST_INT)
486 return \"movab %n2(sp),sp\";
488 return \"pushab (sp)\;subl3 %2,(sp),sp\";
490 return \"subl2 %2,%0\";
492 if (rtx_equal_p (operands[1], operands[2]))
494 return \"subl3 %2,%1,%0\";
498 (define_insn "subhi3"
499 [(set (match_operand:HI 0 "general_operand" "=g")
500 (minus:HI (match_operand:HI 1 "general_operand" "g")
501 (match_operand:HI 2 "general_operand" "g")))]
505 if (rtx_equal_p (operands[0], operands[1]))
507 if (operands[2] == const1_rtx)
509 return \"subw2 %2,%0\";
511 if (rtx_equal_p (operands[1], operands[2]))
513 return \"subw3 %2,%1,%0\";
517 (define_insn "subqi3"
518 [(set (match_operand:QI 0 "general_operand" "=g")
519 (minus:QI (match_operand:QI 1 "general_operand" "g")
520 (match_operand:QI 2 "general_operand" "g")))]
524 if (rtx_equal_p (operands[0], operands[1]))
526 if (operands[2] == const1_rtx)
528 return \"subb2 %2,%0\";
530 if (rtx_equal_p (operands[1], operands[2]))
532 return \"subb3 %2,%1,%0\";
536 ; subsf3 can only subtract into the fpp accumulator due to the way
537 ; the fpp reg is limited by the instruction set. This also doesn't
538 ; bother setting up flags.
540 (define_insn "subsf3"
541 [(set (match_operand:SF 0 "register_operand" "=a")
542 (minus:SF (match_operand:SF 1 "register_operand" "0")
543 (match_operand:SF 2 "general_operand" "g")))]
552 ; subdf3 is set up to subtract into the fpp reg due to limitations
553 ; of the fpp instruction set. Doubles can not be immediate. This
554 ; instruction does not set the flags.
556 (define_insn "subdf3"
557 [(set (match_operand:DF 0 "register_operand" "=a")
558 (minus:DF (match_operand:DF 1 "register_operand" "0")
559 (match_operand:DF 2 "general_operand" "rm")))]
568 (define_insn "mulsi3"
569 [(set (match_operand:SI 0 "general_operand" "=g")
570 (mult:SI (match_operand:SI 1 "general_operand" "g")
571 (match_operand:SI 2 "general_operand" "g")))]
575 if (rtx_equal_p (operands[0], operands[1]))
576 return \"mull2 %2,%0\";
577 if (rtx_equal_p (operands[0], operands[2]))
578 return \"mull2 %1,%0\";
579 return \"mull3 %1,%2,%0\";
583 ; mulsf3 can only multiply into the fpp accumulator due to limitations
584 ; of the fpp. It also does not set the condition codes properly.
586 (define_insn "mulsf3"
587 [(set (match_operand:SF 0 "register_operand" "=a")
588 (mult:SF (match_operand:SF 1 "register_operand" "%0")
589 (match_operand:SF 2 "general_operand" "g")))]
598 ; muldf3 can only multiply into the fpp reg since the fpp is limited
599 ; from the rest. Doubles may not be immediate mode. This does not set
600 ; the flags like gcc would expect.
602 (define_insn "muldf3"
603 [(set (match_operand:DF 0 "register_operand" "=a")
604 (mult:DF (match_operand:DF 1 "register_operand" "%0")
605 (match_operand:DF 2 "general_operand" "rm")))]
615 (define_insn "divsi3"
616 [(set (match_operand:SI 0 "general_operand" "=g")
617 (div:SI (match_operand:SI 1 "general_operand" "g")
618 (match_operand:SI 2 "general_operand" "g")))]
622 if (rtx_equal_p (operands[1], operands[2]))
623 return \"movl $1,%0\";
624 if (operands[1] == const0_rtx)
626 if (GET_CODE (operands[2]) == CONST_INT
627 && INTVAL (operands[2]) == -1)
628 return \"mnegl %1,%0\";
629 if (rtx_equal_p (operands[0], operands[1]))
630 return \"divl2 %2,%0\";
631 return \"divl3 %2,%1,%0\";
635 ; divsf3 must divide into the fpp accumulator. Flags are not set by
636 ; this instruction, so they are cleared.
638 (define_insn "divsf3"
639 [(set (match_operand:SF 0 "register_operand" "=a")
640 (div:SF (match_operand:SF 1 "register_operand" "0")
641 (match_operand:SF 2 "general_operand" "g")))]
650 ; divdf3 also must divide into the fpp reg so optimization isn't
651 ; possible. Note that doubles cannot be immediate. The flags here
652 ; are not set correctly so they must be ignored.
654 (define_insn "divdf3"
655 [(set (match_operand:DF 0 "register_operand" "=a")
656 (div:DF (match_operand:DF 1 "register_operand" "0")
657 (match_operand:DF 2 "general_operand" "rm")))]
667 (define_insn "andsi3"
668 [(set (match_operand:SI 0 "general_operand" "=g")
669 (and:SI (match_operand:SI 1 "general_operand" "g")
670 (match_operand:SI 2 "general_operand" "g")))]
674 if (rtx_equal_p (operands[0], operands[1]))
675 return \"andl2 %2,%0\";
676 if (rtx_equal_p (operands[0], operands[2]))
677 return \"andl2 %1,%0\";
678 return \"andl3 %2,%1,%0\";
683 (define_insn "andhi3"
684 [(set (match_operand:HI 0 "general_operand" "=g")
685 (and:HI (match_operand:HI 1 "general_operand" "g")
686 (match_operand:HI 2 "general_operand" "g")))]
690 if (rtx_equal_p (operands[0], operands[1]))
691 return \"andw2 %2,%0\";
692 if (rtx_equal_p (operands[0], operands[2]))
693 return \"andw2 %1,%0\";
694 return \"andw3 %2,%1,%0\";
698 (define_insn "andqi3"
699 [(set (match_operand:QI 0 "general_operand" "=g")
700 (and:QI (match_operand:QI 1 "general_operand" "g")
701 (match_operand:QI 2 "general_operand" "g")))]
705 if (rtx_equal_p (operands[0], operands[1]))
706 return \"andb2 %2,%0\";
707 if (rtx_equal_p (operands[0], operands[2]))
708 return \"andb2 %1,%0\";
709 return \"andb3 %2,%1,%0\";
713 (define_insn "iorsi3"
714 [(set (match_operand:SI 0 "general_operand" "=g")
715 (ior:SI (match_operand:SI 1 "general_operand" "g")
716 (match_operand:SI 2 "general_operand" "g")))]
720 if (rtx_equal_p (operands[0], operands[1]))
721 return \"orl2 %2,%0\";
722 if (rtx_equal_p (operands[0], operands[2]))
723 return \"orl2 %1,%0\";
724 return \"orl3 %2,%1,%0\";
729 (define_insn "iorhi3"
730 [(set (match_operand:HI 0 "general_operand" "=g")
731 (ior:HI (match_operand:HI 1 "general_operand" "g")
732 (match_operand:HI 2 "general_operand" "g")))]
736 if (rtx_equal_p (operands[0], operands[1]))
737 return \"orw2 %2,%0\";
738 if (rtx_equal_p (operands[0], operands[2]))
739 return \"orw2 %1,%0\";
740 return \"orw3 %2,%1,%0\";
745 (define_insn "iorqi3"
746 [(set (match_operand:QI 0 "general_operand" "=g")
747 (ior:QI (match_operand:QI 1 "general_operand" "g")
748 (match_operand:QI 2 "general_operand" "g")))]
752 if (rtx_equal_p (operands[0], operands[1]))
753 return \"orb2 %2,%0\";
754 if (rtx_equal_p (operands[0], operands[2]))
755 return \"orb2 %1,%0\";
756 return \"orb3 %2,%1,%0\";
760 (define_insn "xorsi3"
761 [(set (match_operand:SI 0 "general_operand" "=g")
762 (xor:SI (match_operand:SI 1 "general_operand" "g")
763 (match_operand:SI 2 "general_operand" "g")))]
767 if (rtx_equal_p (operands[0], operands[1]))
768 return \"xorl2 %2,%0\";
769 if (rtx_equal_p (operands[0], operands[2]))
770 return \"xorl2 %1,%0\";
771 return \"xorl3 %2,%1,%0\";
775 (define_insn "xorhi3"
776 [(set (match_operand:HI 0 "general_operand" "=g")
777 (xor:HI (match_operand:HI 1 "general_operand" "g")
778 (match_operand:HI 2 "general_operand" "g")))]
782 if (rtx_equal_p (operands[0], operands[1]))
783 return \"xorw2 %2,%0\";
784 if (rtx_equal_p (operands[0], operands[2]))
785 return \"xorw2 %1,%0\";
786 return \"xorw3 %2,%1,%0\";
790 (define_insn "xorqi3"
791 [(set (match_operand:QI 0 "general_operand" "=g")
792 (xor:QI (match_operand:QI 1 "general_operand" "g")
793 (match_operand:QI 2 "general_operand" "g")))]
797 if (rtx_equal_p (operands[0], operands[1]))
798 return \"xorb2 %2,%0\";
799 if (rtx_equal_p (operands[0], operands[2]))
800 return \"xorb2 %1,%0\";
801 return \"xorb3 %2,%1,%0\";
805 ; shifts on the tahoe are expensive, try some magic first...
807 (define_insn "ashlsi3"
808 [(set (match_operand:SI 0 "general_operand" "=g")
809 (ashift:SI (match_operand:SI 1 "general_operand" "g")
810 (match_operand:QI 2 "general_operand" "g")))]
814 if (GET_CODE(operands[2]) == REG)
815 return \"mull3 ___shtab[%2],%1,%0\";
816 /* if (GET_CODE(operands[2]) == REG)
817 if (rtx_equal_p (operands[0], operands[1]))
818 return \"mull2 ___shtab[%2],%1\";
820 return \"mull3 ___shtab[%2],%1,%0\"; */
821 if (GET_CODE(operands[1]) == REG)
823 if (operands[2] == const1_rtx)
826 return \"movaw 0[%1],%0\";
828 if (GET_CODE(operands[2]) == CONST_INT && INTVAL(operands[2]) == 2)
831 return \"moval 0[%1],%0\";
834 if (GET_CODE(operands[2]) != CONST_INT || INTVAL(operands[2]) == 1)
835 return \"shal %2,%1,%0\";
836 if (rtx_equal_p (operands[0], operands[1]))
837 return \"mull2 %s2,%1\";
839 return \"mull3 %s2,%1,%0\";
843 (define_insn "ashrsi3"
844 [(set (match_operand:SI 0 "general_operand" "=g")
845 (ashiftrt:SI (match_operand:SI 1 "general_operand" "g")
846 (match_operand:QI 2 "general_operand" "g")))]
851 ; shifts are very expensive, try some magic first...
853 (define_insn "lshrsi3"
854 [(set (match_operand:SI 0 "general_operand" "=g")
855 (lshiftrt:SI (match_operand:SI 1 "general_operand" "g")
856 (match_operand:QI 2 "general_operand" "g")))]
861 (define_insn "negsi2"
862 [(set (match_operand:SI 0 "general_operand" "=g")
863 (neg:SI (match_operand:SI 1 "general_operand" "g")))]
868 (define_insn "neghi2"
869 [(set (match_operand:HI 0 "general_operand" "=g")
870 (neg:HI (match_operand:HI 1 "general_operand" "g")))]
875 (define_insn "negqi2"
876 [(set (match_operand:QI 0 "general_operand" "=g")
877 (neg:QI (match_operand:QI 1 "general_operand" "g")))]
882 ; negsf2 can only negate the value already in the fpp accumulator.
883 ; The value remains in the fpp accumulator. No flags are set.
885 (define_insn "negsf2"
886 [(set (match_operand:SF 0 "register_operand" "=a,=a")
887 (neg:SF (match_operand:SF 1 "register_operand" "a,g")))]
892 switch (which_alternative)
894 case 0: return \"negf\";
895 case 1: return \"lnf %1\";
900 ; negdf2 can only negate the value already in the fpp accumulator.
901 ; The value remains in the fpp accumulator. No flags are set.
903 (define_insn "negdf2"
904 [(set (match_operand:DF 0 "register_operand" "=a,=a")
905 (neg:DF (match_operand:DF 1 "register_operand" "a,g")))]
910 switch (which_alternative)
912 case 0: return \"negd\";
913 case 1: return \"lnd %1\";
918 ; sqrtsf2 tahoe can calculate the square root of a float in the
919 ; fpp accumulator. The answer remains in the fpp accumulator. No
920 ; flags are set by this function.
922 (define_insn "sqrtsf2"
923 [(set (match_operand:SF 0 "register_operand" "=a")
924 (sqrt:SF (match_operand:SF 1 "register_operand" "0")))]
933 ; ffssi2 tahoe instruction gives one less than gcc desired result for
934 ; any given input. So the increment is necessary here.
936 (define_insn "ffssi2"
937 [(set (match_operand:SI 0 "general_operand" "=g")
938 (ffs:SI (match_operand:SI 1 "general_operand" "g")))]
942 if (push_operand(operands[0], SImode))
943 return \"ffs %1,%0\;incl (sp)\";
944 return \"ffs %1,%0\;incl %0\";
948 (define_insn "one_cmplsi2"
949 [(set (match_operand:SI 0 "general_operand" "=g")
950 (not:SI (match_operand:SI 1 "general_operand" "g")))]
955 (define_insn "one_cmplhi2"
956 [(set (match_operand:HI 0 "general_operand" "=g")
957 (not:HI (match_operand:HI 1 "general_operand" "g")))]
962 (define_insn "one_cmplqi2"
963 [(set (match_operand:QI 0 "general_operand" "=g")
964 (not:QI (match_operand:QI 1 "general_operand" "g")))]
969 ; cmpsi works fine, but due to microcode problems, the tahoe doesn't
970 ; properly compare hi's and qi's. Leaving them out seems to be acceptable
971 ; to the compiler, so they were left out. Compares of the stack are
974 ; There are optimized cases possible, however. These follow first.
978 (compare (sign_extend:SI (match_operand:HI 0 "memory_operand" "m"))
979 (sign_extend:SI (match_operand:HI 1 "memory_operand" "m"))))]
985 (compare (match_operand:SI 0 "nonmemory_operand" "ri")
986 (sign_extend:SI (match_operand:HI 1 "memory_operand" "m"))))]
992 (compare (sign_extend:SI (match_operand:HI 0 "memory_operand" "m"))
993 (match_operand:SI 1 "nonmemory_operand" "ri")))]
997 ; zero-extended compares give the same result as sign-extended compares, if
998 ; the compare is unsigned. Just see: if both operands are <65536 they are the
999 ; same in both cases. If both are >=65536 the you effectively compare x+D
1000 ; with y+D, where D=2**32-2**16, so the result is the same. if x<65536 and
1001 ; y>=65536 then you compare x with y+D, and in both cases the result is x<y.
1005 (compare (zero_extend:SI (match_operand:HI 0 "memory_operand" "m"))
1006 (zero_extend:SI (match_operand:HI 1 "memory_operand" "m"))))]
1007 "tahoe_cmp_check (insn, operands[0], 0)"
1012 (compare (zero_extend:SI (match_operand:HI 0 "memory_operand" "m"))
1013 (match_operand:SI 1 "immediate_operand" "i")))]
1014 "tahoe_cmp_check(insn, operands[1], 65535)"
1017 if (INTVAL (operands[1]) > 32767)
1018 operands[1] = GEN_INT (INTVAL (operands[1]) + 0xffff0000);
1019 return \"cmpw %0,%1\";
1025 (compare (sign_extend:SI (match_operand:QI 0 "memory_operand" "m"))
1026 (sign_extend:SI (match_operand:QI 1 "memory_operand" "m"))))]
1032 (compare (match_operand:SI 0 "nonmemory_operand" "ri")
1033 (sign_extend:SI (match_operand:QI 1 "memory_operand" "m"))))]
1039 (compare (sign_extend:SI (match_operand:QI 0 "memory_operand" "m"))
1040 (match_operand:SI 1 "nonmemory_operand" "ri")))]
1044 ; zero-extended compares give the same result as sign-extended compares, if
1045 ; the compare is unsigned. Just see: if both operands are <128 they are the
1046 ; same in both cases. If both are >=128 the you effectively compare x+D
1047 ; with y+D, where D=2**32-2**8, so the result is the same. if x<128 and
1048 ; y>=128 then you compare x with y+D, and in both cases the result is x<y.
1052 (compare (zero_extend:SI (match_operand:QI 0 "memory_operand" "m"))
1053 (zero_extend:SI (match_operand:QI 1 "memory_operand" "m"))))]
1054 "tahoe_cmp_check (insn, operands[0], 0)"
1059 (compare (zero_extend:SI (match_operand:QI 0 "memory_operand" "m"))
1060 (match_operand:SI 1 "immediate_operand" "i")))]
1061 "tahoe_cmp_check(insn, operands[1], 255)"
1064 if (INTVAL (operands[1]) > 127)
1065 operands[1] = GEN_INT (INTVAL (operands[1]) + 0xffffff00);
1066 return \"cmpb %0,%1\";
1070 (define_insn "cmpsi"
1072 (compare (match_operand:SI 0 "nonimmediate_operand" "g")
1073 (match_operand:SI 1 "general_operand" "g")))]
1078 ; cmpsf similar to vax, but first operand is expected to be in the
1081 (define_insn "cmpsf"
1083 (compare (match_operand:SF 0 "general_operand" "a,g")
1084 (match_operand:SF 1 "general_operand" "g,g")))]
1088 switch (which_alternative)
1090 case 0: return \"cmpf %1\";
1091 case 1: return \"cmpf2 %0,%1\";
1096 ; cmpdf similar to vax, but first operand is expected to be in the
1097 ; fpp accumulator. Immediate doubles not allowed.
1099 (define_insn "cmpdf"
1101 (compare (match_operand:DF 0 "general_operand" "a,rm")
1102 (match_operand:DF 1 "general_operand" "rm,rm")))]
1106 switch (which_alternative)
1108 case 0: return \"cmpd %1\";
1109 case 1: return \"cmpd2 %0,%1\";
1113 ;; We don't want to allow a constant operand for test insns because
1114 ;; (set (cc0) (const_int foo)) has no mode information. Such insns will
1115 ;; be folded while optimizing anyway.
1117 (define_insn "tstsi"
1119 (match_operand:SI 0 "nonimmediate_operand" "g"))]
1124 ; small tests from memory are normal, but testing from registers doesn't
1125 ; expand the data properly. So test in this case does a convert and tests
1126 ; the new register data from the stack.
1128 ; First some special cases that do work
1133 (sign_extend:SI (match_operand:HI 0 "memory_operand" "m")))]
1139 (zero_extend:SI (match_operand:HI 0 "memory_operand" "m")))]
1140 "tahoe_cmp_check (insn, operands[0], 0)"
1144 (define_insn "tsthi"
1146 (match_operand:HI 0 "extensible_operand" "m,!r"))]
1147 "GET_MODE (operands[0]) != VOIDmode"
1151 extern rtx tahoe_reg_conversion_loc;
1152 switch (which_alternative)
1157 xoperands[0] = operands[0];
1158 xoperands[1] = tahoe_reg_conversion_loc;
1159 output_asm_insn (\"movl %0,%1\", xoperands);
1160 xoperands[1] = plus_constant (XEXP (tahoe_reg_conversion_loc, 0), 2);
1161 output_asm_insn (\"tstw %a1\", xoperands);
1169 (sign_extend:SI (match_operand:QI 0 "memory_operand" "m")))]
1175 (zero_extend:SI (match_operand:QI 0 "memory_operand" "m")))]
1176 "tahoe_cmp_check (insn, operands[0], 0)"
1180 (define_insn "tstqi"
1182 (match_operand:QI 0 "extensible_operand" "m,!r"))]
1183 "GET_MODE (operands[0]) != VOIDmode"
1187 extern rtx tahoe_reg_conversion_loc;
1188 switch (which_alternative)
1193 xoperands[0] = operands[0];
1194 xoperands[1] = tahoe_reg_conversion_loc;
1195 output_asm_insn (\"movl %0,%1\", xoperands);
1196 xoperands[1] = plus_constant (XEXP (tahoe_reg_conversion_loc, 0), 3);
1197 output_asm_insn (\"tstb %a1\", xoperands);
1202 ; tstsf compares a given value to a value already in the fpp accumulator.
1203 ; No flags are set by this so ignore them.
1205 (define_insn "tstsf"
1207 (match_operand:SF 0 "register_operand" "a"))]
1212 ; tstdf compares a given value to a value already in the fpp accumulator.
1213 ; immediate doubles not allowed. Flags are ignored after this.
1215 (define_insn "tstdf"
1217 (match_operand:DF 0 "register_operand" "a"))]
1223 ; movstrhi tahoe instruction does not load registers by itself like
1224 ; the vax counterpart does. registers 0-2 must be primed by hand.
1225 ; we have loaded the registers in the order: dst, src, count.
1227 (define_insn "movstrhi"
1228 [(set (match_operand:BLK 0 "general_operand" "p")
1229 (match_operand:BLK 1 "general_operand" "p"))
1230 (use (match_operand:HI 2 "general_operand" "g"))
1231 (clobber (reg:SI 0))
1232 (clobber (reg:SI 1))
1233 (clobber (reg:SI 2))]
1235 "movab %0,r1\;movab %1,r0\;movl %2,r2\;movblk")
1238 ; floatsisf2 on tahoe converts the long from reg/mem into the fpp
1239 ; accumulator. There are no hi and qi counterparts. Flags are not
1240 ; set correctly here.
1242 (define_insn "floatsisf2"
1243 [(set (match_operand:SF 0 "register_operand" "=a")
1244 (float:SF (match_operand:SI 1 "general_operand" "g")))]
1253 ; floatsidf2 on tahoe converts the long from reg/mem into the fpp
1254 ; accumulator. There are no hi and qi counterparts. Flags are not
1255 ; set correctly here.
1257 (define_insn "floatsidf2"
1258 [(set (match_operand:DF 0 "register_operand" "=a")
1259 (float:DF (match_operand:SI 1 "general_operand" "g")))]
1268 ; fix_truncsfsi2 to convert a float to long, tahoe must have the float
1269 ; in the fpp accumulator. Flags are not set here.
1271 (define_insn "fix_truncsfsi2"
1272 [(set (match_operand:SI 0 "general_operand" "=g")
1273 (fix:SI (fix:SF (match_operand:SF 1 "register_operand" "a"))))]
1282 ; fix_truncsfsi2 to convert a double to long, tahoe must have the double
1283 ; in the fpp accumulator. Flags are not set here.
1285 (define_insn "fix_truncdfsi2"
1286 [(set (match_operand:SI 0 "general_operand" "=g")
1287 (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "a"))))]
1296 (define_insn "truncsihi2"
1297 [(set (match_operand:HI 0 "general_operand" "=g")
1298 (truncate:HI (match_operand:SI 1 "general_operand" "g")))]
1303 (define_insn "truncsiqi2"
1304 [(set (match_operand:QI 0 "general_operand" "=g")
1305 (truncate:QI (match_operand:SI 1 "general_operand" "g")))]
1310 (define_insn "trunchiqi2"
1311 [(set (match_operand:QI 0 "general_operand" "=g")
1312 (truncate:QI (match_operand:HI 1 "general_operand" "g")))]
1317 ; The fpp related instructions don't set flags, so ignore them
1318 ; after this instruction.
1320 (define_insn "truncdfsf2"
1321 [(set (match_operand:SF 0 "register_operand" "=a")
1322 (float_truncate:SF (match_operand:DF 1 "register_operand" "0")))]
1331 ; This monster is to cover for the Tahoe's nasty habit of not extending
1332 ; a number if the source is in a register. (It just moves it!) Case 0 is
1333 ; a normal extend from memory. Case 1 does the extension from the top of
1334 ; the stack. Extension from the stack doesn't set the flags right since
1335 ; the moval changes them.
1337 (define_insn "extendhisi2"
1338 [(set (match_operand:SI 0 "general_operand" "=g,?=g")
1339 (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "m,r")))]
1343 switch (which_alternative)
1346 return \"cvtwl %1,%0\";
1348 if (push_operand (operands[0], SImode))
1349 return \"pushl %1\;cvtwl 2(sp),(sp)\";
1353 return \"pushl %1\;cvtwl 2(sp),%0\;moval 4(sp),sp\";
1358 ; This monster is to cover for the Tahoe's nasty habit of not extending
1359 ; a number if the source is in a register. (It just moves it!) Case 0 is
1360 ; a normal extend from memory. Case 1 does the extension from the top of
1361 ; the stack. Extension from the stack doesn't set the flags right since
1362 ; the moval changes them.
1364 (define_insn "extendqisi2"
1365 [(set (match_operand:SI 0 "general_operand" "=g,?=g")
1366 (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "m,r")))]
1370 switch (which_alternative)
1373 return \"cvtbl %1,%0\";
1375 if (push_operand (operands[0], SImode))
1376 return \"pushl %1\;cvtbl 3(sp),(sp)\";
1380 return \"pushl %1\;cvtbl 3(sp),%0\;moval 4(sp),sp\";
1386 ; This monster is to cover for the Tahoe's nasty habit of not extending
1387 ; a number if the source is in a register. (It just moves it!) Case 0 is
1388 ; a normal extend from memory. Case 1 does the extension from the top of
1389 ; the stack. Extension from the stack doesn't set the flags right since
1390 ; the moval changes them.
1392 (define_insn "extendqihi2"
1393 [(set (match_operand:HI 0 "general_operand" "=g,?=g")
1394 (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "m,r")))]
1398 switch (which_alternative)
1401 return \"cvtbw %1,%0\";
1403 if (push_operand (operands[0], SImode))
1404 return \"pushl %1\;cvtbw 3(sp),(sp)\";
1408 return \"pushl %1\;cvtbw 3(sp),%0\;moval 4(sp),sp\";
1414 ; extendsfdf2 tahoe uses the fpp accumulator to do the extension.
1415 ; It takes a float and loads it up directly as a double.
1417 (define_insn "extendsfdf2"
1418 [(set (match_operand:DF 0 "register_operand" "=a")
1419 (float_extend:DF (match_operand:SF 1 "general_operand" "g")))]
1428 ; movz works fine from memory but not from register for the same reasons
1429 ; the cvt instructions don't work right. So we use the normal instruction
1430 ; from memory and we use an and to simulate it from register. This is faster
1431 ; than pulling it off the stack.
1434 (define_insn "zero_extendhisi2"
1435 [(set (match_operand:SI 0 "general_operand" "=g,?=g")
1436 (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "m,r")))]
1440 switch (which_alternative)
1442 case 0: return \"movzwl %1,%0\";
1443 case 1: return \"andl3 $0xffff,%1,%0\";
1447 ; movz works fine from memory but not from register for the same reasons
1448 ; the cvt instructions don't work right. So we use the normal instruction
1449 ; from memory and we use an and to simulate it from register. This is faster
1450 ; than pulling it off the stack.
1452 (define_insn "zero_extendqihi2"
1453 [(set (match_operand:HI 0 "general_operand" "=g,?=g")
1454 (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "m,r")))]
1458 switch (which_alternative)
1460 case 0: return \"movzbw %1,%0\";
1461 case 1: return \"andw3 $0xff,%1,%0\";
1466 ; movz works fine from memory but not from register for the same reasons
1467 ; the cvt instructions don't work right. So we use the normal instruction
1468 ; from memory and we use an and to simulate it from register. This is faster
1469 ; than pulling it off the stack.
1471 (define_insn "zero_extendqisi2"
1472 [(set (match_operand:SI 0 "general_operand" "=g,?=g")
1473 (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "m,r")))]
1477 switch (which_alternative)
1479 case 0: return \"movzbl %1,%0\";
1480 case 1: return \"andl3 $0xff,%1,%0\";
1487 (if_then_else (eq (cc0)
1489 (label_ref (match_operand 0 "" ""))
1497 (if_then_else (ne (cc0)
1499 (label_ref (match_operand 0 "" ""))
1507 (if_then_else (gt (cc0)
1509 (label_ref (match_operand 0 "" ""))
1517 (if_then_else (gtu (cc0)
1519 (label_ref (match_operand 0 "" ""))
1527 (if_then_else (lt (cc0)
1529 (label_ref (match_operand 0 "" ""))
1537 (if_then_else (ltu (cc0)
1539 (label_ref (match_operand 0 "" ""))
1547 (if_then_else (ge (cc0)
1549 (label_ref (match_operand 0 "" ""))
1557 (if_then_else (geu (cc0)
1559 (label_ref (match_operand 0 "" ""))
1567 (if_then_else (le (cc0)
1569 (label_ref (match_operand 0 "" ""))
1577 (if_then_else (leu (cc0)
1579 (label_ref (match_operand 0 "" ""))
1585 ; gcc does not account for register mask/argc longword. Thus the number
1586 ; for the call = number bytes for args + 4
1589 [(call (match_operand:QI 0 "memory_operand" "m")
1590 (match_operand:QI 1 "general_operand" "g"))]
1594 operands[1] = GEN_INT ((INTVAL (operands[1]) + 4));
1595 if (GET_CODE(operands[0]) == MEM
1596 && CONSTANT_ADDRESS_P (XEXP(operands[0], 0))
1597 && INTVAL (operands[1]) < 64)
1598 return \"callf %1,%0\"; /* this is much faster */
1599 return \"calls %1,%0\";
1602 ; gcc does not account for register mask/argc longword. Thus the number
1603 ; for the call = number bytes for args + 4
1605 (define_insn "call_value"
1606 [(set (match_operand 0 "" "=g")
1607 (call (match_operand:QI 1 "memory_operand" "m")
1608 (match_operand:QI 2 "general_operand" "g")))]
1612 operands[2] = GEN_INT ((INTVAL (operands[2]) + 4));
1613 if (GET_CODE(operands[1]) == MEM
1614 && CONSTANT_ADDRESS_P (XEXP(operands[1], 0))
1615 && INTVAL (operands[2]) < 64)
1616 return \"callf %2,%1\"; /* this is much faster */
1617 return \"calls %2,%1\";
1621 (define_insn "return"
1631 ; casesi this code extracted from the vax code. The instructions are
1632 ; very similar. Tahoe requires that the table be word aligned. GCC
1633 ; places the table immediately after, thus the alignment directive.
1635 (define_insn "casesi"
1637 (if_then_else (le (minus:SI (match_operand:SI 0 "general_operand" "g")
1638 (match_operand:SI 1 "general_operand" "g"))
1639 (match_operand:SI 2 "general_operand" "g"))
1640 (plus:SI (sign_extend:SI
1641 (mem:HI (plus:SI (pc)
1642 (minus:SI (match_dup 0)
1644 (label_ref:SI (match_operand 3 "" "")))
1647 "casel %0,%1,%2\;.align %@")
1652 (label_ref (match_operand 0 "" "")))]
1657 ;; This is the list of all the non-standard insn patterns
1660 ; This is used to access the address of a byte. This is similar to
1661 ; movqi, but the second operand had to be "address_operand" type, so
1662 ; it had to be an unnamed one.
1665 [(set (match_operand:SI 0 "general_operand" "=g")
1666 (match_operand:QI 1 "address_operand" "p"))]
1670 if (push_operand (operands[0], SImode))
1671 return \"pushab %a1\";
1672 return \"movab %a1,%0\";
1675 ; This is used to access the address of a word. This is similar to
1676 ; movhi, but the second operand had to be "address_operand" type, so
1677 ; it had to be an unnamed one.
1680 [(set (match_operand:SI 0 "general_operand" "=g")
1681 (match_operand:HI 1 "address_operand" "p"))]
1685 if (push_operand (operands[0], SImode))
1686 return \"pushaw %a1\";
1687 return \"movaw %a1,%0\";
1690 ; This is used to access the address of a long. This is similar to
1691 ; movsi, but the second operand had to be "address_operand" type, so
1692 ; it had to be an unnamed one.
1695 [(set (match_operand:SI 0 "general_operand" "=g")
1696 (match_operand:SI 1 "address_operand" "p"))]
1700 if (push_operand (operands[0], SImode))
1701 return \"pushal %a1\";
1702 return \"moval %a1,%0\";
1706 ; bit test longword instruction, same as vax
1710 (and:SI (match_operand:SI 0 "general_operand" "g")
1711 (match_operand:SI 1 "general_operand" "g")))]
1716 ; bit test word instructions, same as vax
1720 (and:HI (match_operand:HI 0 "general_operand" "g")
1721 (match_operand:HI 1 "general_operand" "g")))]
1726 ; bit test instructions, same as vax
1730 (and:QI (match_operand:QI 0 "general_operand" "g")
1731 (match_operand:QI 1 "general_operand" "g")))]
1736 ; bne counterpart. in case gcc reverses the conditional.
1740 (if_then_else (eq (cc0)
1743 (label_ref (match_operand 0 "" ""))))]
1748 ; beq counterpart. in case gcc reverses the conditional.
1752 (if_then_else (ne (cc0)
1755 (label_ref (match_operand 0 "" ""))))]
1760 ; ble counterpart. in case gcc reverses the conditional.
1764 (if_then_else (gt (cc0)
1767 (label_ref (match_operand 0 "" ""))))]
1772 ; bleu counterpart. in case gcc reverses the conditional.
1776 (if_then_else (gtu (cc0)
1779 (label_ref (match_operand 0 "" ""))))]
1784 ; bge counterpart. in case gcc reverses the conditional.
1788 (if_then_else (lt (cc0)
1791 (label_ref (match_operand 0 "" ""))))]
1796 ; bgeu counterpart. in case gcc reverses the conditional.
1800 (if_then_else (ltu (cc0)
1803 (label_ref (match_operand 0 "" ""))))]
1808 ; blt counterpart. in case gcc reverses the conditional.
1812 (if_then_else (ge (cc0)
1815 (label_ref (match_operand 0 "" ""))))]
1820 ; bltu counterpart. in case gcc reverses the conditional.
1824 (if_then_else (geu (cc0)
1827 (label_ref (match_operand 0 "" ""))))]
1832 ; bgt counterpart. in case gcc reverses the conditional.
1836 (if_then_else (le (cc0)
1839 (label_ref (match_operand 0 "" ""))))]
1844 ; bgtu counterpart. in case gcc reverses the conditional.
1848 (if_then_else (leu (cc0)
1851 (label_ref (match_operand 0 "" ""))))]
1856 ; casesi alternate form as found in vax code. this form is to
1857 ; compensate for the table's offset being no distance (0 displacement)
1861 (if_then_else (le (match_operand:SI 0 "general_operand" "g")
1862 (match_operand:SI 1 "general_operand" "g"))
1863 (plus:SI (sign_extend:SI
1864 (mem:HI (plus:SI (pc)
1865 (minus:SI (match_dup 0)
1867 (label_ref:SI (match_operand 3 "" "")))
1870 "casel %0,$0,%1\;.align %@")
1873 ; casesi alternate form as found in vax code. another form to
1874 ; compensate for the table's offset being no distance (0 displacement)
1878 (if_then_else (le (match_operand:SI 0 "general_operand" "g")
1879 (match_operand:SI 1 "general_operand" "g"))
1880 (plus:SI (sign_extend:SI
1881 (mem:HI (plus:SI (pc)
1883 (label_ref:SI (match_operand 3 "" "")))
1886 "casel %0,$0,%1 \;.align %@")
1891 (lt (plus:SI (match_operand:SI 0 "general_operand" "+g")
1893 (match_operand:SI 1 "general_operand" "g"))
1894 (label_ref (match_operand 2 "" ""))
1897 (plus:SI (match_dup 0)
1905 (le (plus:SI (match_operand:SI 0 "general_operand" "+g")
1907 (match_operand:SI 1 "general_operand" "g"))
1908 (label_ref (match_operand 2 "" ""))
1911 (plus:SI (match_dup 0)
1919 (ge (plus:SI (match_operand:SI 0 "general_operand" "+g")
1921 (match_operand:SI 1 "general_operand" "g"))
1923 (label_ref (match_operand 2 "" ""))))
1925 (plus:SI (match_dup 0)
1933 (gt (plus:SI (match_operand:SI 0 "general_operand" "+g")
1935 (match_operand:SI 1 "general_operand" "g"))
1937 (label_ref (match_operand 2 "" ""))))
1939 (plus:SI (match_dup 0)
1949 (ne (sign_extract:SI (match_operand:SI 0 "register_operand" "rm")
1951 (subreg:QI (match_operand:SI 1 "general_operand" "g") 0))
1953 (label_ref (match_operand 2 "" ""))
1961 (eq (sign_extract:SI (match_operand:SI 0 "register_operand" "rm")
1963 (subreg:QI (match_operand:SI 1 "general_operand" "g") 0))
1965 (label_ref (match_operand 2 "" ""))
1973 (ne (sign_extract:SI (match_operand:SI 0 "register_operand" "rm")
1975 (subreg:QI (match_operand:SI 1 "general_operand" "g") 0))
1978 (label_ref (match_operand 2 "" ""))))]
1985 (eq (sign_extract:SI (match_operand:SI 0 "register_operand" "rm")
1987 (subreg:QI (match_operand:SI 1 "general_operand" "g") 0))
1990 (label_ref (match_operand 2 "" ""))))]
1994 ; if the shift count is a byte in a register we can use it as a long
1999 (ne (sign_extract:SI (match_operand:SI 0 "register_operand" "rm")
2001 (match_operand:QI 1 "register_operand" "r"))
2003 (label_ref (match_operand 2 "" ""))
2011 (eq (sign_extract:SI (match_operand:SI 0 "register_operand" "rm")
2013 (match_operand:QI 1 "register_operand" "r"))
2015 (label_ref (match_operand 2 "" ""))
2023 (ne (sign_extract:SI (match_operand:SI 0 "register_operand" "rm")
2025 (match_operand:QI 1 "register_operand" "r"))
2028 (label_ref (match_operand 2 "" ""))))]
2035 (eq (sign_extract:SI (match_operand:SI 0 "register_operand" "rm")
2037 (match_operand:QI 1 "register_operand" "r"))
2040 (label_ref (match_operand 2 "" ""))))]
2044 ; special case for 1 << constant. We don't do these because they are slower
2045 ; than the bitl instruction
2050 ; (ne (and:SI (match_operand:SI 0 "nonimmediate_operand" "%rm")
2051 ; (match_operand:SI 1 "immediate_operand" "i"))
2053 ; (label_ref (match_operand 2 "" ""))
2055 ; "GET_CODE (operands[1]) == CONST_INT
2056 ; && exact_log2 (INTVAL (operands[1])) >= 0"
2060 ; = GEN_INT (exact_log2 (INTVAL (operands[1])));
2061 ; return \"bbs %1,%0,%l2\";
2067 ; (eq (and:SI (match_operand:SI 0 "nonimmediate_operand" "%rm")
2068 ; (match_operand:SI 1 "immediate_operand" "i"))
2070 ; (label_ref (match_operand 2 "" ""))
2072 ; "GET_CODE (operands[1]) == CONST_INT
2073 ; && exact_log2 (INTVAL (operands[1])) >= 0"
2077 ; = GEN_INT (exact_log2 (INTVAL (operands[1])));
2078 ; return \"bbc %1,%0,%l2\";
2084 ; (ne (and:SI (match_operand:SI 0 "nonimmediate_operand" "%rm")
2085 ; (match_operand:SI 1 "immediate_operand" "i"))
2088 ; (label_ref (match_operand 2 "" ""))))]
2089 ; "GET_CODE (operands[1]) == CONST_INT
2090 ; && exact_log2 (INTVAL (operands[1])) >= 0"
2094 ; = GEN_INT (exact_log2 (INTVAL (operands[1])));
2095 ; return \"bbc %1,%0,%l2\";
2101 ; (eq (and:SI (match_operand:SI 0 "nonimmediate_operand" "%rm")
2102 ; (match_operand:SI 1 "immediate_operand" "i"))
2105 ; (label_ref (match_operand 2 "" ""))))]
2106 ; "GET_CODE (operands[1]) == CONST_INT
2107 ; && exact_log2 (INTVAL (operands[1])) >= 0"
2111 ; = GEN_INT (exact_log2 (INTVAL (operands[1])));
2112 ; return \"bbs %1,%0,%l2\";