1 ;;- Machine description for GNU compiler
2 ;;- AT&T we32000 Version
3 ;; Contributed by John Wehle (john@feith1.uucp)
4 ;; Copyright (C)
1991-
1992 Free Software Foundation, Inc.
6 ;; This file is part of GNU CC.
8 ;; GNU CC is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version
1, or (at your option)
13 ;; GNU CC is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GNU CC; see the file COPYING. If not, write to
20 ;; the Free Software Foundation,
675 Mass Ave, Cambridge, MA
02139, 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_rtx(CONST_INT, SImode,
144 CONST_DOUBLE_HIGH(operands[
2]));
145 operands[
2] = gen_rtx(CONST_INT, SImode,
146 CONST_DOUBLE_LOW(operands[
2]));
149 if (GET_CODE (operands[
2]) == CONST_INT)
151 lsw_operands[
2] = operands[
2];
152 operands[
2] = const0_rtx;
157 label[
0] = gen_label_rtx();
158 LABEL_NUSES(label[
0]) =
1;
160 output_asm_insn(
\"addw2 %
2, %
0\", operands);
161 output_asm_insn(
\"addw2 %
2, %
0\", lsw_operands);
162 output_asm_insn(
\"BCCB %l0
\", label);
163 output_asm_insn(
\"INCW %
0\", operands);
164 output_asm_insn(
\"%l0:
\", label);
169 (define_insn "adddi3"
170 [(set (match_operand:DI
0 "nonimmediate_operand" "=&or")
171 (plus:DI (match_operand:DI
1 "general_operand" "oriF")
172 (match_operand:DI
2 "general_operand" "oriF")))]
179 if (GET_CODE (operands[
0]) == REG)
180 lsw_operands[
0] = gen_rtx(REG, SImode, REGNO (operands[
0]) +
1);
182 if (GET_CODE (operands[
0]) == MEM && offsettable_memref_p (operands[
0]))
183 lsw_operands[
0] = adj_offsettable_operand(operands[
0],
4);
187 if (GET_CODE (operands[
1]) == REG)
188 lsw_operands[
1] = gen_rtx(REG, SImode, REGNO (operands[
1]) +
1);
190 if (GET_CODE (operands[
1]) == MEM && offsettable_memref_p (operands[
1]))
191 lsw_operands[
1] = adj_offsettable_operand(operands[
1],
4);
193 if (GET_CODE (operands[
1]) == CONST_DOUBLE)
195 lsw_operands[
1] = gen_rtx(CONST_INT, SImode,
196 CONST_DOUBLE_HIGH(operands[
1]));
197 operands[
1] = gen_rtx(CONST_INT, SImode,
198 CONST_DOUBLE_LOW(operands[
1]));
201 if (GET_CODE (operands[
1]) == CONST_INT)
203 lsw_operands[
1] = operands[
1];
204 operands[
1] = const0_rtx;
209 if (GET_CODE (operands[
2]) == REG)
210 lsw_operands[
2] = gen_rtx(REG, SImode, REGNO (operands[
2]) +
1);
212 if (GET_CODE (operands[
2]) == MEM && offsettable_memref_p (operands[
2]))
213 lsw_operands[
2] = adj_offsettable_operand(operands[
2],
4);
215 if (GET_CODE (operands[
2]) == CONST_DOUBLE)
217 lsw_operands[
2] = gen_rtx(CONST_INT, SImode,
218 CONST_DOUBLE_HIGH(operands[
2]));
219 operands[
2] = gen_rtx(CONST_INT, SImode,
220 CONST_DOUBLE_LOW(operands[
2]));
223 if (GET_CODE (operands[
2]) == CONST_INT)
225 lsw_operands[
2] = operands[
2];
226 operands[
2] = const0_rtx;
231 label[
0] = gen_label_rtx();
232 LABEL_NUSES(label[
0]) =
1;
234 output_asm_insn(
\"addw3 %
2, %
1, %
0\", operands);
235 output_asm_insn(
\"addw3 %
2, %
1, %
0\", lsw_operands);
236 output_asm_insn(
\"BCCB %l0
\", label);
237 output_asm_insn(
\"INCW %
0\", operands);
238 output_asm_insn(
\"%l0:
\", label);
244 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
245 (plus:SI (match_operand:SI
1 "nonimmediate_operand" "
0")
246 (match_operand:SI
2 "general_operand" "mri")))]
250 (define_insn "addsi3"
251 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
252 (plus:SI (match_operand:SI
1 "general_operand" "mri")
253 (match_operand:SI
2 "general_operand" "mri")))]
258 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
259 (plus:HI (match_operand:HI
1 "nonimmediate_operand" "
0")
260 (match_operand:HI
2 "general_operand" "mri")))]
264 (define_insn "addhi3"
265 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
266 (plus:HI (match_operand:HI
1 "general_operand" "mri")
267 (match_operand:HI
2 "general_operand" "mri")))]
272 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
273 (plus:QI (match_operand:QI
1 "nonimmediate_operand" "
0")
274 (match_operand:QI
2 "general_operand" "mri")))]
278 (define_insn "addqi3"
279 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
280 (plus:QI (match_operand:QI
1 "general_operand" "mri")
281 (match_operand:QI
2 "general_operand" "mri")))]
285 ;; subtract instructions
288 [(set (match_operand:DI
0 "nonimmediate_operand" "=&or")
289 (minus:DI (match_operand:DI
1 "nonimmediate_operand" "
0")
290 (match_operand:DI
2 "general_operand" "oriF")))]
297 if (GET_CODE (operands[
0]) == REG)
298 lsw_operands[
0] = gen_rtx(REG, SImode, REGNO (operands[
0]) +
1);
300 if (GET_CODE (operands[
0]) == MEM && offsettable_memref_p (operands[
0]))
301 lsw_operands[
0] = adj_offsettable_operand(operands[
0],
4);
305 if (GET_CODE (operands[
2]) == REG)
306 lsw_operands[
2] = gen_rtx(REG, SImode, REGNO (operands[
2]) +
1);
308 if (GET_CODE (operands[
2]) == MEM && offsettable_memref_p (operands[
2]))
309 lsw_operands[
2] = adj_offsettable_operand(operands[
2],
4);
311 if (GET_CODE (operands[
2]) == CONST_DOUBLE)
313 lsw_operands[
2] = gen_rtx(CONST_INT, SImode,
314 CONST_DOUBLE_HIGH(operands[
2]));
315 operands[
2] = gen_rtx(CONST_INT, SImode,
316 CONST_DOUBLE_LOW(operands[
2]));
319 if (GET_CODE (operands[
2]) == CONST_INT)
321 lsw_operands[
2] = operands[
2];
322 operands[
2] = const0_rtx;
327 label[
0] = gen_label_rtx();
328 LABEL_NUSES(label[
0]) =
1;
330 output_asm_insn(
\"subw2 %
2, %
0\", operands);
331 output_asm_insn(
\"subw2 %
2, %
0\", lsw_operands);
332 output_asm_insn(
\"BCCB %l0
\", label);
333 output_asm_insn(
\"DECW %
0\", operands);
334 output_asm_insn(
\"%l0:
\", label);
339 (define_insn "subdi3"
340 [(set (match_operand:DI
0 "nonimmediate_operand" "=&or")
341 (minus:DI (match_operand:DI
1 "general_operand" "oriF")
342 (match_operand:DI
2 "general_operand" "oriF")))]
349 if (GET_CODE (operands[
0]) == REG)
350 lsw_operands[
0] = gen_rtx(REG, SImode, REGNO (operands[
0]) +
1);
352 if (GET_CODE (operands[
0]) == MEM && offsettable_memref_p (operands[
0]))
353 lsw_operands[
0] = adj_offsettable_operand(operands[
0],
4);
357 if (GET_CODE (operands[
1]) == REG)
358 lsw_operands[
1] = gen_rtx(REG, SImode, REGNO (operands[
1]) +
1);
360 if (GET_CODE (operands[
1]) == MEM && offsettable_memref_p (operands[
1]))
361 lsw_operands[
1] = adj_offsettable_operand(operands[
1],
4);
363 if (GET_CODE (operands[
1]) == CONST_DOUBLE)
365 lsw_operands[
1] = gen_rtx(CONST_INT, SImode,
366 CONST_DOUBLE_HIGH(operands[
1]));
367 operands[
1] = gen_rtx(CONST_INT, SImode,
368 CONST_DOUBLE_LOW(operands[
1]));
371 if (GET_CODE (operands[
1]) == CONST_INT)
373 lsw_operands[
1] = operands[
1];
374 operands[
1] = const0_rtx;
379 if (GET_CODE (operands[
2]) == REG)
380 lsw_operands[
2] = gen_rtx(REG, SImode, REGNO (operands[
2]) +
1);
382 if (GET_CODE (operands[
2]) == MEM && offsettable_memref_p (operands[
2]))
383 lsw_operands[
2] = adj_offsettable_operand(operands[
2],
4);
385 if (GET_CODE (operands[
2]) == CONST_DOUBLE)
387 lsw_operands[
2] = gen_rtx(CONST_INT, SImode,
388 CONST_DOUBLE_HIGH(operands[
2]));
389 operands[
2] = gen_rtx(CONST_INT, SImode,
390 CONST_DOUBLE_LOW(operands[
2]));
393 if (GET_CODE (operands[
2]) == CONST_INT)
395 lsw_operands[
2] = operands[
2];
396 operands[
2] = const0_rtx;
401 label[
0] = gen_label_rtx();
402 LABEL_NUSES(label[
0]) =
1;
404 output_asm_insn(
\"subw3 %
2, %
1, %
0\", operands);
405 output_asm_insn(
\"subw3 %
2, %
1, %
0\", lsw_operands);
406 output_asm_insn(
\"BCCB %l0
\", label);
407 output_asm_insn(
\"DECW %
0\", operands);
408 output_asm_insn(
\"%l0:
\", label);
414 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
415 (minus:SI (match_operand:SI
1 "nonimmediate_operand" "
0")
416 (match_operand:SI
2 "general_operand" "mri")))]
420 (define_insn "subsi3"
421 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
422 (minus:SI (match_operand:SI
1 "general_operand" "mri")
423 (match_operand:SI
2 "general_operand" "mri")))]
428 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
429 (minus:HI (match_operand:HI
1 "nonimmediate_operand" "
0")
430 (match_operand:HI
2 "general_operand" "mri")))]
434 (define_insn "subhi3"
435 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
436 (minus:HI (match_operand:HI
1 "general_operand" "mri")
437 (match_operand:HI
2 "general_operand" "mri")))]
442 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
443 (minus:QI (match_operand:QI
1 "nonimmediate_operand" "
0")
444 (match_operand:QI
2 "general_operand" "mri")))]
448 (define_insn "subqi3"
449 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
450 (minus:QI (match_operand:QI
1 "general_operand" "mri")
451 (match_operand:QI
2 "general_operand" "mri")))]
455 ;; signed multiply instructions
458 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
459 (mult:SI (match_operand:SI
1 "nonimmediate_operand" "
0")
460 (match_operand:SI
2 "general_operand" "mri")))]
464 (define_insn "mulsi3"
465 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
466 (mult:SI (match_operand:SI
1 "general_operand" "mri")
467 (match_operand:SI
2 "general_operand" "mri")))]
471 ;; signed divide instructions
474 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
475 (div:SI (match_operand:SI
1 "nonimmediate_operand" "
0")
476 (match_operand:SI
2 "general_operand" "mri")))]
480 (define_insn "divsi3"
481 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
482 (div:SI (match_operand:SI
1 "general_operand" "mri")
483 (match_operand:SI
2 "general_operand" "mri")))]
487 ;; signed modulus instruction
490 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
491 (mod:SI (match_operand:SI
1 "nonimmediate_operand" "
0")
492 (match_operand:SI
2 "general_operand" "mri")))]
496 (define_insn "modsi3"
497 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
498 (mod:SI (match_operand:SI
1 "general_operand" "mri")
499 (match_operand:SI
2 "general_operand" "mri")))]
503 ;; unsigned divide instruction
506 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
507 (udiv:SI (match_operand:SI
1 "nonimmediate_operand" "
0")
508 (match_operand:SI
2 "general_operand" "mri")))]
512 (define_insn "udivsi3"
513 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
514 (udiv:SI (match_operand:SI
1 "general_operand" "mri")
515 (match_operand:SI
2 "general_operand" "mri")))]
519 ;; unsigned modulus instruction
522 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
523 (umod:SI (match_operand:SI
1 "nonimmediate_operand" "
0")
524 (match_operand:SI
2 "general_operand" "mri")))]
528 (define_insn "umodsi3"
529 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
530 (umod:SI (match_operand:SI
1 "general_operand" "mri")
531 (match_operand:SI
2 "general_operand" "mri")))]
535 ;; logical-and instructions
538 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
539 (and:SI (match_operand:SI
1 "nonimmediate_operand" "
0")
540 (match_operand:SI
2 "general_operand" "mri")))]
544 (define_insn "andsi3"
545 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
546 (and:SI (match_operand:SI
1 "general_operand" "mri")
547 (match_operand:SI
2 "general_operand" "mri")))]
552 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
553 (and:HI (match_operand:HI
1 "nonimmediate_operand" "
0")
554 (match_operand:HI
2 "general_operand" "mri")))]
558 (define_insn "andhi3"
559 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
560 (and:HI (match_operand:HI
1 "general_operand" "mri")
561 (match_operand:HI
2 "general_operand" "mri")))]
566 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
567 (and:QI (match_operand:QI
1 "nonimmediate_operand" "
0")
568 (match_operand:QI
2 "general_operand" "mri")))]
572 (define_insn "andqi3"
573 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
574 (and:QI (match_operand:QI
1 "general_operand" "mri")
575 (match_operand:QI
2 "general_operand" "mri")))]
579 ;; inclusive-or instructions
582 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
583 (ior:SI (match_operand:SI
1 "nonimmediate_operand" "
0")
584 (match_operand:SI
2 "general_operand" "mri")))]
588 (define_insn "iorsi3"
589 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
590 (ior:SI (match_operand:SI
1 "general_operand" "mri")
591 (match_operand:SI
2 "general_operand" "mri")))]
596 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
597 (ior:HI (match_operand:HI
1 "nonimmediate_operand" "
0")
598 (match_operand:HI
2 "general_operand" "mri")))]
602 (define_insn "iorhi3"
603 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
604 (ior:HI (match_operand:HI
1 "general_operand" "mri")
605 (match_operand:HI
2 "general_operand" "mri")))]
610 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
611 (ior:QI (match_operand:QI
1 "nonimmediate_operand" "
0")
612 (match_operand:QI
2 "general_operand" "mri")))]
616 (define_insn "iorqi3"
617 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
618 (ior:QI (match_operand:QI
1 "general_operand" "mri")
619 (match_operand:QI
2 "general_operand" "mri")))]
623 ;; exclusive-or instructions
626 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
627 (xor:SI (match_operand:SI
1 "nonimmediate_operand" "
0")
628 (match_operand:SI
2 "general_operand" "mri")))]
632 (define_insn "xorsi3"
633 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
634 (xor:SI (match_operand:SI
1 "general_operand" "mri")
635 (match_operand:SI
2 "general_operand" "mri")))]
640 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
641 (xor:HI (match_operand:HI
1 "nonimmediate_operand" "
0")
642 (match_operand:HI
2 "general_operand" "mri")))]
646 (define_insn "xorhi3"
647 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
648 (xor:HI (match_operand:HI
1 "general_operand" "mri")
649 (match_operand:HI
2 "general_operand" "mri")))]
654 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
655 (xor:QI (match_operand:QI
1 "nonimmediate_operand" "
0")
656 (match_operand:QI
2 "general_operand" "mri")))]
660 (define_insn "xorqi3"
661 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
662 (xor:QI (match_operand:QI
1 "general_operand" "mri")
663 (match_operand:QI
2 "general_operand" "mri")))]
667 ;; arithmetic shift instructions
669 (define_insn "ashlsi3"
670 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
671 (ashift:SI (match_operand:SI
1 "general_operand" "mri")
672 (match_operand:SI
2 "general_operand" "mri")))]
676 (define_insn "ashrsi3"
677 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
678 (ashiftrt:SI (match_operand:SI
1 "general_operand" "mri")
679 (match_operand:SI
2 "general_operand" "mri")))]
683 ;; logical shift instructions
685 ;; (define_insn "lshlsi3"
686 ;; [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
687 ;; (lshift:SI (match_operand:SI
1 "general_operand" "mri")
688 ;; (match_operand:SI
2 "general_operand" "mri")))]
690 ;; "LLSW3 %
2, %
1, %
0")
692 (define_insn "lshrsi3"
693 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
694 (lshiftrt:SI (match_operand:SI
1 "general_operand" "mri")
695 (match_operand:SI
2 "general_operand" "mri")))]
699 ;; rotate instruction
701 (define_insn "rotrsi3"
702 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
703 (rotatert: SI (match_operand:SI
1 "general_operand" "mri")
704 (match_operand:SI
2 "general_operand" "mri")))]
708 ;; negate instructions
710 (define_insn "negsi2"
711 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
712 (neg:SI (match_operand:SI
1 "general_operand" "mri")))]
716 (define_insn "neghi2"
717 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
718 (neg:HI (match_operand:HI
1 "general_operand" "mri")))]
722 ;; complement instructions
724 (define_insn "one_cmplsi2"
725 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
726 (not:SI (match_operand:SI
1 "general_operand" "mri")))]
730 (define_insn "one_cmplhi2"
731 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
732 (not:HI (match_operand:HI
1 "general_operand" "mri")))]
736 (define_insn "one_cmplqi2"
737 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
738 (not:QI (match_operand:QI
1 "general_operand" "mri")))]
744 ;; We don't want to allow a constant operand for test insns because
745 ;; (set (cc0) (const_int foo)) has no mode information. Such insns will
746 ;; be folded while optimizing anyway.
749 [(set (cc0) (match_operand:SI
0 "nonimmediate_operand" "mr"))]
754 [(set (cc0) (match_operand:HI
0 "nonimmediate_operand" "mr"))]
759 [(set (cc0) (match_operand:QI
0 "nonimmediate_operand" "mr"))]
763 ;; compare instruction
766 [(set (cc0) (compare (match_operand:SI
0 "nonimmediate_operand" "mr")
767 (match_operand:SI
1 "general_operand" "mri")))]
772 [(set (cc0) (compare (match_operand:HI
0 "nonimmediate_operand" "mr")
773 (match_operand:HI
1 "general_operand" "mri")))]
778 if (GET_CODE (operands[
1]) == CONST_INT &&
779 ((unsigned long)INTVAL (operands[
1]) &
0x8000L))
780 operands[
1] = gen_rtx(CONST_INT, SImode, INTVAL(operands[
1]) |
0xffff0000L);
782 output_asm_insn(
\"CMPH %
1, %
0\",operands);
788 [(set (cc0) (compare (match_operand:QI
0 "nonimmediate_operand" "mr")
789 (match_operand:QI
1 "general_operand" "mri")))]
794 if (GET_CODE (operands[
1]) == CONST_INT &&
795 ((unsigned long)INTVAL (operands[
1]) &
0x80L))
796 operands[
1] = gen_rtx(CONST_INT, SImode, INTVAL(operands[
1]) |
0xffffff00L);
798 output_asm_insn(
\"CMPB {sbyte}%
1, {sbyte}%
0\",operands);
803 ;; truncate instructions
805 (define_insn "truncdfsf2"
806 [(clobber (reg:SI
0))
809 (set (match_operand:SF
0 "nonimmediate_operand" "=mr")
810 (float_truncate:SF (match_operand:DF
1 "general_operand" "orF")))]
814 output_push_double(&operands[
1]);
815 output_asm_insn(
\"call &
2, _fdtos
\");
817 if (GET_CODE (operands[
0]) != REG || REGNO (operands[
0]) !=
0)
818 output_asm_insn(
\"movw %%r0, %
0\", operands);
824 (define_insn "truncsihi2"
825 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
826 (truncate:HI (match_operand:SI
1 "general_operand" "mri")))]
830 (define_insn "truncsiqi2"
831 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
832 (truncate:QI (match_operand:SI
1 "general_operand" "mri")))]
836 (define_insn "trunchiqi2"
837 [(set (match_operand:QI
0 "nonimmediate_operand" "=mr")
838 (truncate:QI (match_operand:HI
1 "general_operand" "mri")))]
842 ;; sign-extend move instructions
844 (define_insn "extendsfdf2"
845 [(clobber (reg:SI
0))
848 (set (match_operand:DF
0 "nonimmediate_operand" "=or")
849 (float_extend:DF (match_operand:SF
1 "general_operand" "mrF")))]
855 output_asm_insn(
\"pushw %
1\", operands);
856 output_asm_insn(
\"call &
1, _fstod
\");
858 if (GET_CODE (operands[
0]) != REG || REGNO (operands[
0]) !=
0) {
859 xoperands[
0] = operands[
0];
860 xoperands[
1] = gen_rtx(REG, DFmode,
0);
861 output_move_double(xoperands);
867 (define_insn "extendhisi2"
868 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
869 (sign_extend:SI (match_operand:HI
1 "general_operand" "mri")))]
873 (define_insn "extendqisi2"
874 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
875 (sign_extend:SI (match_operand:QI
1 "general_operand" "mri")))]
879 (define_insn "extendqihi2"
880 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
881 (sign_extend:HI (match_operand:QI
1 "general_operand" "mri")))]
885 ;; zero-extend move instructions
887 (define_insn "zero_extendhisi2"
888 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
889 (zero_extend:SI (match_operand:HI
1 "general_operand" "mri")))]
893 (define_insn "zero_extendqisi2"
894 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
895 (zero_extend:SI (match_operand:QI
1 "general_operand" "mri")))]
899 (define_insn "zero_extendqihi2"
900 [(set (match_operand:HI
0 "nonimmediate_operand" "=mr")
901 (zero_extend:HI (match_operand:QI
1 "general_operand" "mri")))]
905 ;; bit field instructions
908 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
909 (zero_extract:SI (match_operand:SI
1 "general_operand" "mri")
910 (match_operand:SI
2 "immediate_operand" "i")
911 (match_operand:SI
3 "general_operand" "mri")))]
916 operands[
2] = gen_rtx(CONST_INT, SImode, INTVAL(operands[
2]) -
1);
917 output_asm_insn(
\"EXTFW %
2, %
3, %
1, %
0\",operands);
923 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
924 (zero_extract:SI (match_operand:HI
1 "general_operand" "mri")
925 (match_operand:SI
2 "immediate_operand" "i")
926 (match_operand:SI
3 "general_operand" "mri")))]
931 operands[
2] = gen_rtx(CONST_INT, SImode, INTVAL(operands[
2]) -
1);
932 output_asm_insn(
\"EXTFH %
2, %
3, {uhalf}%
1, {uword}%
0\",operands);
938 [(set (match_operand:SI
0 "nonimmediate_operand" "=mr")
939 (zero_extract:SI (match_operand:QI
1 "general_operand" "mri")
940 (match_operand:SI
2 "immediate_operand" "i")
941 (match_operand:SI
3 "general_operand" "mri")))]
946 operands[
2] = gen_rtx(CONST_INT, SImode, INTVAL(operands[
2]) -
1);
947 output_asm_insn(
\"EXTFB %
2, %
3, {ubyte}%
1, {uword}%
0\",operands);
953 [(set (zero_extract:SI (match_operand:SI
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_rtx(CONST_INT, SImode, INTVAL(operands[
1]) -
1);
962 output_asm_insn(
\"INSFW %
1, %
2, %
3, %
0\",operands);
968 [(set (zero_extract:SI (match_operand:HI
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_rtx(CONST_INT, SImode, INTVAL(operands[
1]) -
1);
977 output_asm_insn(
\"INSFH %
1, %
2, {uword}%
3, {uhalf}%
0\",operands);
983 [(set (zero_extract:SI (match_operand:QI
0 "nonimmediate_operand" "+mr")
984 (match_operand:SI
1 "immediate_operand" "i")
985 (match_operand:SI
2 "general_operand" "mri"))
986 (match_operand:SI
3 "general_operand" "mri"))]
991 operands[
1] = gen_rtx(CONST_INT, SImode, INTVAL(operands[
1]) -
1);
992 output_asm_insn(
\"INSFB %
1, %
2, {uword}%
3, {ubyte}%
0\",operands);
997 ;; conditional branch instructions
1000 [(set (pc) (if_then_else (eq (cc0) (const_int
0))
1001 (label_ref (match_operand
0 "" ""))
1007 [(set (pc) (if_then_else (ne (cc0) (const_int
0))
1008 (label_ref (match_operand
0 "" ""))
1014 [(set (pc) (if_then_else (gt (cc0) (const_int
0))
1015 (label_ref (match_operand
0 "" ""))
1021 [(set (pc) (if_then_else (gtu (cc0) (const_int
0))
1022 (label_ref (match_operand
0 "" ""))
1028 [(set (pc) (if_then_else (lt (cc0) (const_int
0))
1029 (label_ref (match_operand
0 "" ""))
1035 [(set (pc) (if_then_else (ltu (cc0) (const_int
0))
1036 (label_ref (match_operand
0 "" ""))
1042 [(set (pc) (if_then_else (ge (cc0) (const_int
0))
1043 (label_ref (match_operand
0 "" ""))
1049 [(set (pc) (if_then_else (geu (cc0) (const_int
0))
1050 (label_ref (match_operand
0 "" ""))
1056 [(set (pc) (if_then_else (le (cc0) (const_int
0))
1057 (label_ref (match_operand
0 "" ""))
1063 [(set (pc) (if_then_else (leu (cc0) (const_int
0))
1064 (label_ref (match_operand
0 "" ""))
1069 ;; reverse-conditional branch instructions
1072 [(set (pc) (if_then_else (eq (cc0) (const_int
0))
1074 (label_ref (match_operand
0 "" ""))))]
1079 [(set (pc) (if_then_else (ne (cc0) (const_int
0))
1081 (label_ref (match_operand
0 "" ""))))]
1086 [(set (pc) (if_then_else (gt (cc0) (const_int
0))
1088 (label_ref (match_operand
0 "" ""))))]
1093 [(set (pc) (if_then_else (gtu (cc0) (const_int
0))
1095 (label_ref (match_operand
0 "" ""))))]
1100 [(set (pc) (if_then_else (lt (cc0) (const_int
0))
1102 (label_ref (match_operand
0 "" ""))))]
1107 [(set (pc) (if_then_else (ltu (cc0) (const_int
0))
1109 (label_ref (match_operand
0 "" ""))))]
1114 [(set (pc) (if_then_else (ge (cc0) (const_int
0))
1116 (label_ref (match_operand
0 "" ""))))]
1121 [(set (pc) (if_then_else (geu (cc0) (const_int
0))
1123 (label_ref (match_operand
0 "" ""))))]
1128 [(set (pc) (if_then_else (le (cc0) (const_int
0))
1130 (label_ref (match_operand
0 "" ""))))]
1135 [(set (pc) (if_then_else (leu (cc0) (const_int
0))
1137 (label_ref (match_operand
0 "" ""))))]
1141 ;; call instructions
1144 [(call (match_operand:QI
0 "memory_operand" "m")
1145 (match_operand:SI
1 "immediate_operand" "i"))]
1149 (define_insn "call_value"
1150 [(set (match_operand
0 "register_operand" "=r")
1151 (call (match_operand:QI
1 "memory_operand" "m")
1152 (match_operand:SI
2 "immediate_operand" "i")))]
1156 ;; No-op instruction
1163 ;; jump through a dispatch table instruction
1165 (define_expand "casesi"
1166 [(use (match_operand:SI
0 "general_operand" "mri"))
1167 (set (cc0) (compare (match_dup
5)
1168 (match_operand:SI
1 "general_operand" "mri")))
1169 (set (pc) (if_then_else (lt (cc0) (const_int
0))
1170 (label_ref (match_operand
4 "" ""))
1172 (set (match_dup
5) (minus:SI (match_dup
5)
1174 (set (cc0) (compare (match_dup
5)
1175 (match_operand:SI
2 "general_operand" "mri")))
1176 (set (pc) (if_then_else (gtu (cc0) (const_int
0))
1177 (label_ref (match_operand
4 "" ""))
1179 (set (match_dup
5) (ashift:SI (match_dup
5)
1181 (set (pc) (mem:SI (plus:SI (label_ref (match_operand
3 "" ""))
1186 operands[
5] = gen_reg_rtx(GET_MODE (operands[
0]));
1187 emit_move_insn(operands[
5], operands[
0]);
1190 ;; jump instructions
1193 [(set (pc) (mem:SI (match_operand:SI
0 "address_operand" "p")))]
1194 "GET_CODE (operands[
0]) != MEM"
1197 (define_insn "indirect_jump"
1198 [(set (pc) (match_operand:SI
0 "address_operand" "p"))]
1203 [(set (pc) (label_ref (match_operand
0 "" "")))]
1207 ;; peephole optimizations
1210 [(set (match_operand:SI
0 "register_operand" "=r")
1211 (match_operand:SI
1 "nonimmediate_operand" "or"))
1212 (set (match_operand:SI
2 "register_operand" "=r")
1213 (mem:SI (match_dup
0)))]
1214 "REGNO (operands[
0]) == REGNO (operands[
2]) && (REG_P (operands[
1]) || offsettable_memref_p (operands[
1]))"
1218 [(set (match_operand:SI
0 "register_operand" "=r")
1219 (match_operand:SI
1 "nonimmediate_operand" "or"))
1220 (set (match_operand:HI
2 "register_operand" "=r")
1221 (mem:HI (match_dup
0)))]
1222 "REGNO (operands[
0]) == REGNO (operands[
2]) && (REG_P (operands[
1]) || offsettable_memref_p (operands[
1]))"
1226 [(set (match_operand:SI
0 "register_operand" "=r")
1227 (match_operand:SI
1 "nonimmediate_operand" "or"))
1228 (set (match_operand:QI
2 "register_operand" "=r")
1229 (mem:QI (match_dup
0)))]
1230 "REGNO (operands[
0]) == REGNO (operands[
2]) && (REG_P (operands[
1]) || offsettable_memref_p (operands[
1]))"