1 ;; Machine description for GNU compiler, AT&T we32000 Version
2 ;; Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
3 ;; Contributed by John Wehle (john@feith1.uucp)
5 ;; This file is part of GNU CC.
7 ;; GNU CC is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation; either version 1, or (at your option)
12 ;; GNU CC is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GNU CC; see the file COPYING. If not, write to
19 ;; the Free Software Foundation, 59 Temple Place - Suite 330,
20 ;; Boston, MA 02111-1307, USA.
23 ;;- instruction definitions
25 ;;- @@The original PO technology requires these to be ordered by speed,
26 ;;- @@ so that assigner will pick the fastest.
28 ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al.
30 ;;- When naming insn's (operand 0 of define_insn) be careful about using
31 ;;- names from other targets machine descriptions.
36 [(set (match_operand:DF 0 "push_operand" "=m")
37 (match_operand:DF 1 "general_operand" "mrF"))]
41 output_push_double(&operands[1]);
47 [(set (match_operand:DF 0 "nonimmediate_operand" "=mr")
48 (match_operand:DF 1 "general_operand" "mrF"))]
52 output_move_double(operands);
58 [(set (match_operand:SF 0 "push_operand" "=m")
59 (match_operand:SF 1 "general_operand" "mrF"))]
64 [(set (match_operand:SF 0 "nonimmediate_operand" "=mr")
65 (match_operand:SF 1 "general_operand" "mrF"))]
70 [(set (match_operand:DI 0 "push_operand" "=m")
71 (match_operand:DI 1 "general_operand" "mriF"))]
75 output_push_double(&operands[1]);
81 [(set (match_operand:DI 0 "nonimmediate_operand" "=mr")
82 (match_operand:DI 1 "general_operand" "mriF"))]
86 output_move_double(operands);
92 [(set (match_operand:SI 0 "push_operand" "=m")
93 (match_operand:SI 1 "general_operand" "mri"))]
98 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
99 (match_operand:SI 1 "general_operand" "mri"))]
104 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
105 (match_operand:HI 1 "general_operand" "mri"))]
110 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
111 (match_operand:QI 1 "general_operand" "mri"))]
118 [(set (match_operand:DI 0 "nonimmediate_operand" "=&or")
119 (plus:DI (match_operand:DI 1 "nonimmediate_operand" "0")
120 (match_operand:DI 2 "general_operand" "oriF")))]
127 if (GET_CODE (operands[0]) == REG)
128 lsw_operands[0] = gen_rtx(REG, SImode, REGNO (operands[0]) + 1);
130 if (GET_CODE (operands[0]) == MEM && offsettable_memref_p (operands[0]))
131 lsw_operands[0] = adj_offsettable_operand(operands[0], 4);
135 if (GET_CODE (operands[2]) == REG)
136 lsw_operands[2] = gen_rtx(REG, SImode, REGNO (operands[2]) + 1);
138 if (GET_CODE (operands[2]) == MEM && offsettable_memref_p (operands[2]))
139 lsw_operands[2] = adj_offsettable_operand(operands[2], 4);
141 if (GET_CODE (operands[2]) == CONST_DOUBLE)
143 lsw_operands[2] = GEN_INT (CONST_DOUBLE_HIGH(operands[2]));
144 operands[2] = GEN_INT (CONST_DOUBLE_LOW(operands[2]));
147 if (GET_CODE (operands[2]) == CONST_INT)
149 lsw_operands[2] = operands[2];
150 operands[2] = const0_rtx;
155 label[0] = gen_label_rtx();
156 LABEL_NUSES(label[0]) = 1;
158 output_asm_insn(\"addw2 %2, %0\", operands);
159 output_asm_insn(\"addw2 %2, %0\", lsw_operands);
160 output_asm_insn(\"BCCB %l0\", label);
161 output_asm_insn(\"INCW %0\", operands);
162 output_asm_insn(\"%l0:\", label);
167 (define_insn "adddi3"
168 [(set (match_operand:DI 0 "nonimmediate_operand" "=&or")
169 (plus:DI (match_operand:DI 1 "general_operand" "oriF")
170 (match_operand:DI 2 "general_operand" "oriF")))]
177 if (GET_CODE (operands[0]) == REG)
178 lsw_operands[0] = gen_rtx(REG, SImode, REGNO (operands[0]) + 1);
180 if (GET_CODE (operands[0]) == MEM && offsettable_memref_p (operands[0]))
181 lsw_operands[0] = adj_offsettable_operand(operands[0], 4);
185 if (GET_CODE (operands[1]) == REG)
186 lsw_operands[1] = gen_rtx(REG, SImode, REGNO (operands[1]) + 1);
188 if (GET_CODE (operands[1]) == MEM && offsettable_memref_p (operands[1]))
189 lsw_operands[1] = adj_offsettable_operand(operands[1], 4);
191 if (GET_CODE (operands[1]) == CONST_DOUBLE)
193 lsw_operands[1] = GEN_INT (CONST_DOUBLE_HIGH(operands[1]));
194 operands[1] = GEN_INT (CONST_DOUBLE_LOW(operands[1]));
197 if (GET_CODE (operands[1]) == CONST_INT)
199 lsw_operands[1] = operands[1];
200 operands[1] = const0_rtx;
205 if (GET_CODE (operands[2]) == REG)
206 lsw_operands[2] = gen_rtx(REG, SImode, REGNO (operands[2]) + 1);
208 if (GET_CODE (operands[2]) == MEM && offsettable_memref_p (operands[2]))
209 lsw_operands[2] = adj_offsettable_operand(operands[2], 4);
211 if (GET_CODE (operands[2]) == CONST_DOUBLE)
213 lsw_operands[2] = GEN_INT (CONST_DOUBLE_HIGH(operands[2]));
214 operands[2] = GEN_INT (CONST_DOUBLE_LOW(operands[2]));
217 if (GET_CODE (operands[2]) == CONST_INT)
219 lsw_operands[2] = operands[2];
220 operands[2] = const0_rtx;
225 label[0] = gen_label_rtx();
226 LABEL_NUSES(label[0]) = 1;
228 output_asm_insn(\"addw3 %2, %1, %0\", operands);
229 output_asm_insn(\"addw3 %2, %1, %0\", lsw_operands);
230 output_asm_insn(\"BCCB %l0\", label);
231 output_asm_insn(\"INCW %0\", operands);
232 output_asm_insn(\"%l0:\", label);
238 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
239 (plus:SI (match_operand:SI 1 "nonimmediate_operand" "0")
240 (match_operand:SI 2 "general_operand" "mri")))]
244 (define_insn "addsi3"
245 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
246 (plus:SI (match_operand:SI 1 "general_operand" "mri")
247 (match_operand:SI 2 "general_operand" "mri")))]
252 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
253 (plus:HI (match_operand:HI 1 "nonimmediate_operand" "0")
254 (match_operand:HI 2 "general_operand" "mri")))]
258 (define_insn "addhi3"
259 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
260 (plus:HI (match_operand:HI 1 "general_operand" "mri")
261 (match_operand:HI 2 "general_operand" "mri")))]
266 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
267 (plus:QI (match_operand:QI 1 "nonimmediate_operand" "0")
268 (match_operand:QI 2 "general_operand" "mri")))]
272 (define_insn "addqi3"
273 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
274 (plus:QI (match_operand:QI 1 "general_operand" "mri")
275 (match_operand:QI 2 "general_operand" "mri")))]
279 ;; subtract instructions
282 [(set (match_operand:DI 0 "nonimmediate_operand" "=&or")
283 (minus:DI (match_operand:DI 1 "nonimmediate_operand" "0")
284 (match_operand:DI 2 "general_operand" "oriF")))]
291 if (GET_CODE (operands[0]) == REG)
292 lsw_operands[0] = gen_rtx(REG, SImode, REGNO (operands[0]) + 1);
294 if (GET_CODE (operands[0]) == MEM && offsettable_memref_p (operands[0]))
295 lsw_operands[0] = adj_offsettable_operand(operands[0], 4);
299 if (GET_CODE (operands[2]) == REG)
300 lsw_operands[2] = gen_rtx(REG, SImode, REGNO (operands[2]) + 1);
302 if (GET_CODE (operands[2]) == MEM && offsettable_memref_p (operands[2]))
303 lsw_operands[2] = adj_offsettable_operand(operands[2], 4);
305 if (GET_CODE (operands[2]) == CONST_DOUBLE)
307 lsw_operands[2] = GEN_INT (CONST_DOUBLE_HIGH(operands[2]));
308 operands[2] = GEN_INT (CONST_DOUBLE_LOW(operands[2]));
311 if (GET_CODE (operands[2]) == CONST_INT)
313 lsw_operands[2] = operands[2];
314 operands[2] = const0_rtx;
319 label[0] = gen_label_rtx();
320 LABEL_NUSES(label[0]) = 1;
322 output_asm_insn(\"subw2 %2, %0\", operands);
323 output_asm_insn(\"subw2 %2, %0\", lsw_operands);
324 output_asm_insn(\"BCCB %l0\", label);
325 output_asm_insn(\"DECW %0\", operands);
326 output_asm_insn(\"%l0:\", label);
331 (define_insn "subdi3"
332 [(set (match_operand:DI 0 "nonimmediate_operand" "=&or")
333 (minus:DI (match_operand:DI 1 "general_operand" "oriF")
334 (match_operand:DI 2 "general_operand" "oriF")))]
341 if (GET_CODE (operands[0]) == REG)
342 lsw_operands[0] = gen_rtx(REG, SImode, REGNO (operands[0]) + 1);
344 if (GET_CODE (operands[0]) == MEM && offsettable_memref_p (operands[0]))
345 lsw_operands[0] = adj_offsettable_operand(operands[0], 4);
349 if (GET_CODE (operands[1]) == REG)
350 lsw_operands[1] = gen_rtx(REG, SImode, REGNO (operands[1]) + 1);
352 if (GET_CODE (operands[1]) == MEM && offsettable_memref_p (operands[1]))
353 lsw_operands[1] = adj_offsettable_operand(operands[1], 4);
355 if (GET_CODE (operands[1]) == CONST_DOUBLE)
357 lsw_operands[1] = GEN_INT (CONST_DOUBLE_HIGH(operands[1]));
358 operands[1] = GEN_INT (CONST_DOUBLE_LOW(operands[1]));
361 if (GET_CODE (operands[1]) == CONST_INT)
363 lsw_operands[1] = operands[1];
364 operands[1] = const0_rtx;
369 if (GET_CODE (operands[2]) == REG)
370 lsw_operands[2] = gen_rtx(REG, SImode, REGNO (operands[2]) + 1);
372 if (GET_CODE (operands[2]) == MEM && offsettable_memref_p (operands[2]))
373 lsw_operands[2] = adj_offsettable_operand(operands[2], 4);
375 if (GET_CODE (operands[2]) == CONST_DOUBLE)
377 lsw_operands[2] = GEN_INT (CONST_DOUBLE_HIGH(operands[2]));
378 operands[2] = GEN_INT (CONST_DOUBLE_LOW(operands[2]));
381 if (GET_CODE (operands[2]) == CONST_INT)
383 lsw_operands[2] = operands[2];
384 operands[2] = const0_rtx;
389 label[0] = gen_label_rtx();
390 LABEL_NUSES(label[0]) = 1;
392 output_asm_insn(\"subw3 %2, %1, %0\", operands);
393 output_asm_insn(\"subw3 %2, %1, %0\", lsw_operands);
394 output_asm_insn(\"BCCB %l0\", label);
395 output_asm_insn(\"DECW %0\", operands);
396 output_asm_insn(\"%l0:\", label);
402 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
403 (minus:SI (match_operand:SI 1 "nonimmediate_operand" "0")
404 (match_operand:SI 2 "general_operand" "mri")))]
408 (define_insn "subsi3"
409 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
410 (minus:SI (match_operand:SI 1 "general_operand" "mri")
411 (match_operand:SI 2 "general_operand" "mri")))]
416 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
417 (minus:HI (match_operand:HI 1 "nonimmediate_operand" "0")
418 (match_operand:HI 2 "general_operand" "mri")))]
422 (define_insn "subhi3"
423 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
424 (minus:HI (match_operand:HI 1 "general_operand" "mri")
425 (match_operand:HI 2 "general_operand" "mri")))]
430 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
431 (minus:QI (match_operand:QI 1 "nonimmediate_operand" "0")
432 (match_operand:QI 2 "general_operand" "mri")))]
436 (define_insn "subqi3"
437 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
438 (minus:QI (match_operand:QI 1 "general_operand" "mri")
439 (match_operand:QI 2 "general_operand" "mri")))]
443 ;; signed multiply instructions
446 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
447 (mult:SI (match_operand:SI 1 "nonimmediate_operand" "0")
448 (match_operand:SI 2 "general_operand" "mri")))]
452 (define_insn "mulsi3"
453 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
454 (mult:SI (match_operand:SI 1 "general_operand" "mri")
455 (match_operand:SI 2 "general_operand" "mri")))]
459 ;; signed divide instructions
462 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
463 (div:SI (match_operand:SI 1 "nonimmediate_operand" "0")
464 (match_operand:SI 2 "general_operand" "mri")))]
468 (define_insn "divsi3"
469 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
470 (div:SI (match_operand:SI 1 "general_operand" "mri")
471 (match_operand:SI 2 "general_operand" "mri")))]
475 ;; signed modulus instruction
478 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
479 (mod:SI (match_operand:SI 1 "nonimmediate_operand" "0")
480 (match_operand:SI 2 "general_operand" "mri")))]
484 (define_insn "modsi3"
485 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
486 (mod:SI (match_operand:SI 1 "general_operand" "mri")
487 (match_operand:SI 2 "general_operand" "mri")))]
491 ;; unsigned divide instruction
494 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
495 (udiv:SI (match_operand:SI 1 "nonimmediate_operand" "0")
496 (match_operand:SI 2 "general_operand" "mri")))]
500 (define_insn "udivsi3"
501 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
502 (udiv:SI (match_operand:SI 1 "general_operand" "mri")
503 (match_operand:SI 2 "general_operand" "mri")))]
507 ;; unsigned modulus instruction
510 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
511 (umod:SI (match_operand:SI 1 "nonimmediate_operand" "0")
512 (match_operand:SI 2 "general_operand" "mri")))]
516 (define_insn "umodsi3"
517 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
518 (umod:SI (match_operand:SI 1 "general_operand" "mri")
519 (match_operand:SI 2 "general_operand" "mri")))]
523 ;; logical-and instructions
526 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
527 (and:SI (match_operand:SI 1 "nonimmediate_operand" "0")
528 (match_operand:SI 2 "general_operand" "mri")))]
532 (define_insn "andsi3"
533 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
534 (and:SI (match_operand:SI 1 "general_operand" "mri")
535 (match_operand:SI 2 "general_operand" "mri")))]
540 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
541 (and:HI (match_operand:HI 1 "nonimmediate_operand" "0")
542 (match_operand:HI 2 "general_operand" "mri")))]
546 (define_insn "andhi3"
547 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
548 (and:HI (match_operand:HI 1 "general_operand" "mri")
549 (match_operand:HI 2 "general_operand" "mri")))]
554 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
555 (and:QI (match_operand:QI 1 "nonimmediate_operand" "0")
556 (match_operand:QI 2 "general_operand" "mri")))]
560 (define_insn "andqi3"
561 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
562 (and:QI (match_operand:QI 1 "general_operand" "mri")
563 (match_operand:QI 2 "general_operand" "mri")))]
567 ;; inclusive-or instructions
570 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
571 (ior:SI (match_operand:SI 1 "nonimmediate_operand" "0")
572 (match_operand:SI 2 "general_operand" "mri")))]
576 (define_insn "iorsi3"
577 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
578 (ior:SI (match_operand:SI 1 "general_operand" "mri")
579 (match_operand:SI 2 "general_operand" "mri")))]
584 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
585 (ior:HI (match_operand:HI 1 "nonimmediate_operand" "0")
586 (match_operand:HI 2 "general_operand" "mri")))]
590 (define_insn "iorhi3"
591 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
592 (ior:HI (match_operand:HI 1 "general_operand" "mri")
593 (match_operand:HI 2 "general_operand" "mri")))]
598 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
599 (ior:QI (match_operand:QI 1 "nonimmediate_operand" "0")
600 (match_operand:QI 2 "general_operand" "mri")))]
604 (define_insn "iorqi3"
605 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
606 (ior:QI (match_operand:QI 1 "general_operand" "mri")
607 (match_operand:QI 2 "general_operand" "mri")))]
611 ;; exclusive-or instructions
614 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
615 (xor:SI (match_operand:SI 1 "nonimmediate_operand" "0")
616 (match_operand:SI 2 "general_operand" "mri")))]
620 (define_insn "xorsi3"
621 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
622 (xor:SI (match_operand:SI 1 "general_operand" "mri")
623 (match_operand:SI 2 "general_operand" "mri")))]
628 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
629 (xor:HI (match_operand:HI 1 "nonimmediate_operand" "0")
630 (match_operand:HI 2 "general_operand" "mri")))]
634 (define_insn "xorhi3"
635 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
636 (xor:HI (match_operand:HI 1 "general_operand" "mri")
637 (match_operand:HI 2 "general_operand" "mri")))]
642 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
643 (xor:QI (match_operand:QI 1 "nonimmediate_operand" "0")
644 (match_operand:QI 2 "general_operand" "mri")))]
648 (define_insn "xorqi3"
649 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
650 (xor:QI (match_operand:QI 1 "general_operand" "mri")
651 (match_operand:QI 2 "general_operand" "mri")))]
655 ;; arithmetic shift instructions
657 (define_insn "ashlsi3"
658 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
659 (ashift:SI (match_operand:SI 1 "general_operand" "mri")
660 (match_operand:SI 2 "general_operand" "mri")))]
664 (define_insn "ashrsi3"
665 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
666 (ashiftrt:SI (match_operand:SI 1 "general_operand" "mri")
667 (match_operand:SI 2 "general_operand" "mri")))]
671 ;; logical shift instructions
673 (define_insn "lshrsi3"
674 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
675 (lshiftrt:SI (match_operand:SI 1 "general_operand" "mri")
676 (match_operand:SI 2 "general_operand" "mri")))]
680 ;; rotate instruction
682 (define_insn "rotrsi3"
683 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
684 (rotatert: SI (match_operand:SI 1 "general_operand" "mri")
685 (match_operand:SI 2 "general_operand" "mri")))]
689 ;; negate instructions
691 (define_insn "negsi2"
692 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
693 (neg:SI (match_operand:SI 1 "general_operand" "mri")))]
697 (define_insn "neghi2"
698 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
699 (neg:HI (match_operand:HI 1 "general_operand" "mri")))]
703 ;; complement instructions
705 (define_insn "one_cmplsi2"
706 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
707 (not:SI (match_operand:SI 1 "general_operand" "mri")))]
711 (define_insn "one_cmplhi2"
712 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
713 (not:HI (match_operand:HI 1 "general_operand" "mri")))]
717 (define_insn "one_cmplqi2"
718 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
719 (not:QI (match_operand:QI 1 "general_operand" "mri")))]
725 ;; We don't want to allow a constant operand for test insns because
726 ;; (set (cc0) (const_int foo)) has no mode information. Such insns will
727 ;; be folded while optimizing anyway.
730 [(set (cc0) (match_operand:SI 0 "nonimmediate_operand" "mr"))]
735 [(set (cc0) (match_operand:HI 0 "nonimmediate_operand" "mr"))]
740 [(set (cc0) (match_operand:QI 0 "nonimmediate_operand" "mr"))]
744 ;; compare instruction
747 [(set (cc0) (compare (match_operand:SI 0 "nonimmediate_operand" "mr")
748 (match_operand:SI 1 "general_operand" "mri")))]
753 [(set (cc0) (compare (match_operand:HI 0 "nonimmediate_operand" "mr")
754 (match_operand:HI 1 "general_operand" "mri")))]
759 if (GET_CODE (operands[1]) == CONST_INT &&
760 ((unsigned long)INTVAL (operands[1]) & 0x8000L))
761 operands[1] = GEN_INT (INTVAL(operands[1]) | 0xffff0000L);
763 output_asm_insn(\"CMPH %1, %0\",operands);
769 [(set (cc0) (compare (match_operand:QI 0 "nonimmediate_operand" "mr")
770 (match_operand:QI 1 "general_operand" "mri")))]
775 if (GET_CODE (operands[1]) == CONST_INT &&
776 ((unsigned long)INTVAL (operands[1]) & 0x80L))
777 operands[1] = GEN_INT (INTVAL(operands[1]) | 0xffffff00L);
779 output_asm_insn(\"CMPB {sbyte}%1, {sbyte}%0\",operands);
784 ;; truncate instructions
787 [(set (match_operand:SF 0 "register_operand" "=r")
788 (float_truncate:SF (match_operand:DF 1 "general_operand" "orF")))
790 (clobber (reg:SI 2))]
791 "REGNO (operands[0]) == 0"
794 output_push_double(&operands[1]);
795 output_asm_insn(\"call &2, _fdtos\", operands);
800 (define_expand "truncdfsf2"
801 [(parallel [(set (reg:SF 0)
802 (float_truncate:SF (match_operand:DF 1 "general_operand" "orF")))
804 (clobber (reg:SI 2))])
805 (set (match_operand:SF 0 "nonimmediate_operand" "=mr")
810 (define_insn "truncsihi2"
811 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
812 (truncate:HI (match_operand:SI 1 "general_operand" "mri")))]
816 (define_insn "truncsiqi2"
817 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
818 (truncate:QI (match_operand:SI 1 "general_operand" "mri")))]
822 (define_insn "trunchiqi2"
823 [(set (match_operand:QI 0 "nonimmediate_operand" "=mr")
824 (truncate:QI (match_operand:HI 1 "general_operand" "mri")))]
828 ;; sign-extend move instructions
831 [(set (match_operand:DF 0 "register_operand" "=r")
832 (float_extend:DF (match_operand:SF 1 "general_operand" "mrF")))
833 (clobber (reg:SI 2))]
834 "REGNO (operands[0]) == 0"
837 output_asm_insn(\"pushw %1\", operands);
838 output_asm_insn(\"call &1, _fstod\", operands);
843 (define_expand "extendsfdf2"
844 [(parallel [(set (reg:DF 0)
845 (float_extend:DF (match_operand:SF 1 "general_operand" "mrF")))
846 (clobber (reg:SI 2))])
847 (set (match_operand:DF 0 "nonimmediate_operand" "=or")
852 (define_insn "extendhisi2"
853 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
854 (sign_extend:SI (match_operand:HI 1 "general_operand" "mri")))]
858 (define_insn "extendqisi2"
859 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
860 (sign_extend:SI (match_operand:QI 1 "general_operand" "mri")))]
864 (define_insn "extendqihi2"
865 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
866 (sign_extend:HI (match_operand:QI 1 "general_operand" "mri")))]
870 ;; zero-extend move instructions
872 (define_insn "zero_extendhisi2"
873 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
874 (zero_extend:SI (match_operand:HI 1 "general_operand" "mri")))]
878 (define_insn "zero_extendqisi2"
879 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
880 (zero_extend:SI (match_operand:QI 1 "general_operand" "mri")))]
884 (define_insn "zero_extendqihi2"
885 [(set (match_operand:HI 0 "nonimmediate_operand" "=mr")
886 (zero_extend:HI (match_operand:QI 1 "general_operand" "mri")))]
890 ;; bit field instructions
893 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
894 (zero_extract:SI (match_operand:SI 1 "general_operand" "mri")
895 (match_operand:SI 2 "immediate_operand" "i")
896 (match_operand:SI 3 "general_operand" "mri")))]
901 operands[2] = GEN_INT (INTVAL(operands[2]) - 1);
902 output_asm_insn(\"EXTFW %2, %3, %1, %0\",operands);
908 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
909 (zero_extract:SI (match_operand:HI 1 "general_operand" "mri")
910 (match_operand:SI 2 "immediate_operand" "i")
911 (match_operand:SI 3 "general_operand" "mri")))]
916 operands[2] = GEN_INT (INTVAL(operands[2]) - 1);
917 output_asm_insn(\"EXTFH %2, %3, {uhalf}%1, {uword}%0\",operands);
923 [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
924 (zero_extract:SI (match_operand:QI 1 "general_operand" "mri")
925 (match_operand:SI 2 "immediate_operand" "i")
926 (match_operand:SI 3 "general_operand" "mri")))]
931 operands[2] = GEN_INT (INTVAL(operands[2]) - 1);
932 output_asm_insn(\"EXTFB %2, %3, {ubyte}%1, {uword}%0\",operands);
938 [(set (zero_extract:SI (match_operand:SI 0 "nonimmediate_operand" "+mr")
939 (match_operand:SI 1 "immediate_operand" "i")
940 (match_operand:SI 2 "general_operand" "mri"))
941 (match_operand:SI 3 "general_operand" "mri"))]
946 operands[1] = GEN_INT (INTVAL(operands[1]) - 1);
947 output_asm_insn(\"INSFW %1, %2, %3, %0\",operands);
953 [(set (zero_extract:SI (match_operand:HI 0 "nonimmediate_operand" "+mr")
954 (match_operand:SI 1 "immediate_operand" "i")
955 (match_operand:SI 2 "general_operand" "mri"))
956 (match_operand:SI 3 "general_operand" "mri"))]
961 operands[1] = GEN_INT (INTVAL(operands[1]) - 1);
962 output_asm_insn(\"INSFH %1, %2, {uword}%3, {uhalf}%0\",operands);
968 [(set (zero_extract:SI (match_operand:QI 0 "nonimmediate_operand" "+mr")
969 (match_operand:SI 1 "immediate_operand" "i")
970 (match_operand:SI 2 "general_operand" "mri"))
971 (match_operand:SI 3 "general_operand" "mri"))]
976 operands[1] = GEN_INT (INTVAL(operands[1]) - 1);
977 output_asm_insn(\"INSFB %1, %2, {uword}%3, {ubyte}%0\",operands);
982 ;; conditional branch instructions
985 [(set (pc) (if_then_else (eq (cc0) (const_int 0))
986 (label_ref (match_operand 0 "" ""))
992 [(set (pc) (if_then_else (ne (cc0) (const_int 0))
993 (label_ref (match_operand 0 "" ""))
999 [(set (pc) (if_then_else (gt (cc0) (const_int 0))
1000 (label_ref (match_operand 0 "" ""))
1006 [(set (pc) (if_then_else (gtu (cc0) (const_int 0))
1007 (label_ref (match_operand 0 "" ""))
1013 [(set (pc) (if_then_else (lt (cc0) (const_int 0))
1014 (label_ref (match_operand 0 "" ""))
1020 [(set (pc) (if_then_else (ltu (cc0) (const_int 0))
1021 (label_ref (match_operand 0 "" ""))
1027 [(set (pc) (if_then_else (ge (cc0) (const_int 0))
1028 (label_ref (match_operand 0 "" ""))
1034 [(set (pc) (if_then_else (geu (cc0) (const_int 0))
1035 (label_ref (match_operand 0 "" ""))
1041 [(set (pc) (if_then_else (le (cc0) (const_int 0))
1042 (label_ref (match_operand 0 "" ""))
1048 [(set (pc) (if_then_else (leu (cc0) (const_int 0))
1049 (label_ref (match_operand 0 "" ""))
1054 ;; reverse-conditional branch instructions
1057 [(set (pc) (if_then_else (eq (cc0) (const_int 0))
1059 (label_ref (match_operand 0 "" ""))))]
1064 [(set (pc) (if_then_else (ne (cc0) (const_int 0))
1066 (label_ref (match_operand 0 "" ""))))]
1071 [(set (pc) (if_then_else (gt (cc0) (const_int 0))
1073 (label_ref (match_operand 0 "" ""))))]
1078 [(set (pc) (if_then_else (gtu (cc0) (const_int 0))
1080 (label_ref (match_operand 0 "" ""))))]
1085 [(set (pc) (if_then_else (lt (cc0) (const_int 0))
1087 (label_ref (match_operand 0 "" ""))))]
1092 [(set (pc) (if_then_else (ltu (cc0) (const_int 0))
1094 (label_ref (match_operand 0 "" ""))))]
1099 [(set (pc) (if_then_else (ge (cc0) (const_int 0))
1101 (label_ref (match_operand 0 "" ""))))]
1106 [(set (pc) (if_then_else (geu (cc0) (const_int 0))
1108 (label_ref (match_operand 0 "" ""))))]
1113 [(set (pc) (if_then_else (le (cc0) (const_int 0))
1115 (label_ref (match_operand 0 "" ""))))]
1120 [(set (pc) (if_then_else (leu (cc0) (const_int 0))
1122 (label_ref (match_operand 0 "" ""))))]
1126 ;; call instructions
1129 [(call (match_operand:QI 0 "memory_operand" "m")
1130 (match_operand:SI 1 "immediate_operand" "i"))]
1134 (define_insn "call_value"
1135 [(set (match_operand 0 "register_operand" "=r")
1136 (call (match_operand:QI 1 "memory_operand" "m")
1137 (match_operand:SI 2 "immediate_operand" "i")))]
1141 ;; No-op instruction
1148 ;; jump through a dispatch table instruction
1150 (define_expand "casesi"
1151 [(use (match_operand:SI 0 "general_operand" "mri"))
1152 (set (cc0) (compare (match_dup 5)
1153 (match_operand:SI 1 "general_operand" "mri")))
1154 (set (pc) (if_then_else (lt (cc0) (const_int 0))
1155 (label_ref (match_operand 4 "" ""))
1157 (set (match_dup 5) (minus:SI (match_dup 5)
1159 (set (cc0) (compare (match_dup 5)
1160 (match_operand:SI 2 "general_operand" "mri")))
1161 (set (pc) (if_then_else (gtu (cc0) (const_int 0))
1162 (label_ref (match_dup 4))
1164 (set (match_dup 5) (ashift:SI (match_dup 5)
1166 (set (pc) (mem:SI (plus:SI (label_ref (match_operand 3 "" ""))
1171 operands[5] = gen_reg_rtx(GET_MODE (operands[0]));
1172 emit_move_insn(operands[5], operands[0]);
1175 ;; jump instructions
1177 (define_insn "indirect_jump"
1178 [(set (pc) (match_operand:SI 0 "address_operand" "p"))]
1183 [(set (pc) (label_ref (match_operand 0 "" "")))]