1 ;;- Machine description for the pdp11 for GNU C compiler
2 ;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
3 ;; Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
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, 675 Mass Ave, Cambridge, MA 02139, USA.
25 ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al.
27 ;;- cpp macro #define NOTICE_UPDATE_CC in file tm.h handles condition code
28 ;;- updates for most instructions.
30 ;;- Operand classes for the register allocator:
32 ;; Compare instructions.
34 ;; currently we only support df floats, which saves us quite some
35 ;; hassle switching the FP mode!
36 ;; we assume that CPU is always in long float mode, and
37 ;; 16 bit integer mode - currently, the prologue for main does this,
38 ;; but maybe we should just set up a NEW crt0 properly,
39 ;; -- and what about signal handling code?
40 ;; (we don't even let sf floats in the register file, so
41 ;; we only should have to worry about truncating and widening
42 ;; when going to memory)
44 ;; abort() call by g++ - must define libfunc for cmp_optab
45 ;; and ucmp_optab for mode SImode, because we don't have that!!!
46 ;; - yet since no libfunc is there, we abort ()
48 ;; The only thing that remains to be done then is output
49 ;; the floats in a way the assembler can handle it (and
50 ;; if you're really into it, use a PDP11 float emulation
51 ;; libary to do floating point constant folding - but
52 ;; I guess you'll get reasonable results even when not
54 ;; the last thing to do is fix the UPDATE_CC macro to check
55 ;; for floating point condition codes, and set cc_status
56 ;; properly, also setting the CC_IN_FCCR flag.
59 ;; currently type is only fpu or arith or unknown, maybe branch later ?
61 (define_attr "type" "unknown,arith,fp" (const_string "arith"))
63 ;; length default is 1 word each
64 (define_attr "length" "" (const_int 1))
66 ;; a user's asm statement
67 (define_asm_attributes
68 [(set_attr "type" "unknown")
69 ; all bets are off how long it is - make it 256, forces long jumps
70 ; whenever jumping around it !!!
71 (set_attr "length" "256")])
73 ;; define function units
75 ;; arithmetic - values here immediately when next insn issued
76 ;; or does it mean the number of cycles after this insn was issued?
77 ;; how do I say that fpu insns use cpu also? (pre-interaction phase)
79 ;(define_function_unit "cpu" 1 1 (eq_attr "type" "arith") 0 0)
80 ;(define_function_unit "fpu" 1 1 (eq_attr "type" "fp") 0 0)
85 (compare (match_operand:DF 0 "general_operand" "fR,Q,F")
86 (match_operand:DF 1 "register_operand" "a,a,a")))]
90 cc_status.flags = CC_IN_FPU;
91 return \"cmpd %0, %1\;cfcc\";
93 [(set_attr "length" "2,3,6")])
95 ;; a bit of brain damage, maybe inline later -
96 ;; problem is - gcc seems to NEED SImode because
97 ;; of the cmp weirdness - maybe change gcc to handle this?
99 (define_expand "cmpsi"
101 (match_operand:SI 0 "general_operand" "g"))
103 (match_operand:SI 1 "general_operand" "g"))
104 (parallel [(set (cc0)
107 (clobber (reg:SI 0))])]
108 "0" ;; disable for test
111 ;; check for next insn for branch code - does this still
118 (clobber (reg:SI 0))]
122 rtx br_insn = NEXT_INSN (insn);
125 if (GET_CODE (br_insn) != JUMP_INSN)
127 br_code = GET_CODE (XEXP (XEXP (PATTERN (br_insn), 1), 0));
136 return \"jsr pc, ___ucmpsi\;cmp $1,r0\";
145 return \"jsr pc, ___cmpsi\;tst r0\";
152 [(set_attr "length" "4")])
157 (compare (match_operand:HI 0 "general_operand" "rR,rR,Qi,Qi")
158 (match_operand:HI 1 "general_operand" "rR,Qi,rR,Qi")))]
161 [(set_attr "length" "1,2,2,3")])
165 (compare (match_operand:QI 0 "general_operand" "rR,rR,Qi,Qi")
166 (match_operand:QI 1 "general_operand" "rR,Qi,rR,Qi")))]
169 [(set_attr "length" "1,2,2,3")])
172 ;; We have to have this because cse can optimize the previous pattern
177 (match_operand:DF 0 "general_operand" "fR,Q"))]
181 cc_status.flags = CC_IN_FPU;
182 return \"tstd %0\;cfcc\";
184 [(set_attr "length" "2,3")])
187 (define_expand "tstsi"
189 (match_operand:SI 0 "general_operand" "g"))
190 (parallel [(set (cc0)
192 (clobber (reg:SI 0))])]
193 "0" ;; disable for test
199 (clobber (reg:SI 0))]
201 "jsr pc, ___tstsi\;tst r0"
202 [(set_attr "length" "3")])
207 (match_operand:HI 0 "general_operand" "rR,Q"))]
210 [(set_attr "length" "1,2")])
214 (match_operand:QI 0 "general_operand" "rR,Q"))]
217 [(set_attr "length" "1,2")])
219 ;; sob instruction - we need an assembler which can make this instruction
220 ;; valid under _all_ circumstances!
225 (ne (plus:HI (match_operand:HI 0 "register_operand" "r")
228 (label_ref (match_operand 1 "" ""))
231 (plus:HI (match_dup 0)
236 static int labelcount = 0;
237 static char buf[1000];
239 if (get_attr_length (insn) == 1)
240 return \"sob %0, %l1\";
243 output_asm_insn (\"dec %0\", operands);
245 sprintf (buf, \"bge LONG_SOB%d\", labelcount);
246 output_asm_insn (buf, NULL);
248 output_asm_insn (\"jmp %l1\", operands);
250 sprintf (buf, \"LONG_SOB%d:\", labelcount++);
251 output_asm_insn (buf, NULL);
255 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
258 (ge (minus (match_dup 0)
264 ;; These control RTL generation for conditional jump insns
265 ;; and match them for register allocation.
267 ;; problem with too short jump distance! we need an assembler which can
268 ;; make this valid for all jump distances!
271 ;; these must be changed to check for CC_IN_FCCR if float is to be
276 (if_then_else (eq (cc0)
278 (label_ref (match_operand 0 "" ""))
281 "* return output_jump(\"beq\", \"bne\", get_attr_length(insn));"
282 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
285 (ge (minus (match_dup 0)
294 (if_then_else (ne (cc0)
296 (label_ref (match_operand 0 "" ""))
299 "* return output_jump(\"bne\", \"beq\", get_attr_length(insn));"
300 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
303 (ge (minus (match_dup 0)
311 (if_then_else (gt (cc0)
313 (label_ref (match_operand 0 "" ""))
316 "* return output_jump(\"bgt\", \"ble\", get_attr_length(insn));"
317 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
320 (ge (minus (match_dup 0)
328 (if_then_else (gtu (cc0)
330 (label_ref (match_operand 0 "" ""))
333 "* return output_jump(\"bhi\", \"blos\", get_attr_length(insn));"
334 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
337 (ge (minus (match_dup 0)
345 (if_then_else (lt (cc0)
347 (label_ref (match_operand 0 "" ""))
350 "* return output_jump(\"blt\", \"bge\", get_attr_length(insn));"
351 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
354 (ge (minus (match_dup 0)
363 (if_then_else (ltu (cc0)
365 (label_ref (match_operand 0 "" ""))
368 "* return output_jump(\"blo\", \"bhis\", get_attr_length(insn));"
369 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
372 (ge (minus (match_dup 0)
380 (if_then_else (ge (cc0)
382 (label_ref (match_operand 0 "" ""))
385 "* return output_jump(\"bge\", \"blt\", get_attr_length(insn));"
386 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
389 (ge (minus (match_dup 0)
397 (if_then_else (geu (cc0)
399 (label_ref (match_operand 0 "" ""))
402 "* return output_jump(\"bhis\", \"blo\", get_attr_length(insn));"
403 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
406 (ge (minus (match_dup 0)
414 (if_then_else (le (cc0)
416 (label_ref (match_operand 0 "" ""))
419 "* return output_jump(\"ble\", \"bgt\", get_attr_length(insn));"
420 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
423 (ge (minus (match_dup 0)
431 (if_then_else (leu (cc0)
433 (label_ref (match_operand 0 "" ""))
436 "* return output_jump(\"blos\", \"bhi\", get_attr_length(insn));"
437 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
440 (ge (minus (match_dup 0)
447 ;; These match inverted jump insns for register allocation.
451 (if_then_else (eq (cc0)
454 (label_ref (match_operand 0 "" ""))))]
456 "* return output_jump(\"bne\", \"beq\", get_attr_length(insn));"
457 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
460 (ge (minus (match_dup 0)
468 (if_then_else (ne (cc0)
471 (label_ref (match_operand 0 "" ""))))]
473 "* return output_jump(\"beq\", \"bne\", get_attr_length(insn));"
474 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
477 (ge (minus (match_dup 0)
485 (if_then_else (gt (cc0)
488 (label_ref (match_operand 0 "" ""))))]
490 "* return output_jump(\"ble\", \"bgt\", get_attr_length(insn));"
491 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
494 (ge (minus (match_dup 0)
502 (if_then_else (gtu (cc0)
505 (label_ref (match_operand 0 "" ""))))]
507 "* return output_jump(\"blos\", \"bhi\", get_attr_length(insn));"
508 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
511 (ge (minus (match_dup 0)
519 (if_then_else (lt (cc0)
522 (label_ref (match_operand 0 "" ""))))]
524 "* return output_jump(\"bge\", \"blt\", get_attr_length(insn));"
525 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
528 (ge (minus (match_dup 0)
536 (if_then_else (ltu (cc0)
539 (label_ref (match_operand 0 "" ""))))]
541 "* return output_jump(\"bhis\", \"blo\", get_attr_length(insn));"
542 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
545 (ge (minus (match_dup 0)
553 (if_then_else (ge (cc0)
556 (label_ref (match_operand 0 "" ""))))]
558 "* return output_jump(\"blt\", \"bge\", get_attr_length(insn));"
559 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
562 (ge (minus (match_dup 0)
570 (if_then_else (geu (cc0)
573 (label_ref (match_operand 0 "" ""))))]
575 "* return output_jump(\"blo\", \"bhis\", get_attr_length(insn));"
576 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
579 (ge (minus (match_dup 0)
587 (if_then_else (le (cc0)
590 (label_ref (match_operand 0 "" ""))))]
592 "* return output_jump(\"bgt\", \"ble\", get_attr_length(insn));"
593 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
596 (ge (minus (match_dup 0)
604 (if_then_else (leu (cc0)
607 (label_ref (match_operand 0 "" ""))))]
609 "* return output_jump(\"bhi\", \"blos\", get_attr_length(insn));"
610 [(set (attr "length") (if_then_else (ior (le (minus (match_dup 0)
613 (ge (minus (match_dup 0)
622 [(set (match_operand:DI 0 "general_operand" "=g")
623 (match_operand:DI 1 "general_operand" "g"))]
625 "* return output_move_quad (operands);"
626 ;; what's the mose expensive code - say twice movsi = 16
627 [(set_attr "length" "16")])
630 [(set (match_operand:SI 0 "general_operand" "=r,r,r,rm,m")
631 (match_operand:SI 1 "general_operand" "rN,IJ,K,m,r"))]
633 "* return output_move_double (operands);"
634 ;; what's the most expensive code ? - I think 8!
635 ;; we could split it up and make several sub-cases...
636 [(set_attr "length" "2,3,4,8,8")])
639 [(set (match_operand:HI 0 "general_operand" "=rR,rR,Q,Q")
640 (match_operand:HI 1 "general_operand" "rRN,Qi,rRN,Qi"))]
644 if (operands[1] == const0_rtx)
647 return \"mov %1, %0\";
649 [(set_attr "length" "1,2,2,3")])
652 [(set (match_operand:QI 0 "general_operand" "=rR,rR,Q,Q")
653 (match_operand:QI 1 "general_operand" "rRN,Qi,rRN,Qi"))]
657 if (operands[1] == const0_rtx)
660 return \"movb %1, %0\";
662 [(set_attr "length" "1,2,2,3")])
664 ;; do we have to supply all these moves? e.g. to
665 ;; NO_LOAD_FPU_REGs ?
667 [(set (match_operand:DF 0 "general_operand" "=f,R,f,Q,f,m")
668 (match_operand:DF 1 "general_operand" "fR,f,Q,f,F,m"))]
670 "* return output_move_quad (operands);"
672 [(set_attr "length" "1,1,2,2,5,16")])
675 [(set (match_operand:SF 0 "general_operand" "=g,r,g")
676 (match_operand:SF 1 "general_operand" "r,rmF,g"))]
678 "* return output_move_double (operands);"
679 [(set_attr "length" "8,8,8")])
681 ;; maybe fiddle a bit with move_ratio, then
682 ;; let constraints only accept a register ...
684 (define_expand "movstrhi"
685 [(parallel [(set (mem:BLK (match_operand:BLK 0 "general_operand" "=g,g"))
686 (mem:BLK (match_operand:BLK 1 "general_operand" "g,g")))
687 (use (match_operand:HI 2 "arith_operand" "n,&mr"))
688 (use (match_operand:HI 3 "immediate_operand" "i,i"))
689 (clobber (match_scratch:HI 4 "=&r,X"))
690 (clobber (match_dup 0))
691 (clobber (match_dup 1))
692 (clobber (match_dup 2))])]
693 "(TARGET_BCOPY_BUILTIN)"
696 operands[0] = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
697 operands[1] = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
698 operands[2] = force_not_mem (operands[2]);
702 (define_insn "" ; "movstrhi"
703 [(set (mem:BLK (match_operand:HI 0 "general_operand" "=r,r"))
704 (mem:BLK (match_operand:HI 1 "general_operand" "r,r")))
705 (use (match_operand:HI 2 "arith_operand" "n,&r"))
706 (use (match_operand:HI 3 "immediate_operand" "i,i"))
707 (clobber (match_scratch:HI 4 "=&r,X"))
708 (clobber (match_dup 0))
709 (clobber (match_dup 1))
710 (clobber (match_dup 2))]
711 "(TARGET_BCOPY_BUILTIN)"
712 "* return output_block_move (operands);"
714 [(set_attr "length" "40")])
718 ;;- truncation instructions
720 (define_insn "truncdfsf2"
721 [(set (match_operand:SF 0 "memory_operand" "=R,Q")
722 (float_truncate:SF (match_operand:DF 1 "register_operand" "a,a")))]
725 [(set_attr "length" "1,2")])
727 (define_expand "truncsihi2"
728 [(set (match_operand:HI 0 "general_operand" "=g")
730 (match_operand:SI 1 "general_operand" "or")
736 ;;- zero extension instructions
738 (define_insn "zero_extendqihi2"
739 [(set (match_operand:HI 0 "general_operand" "=r")
740 (zero_extend:HI (match_operand:QI 1 "general_operand" "0")))]
743 [(set_attr "length" "2")])
745 (define_expand "zero_extendhisi2"
749 (match_operand:HI 1 "register_operand" "r"))
751 (match_operand:SI 0 "register_operand" "=r")
755 "/* operands[1] = make_safe_from (operands[1], operands[0]); */")
758 ;;- sign extension instructions
760 (define_insn "extendsfdf2"
761 [(set (match_operand:DF 0 "register_operand" "=a,a")
762 (float_extend:SF (match_operand:SF 1 "memory_operand" "R,Q")))]
765 [(set_attr "length" "1,2")])
767 ;; does movb sign extend in register-to-register move?
768 (define_insn "extendqihi2"
769 [(set (match_operand:HI 0 "register_operand" "=r,r")
770 (sign_extend:HI (match_operand:QI 1 "general_operand" "rR,Q")))]
773 [(set_attr "length" "1,2")])
775 (define_insn "extendqisi2"
776 [(set (match_operand:SI 0 "register_operand" "=r,r")
777 (sign_extend:SI (match_operand:QI 1 "general_operand" "rR,Q")))]
783 /* make register pair available */
784 latehalf[0] = operands[0];
785 operands[0] = gen_rtx(REG, HImode, REGNO (operands[0])+1);
787 output_asm_insn(\"movb %1, %0\", operands);
788 output_asm_insn(\"sxt %0\", latehalf);
792 [(set_attr "length" "2,3")])
794 ;; maybe we have to use define_expand to say that we have the instruction,
795 ;; unconditionally, and then match dependent on CPU type:
797 (define_expand "extendhisi2"
798 [(set (match_operand:SI 0 "general_operand" "=g")
799 (sign_extend:SI (match_operand:HI 1 "general_operand" "g")))]
803 (define_insn "" ; "extendhisi2"
804 [(set (match_operand:SI 0 "general_operand" "=o,<,r")
805 (sign_extend:SI (match_operand:HI 1 "general_operand" "g,g,g")))]
811 /* we don't want to mess with auto increment */
813 switch(which_alternative)
817 latehalf[0] = operands[0];
818 operands[0] = adj_offsettable_operand(operands[0], 2);
820 output_asm_insn(\"mov %1, %0\", operands);
821 output_asm_insn(\"sxt %0\", latehalf);
827 /* - auto-decrement - right direction ;-) */
828 output_asm_insn(\"mov %1, %0\", operands);
829 output_asm_insn(\"sxt %0\", operands);
835 /* make register pair available */
836 latehalf[0] = operands[0];
837 operands[0] = gen_rtx(REG, HImode, REGNO (operands[0])+1);
839 output_asm_insn(\"mov %1, %0\", operands);
840 output_asm_insn(\"sxt %0\", latehalf);
849 [(set_attr "length" "5,3,3")])
853 [(set (match_operand:SI 0 "register_operand" "=r")
854 (sign_extend:SI (match_operand:HI 1 "general_operand" "0")))]
862 lateoperands[0] = operands[0];
863 operands[0] = gen_rtx(REG, HImode, REGNO (operands[0])+1);
865 output_asm_insn(\"tst %0\", operands);
866 sprintf(buf, \"bge extendhisi%d\", count);
867 output_asm_insn(buf, NULL);
868 output_asm_insn(\"mov -1, %0\", lateoperands);
869 sprintf(buf, \"bne extendhisi%d\", count+1);
870 output_asm_insn(buf, NULL);
871 sprintf(buf, \"\\nextendhisi%d:\", count);
872 output_asm_insn(buf, NULL);
873 output_asm_insn(\"clr %0\", lateoperands);
874 sprintf(buf, \"\\nextendhisi%d:\", count+1);
875 output_asm_insn(buf, NULL);
881 [(set_attr "length" "6")])
883 ;; make float to int and vice versa
884 ;; using the cc_status.flag field we could probably cut down
886 ;; assume that we are normally in double and integer mode -
887 ;; what do pdp library routines do to fpu mode ?
889 (define_insn "floatsidf2"
890 [(set (match_operand:DF 0 "register_operand" "=a,a")
891 (float:DF (match_operand:SI 1 "memory_operand" "R,Q")))]
893 "setl\;ldcld %1, %0\;seti"
894 [(set_attr "length" "3,4")])
896 (define_insn "floathidf2"
897 [(set (match_operand:DF 0 "register_operand" "=a,a")
898 (float:DF (match_operand:HI 1 "general_operand" "rR,Qi")))]
901 [(set_attr "length" "1,2")])
904 (define_insn "fix_truncdfsi2"
905 [(set (match_operand:SI 0 "memory_operand" "=R,Q")
906 (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "a,a"))))]
908 "setl\;stcdl %1, %0\;seti"
909 [(set_attr "length" "3,4")])
911 (define_insn "fix_truncdfhi2"
912 [(set (match_operand:HI 0 "general_operand" "=rR,Q")
913 (fix:HI (fix:DF (match_operand:DF 1 "register_operand" "a,a"))))]
916 [(set_attr "length" "1,2")])
919 ;;- arithmetic instructions
922 (define_insn "adddf3"
923 [(set (match_operand:DF 0 "register_operand" "=a,a,a")
924 (plus:DF (match_operand:DF 1 "register_operand" "%0,0,0")
925 (match_operand:DF 2 "general_operand" "fR,Q,F")))]
928 [(set_attr "length" "1,2,5")])
930 (define_insn "addsi3"
931 [(set (match_operand:SI 0 "general_operand" "=r,r,o,o,r,r,r,o,o,o")
932 (plus:SI (match_operand:SI 1 "general_operand" "%0,0,0,0,0,0,0,0,0,0")
933 (match_operand:SI 2 "general_operand" "r,o,r,o,I,J,K,I,J,K")))]
936 { /* Here we trust that operands don't overlap
938 or is lateoperands the low word?? - looks like it! */
943 lateoperands[0] = operands[0];
945 if (REG_P (operands[0]))
946 operands[0] = gen_rtx(REG, HImode, REGNO(operands[0]) + 1);
948 operands[0] = adj_offsettable_operand (operands[0], 2);
950 if (! CONSTANT_P(operands[2]))
952 lateoperands[2] = operands[2];
954 if (REG_P (operands[2]))
955 operands[2] = gen_rtx(REG, HImode, REGNO(operands[2]) + 1);
957 operands[2] = adj_offsettable_operand(operands[2], 2);
959 output_asm_insn (\"add %2, %0\", operands);
960 output_asm_insn (\"adc %0\", lateoperands);
961 output_asm_insn (\"add %2, %0\", lateoperands);
965 lateoperands[2] = gen_rtx(CONST_INT, VOIDmode, (INTVAL(operands[2]) >> 16) & 0xffff);
966 operands[2] = gen_rtx(CONST_INT, VOIDmode, INTVAL(operands[2]) & 0xffff);
968 if (INTVAL(operands[2]))
970 output_asm_insn (\"add %2, %0\", operands);
971 output_asm_insn (\"adc %0\", lateoperands);
974 if (INTVAL(lateoperands[2]))
975 output_asm_insn (\"add %2, %0\", lateoperands);
979 [(set_attr "length" "3,5,6,8,3,1,5,5,3,8")])
981 (define_insn "addhi3"
982 [(set (match_operand:HI 0 "general_operand" "=rR,rR,Q,Q")
983 (plus:HI (match_operand:HI 1 "general_operand" "%0,0,0,0")
984 (match_operand:HI 2 "general_operand" "rRLM,Qi,rRLM,Qi")))]
988 if (GET_CODE (operands[2]) == CONST_INT)
989 if (INTVAL(operands[2]) == 1)
991 else if (INTVAL(operands[2]) == -1)
994 return \"add %2, %0\";
996 [(set_attr "length" "1,2,2,3")])
998 (define_insn "addqi3"
999 [(set (match_operand:QI 0 "general_operand" "=rR,rR,Q,Q")
1000 (plus:QI (match_operand:QI 1 "general_operand" "%0,0,0,0")
1001 (match_operand:QI 2 "general_operand" "rRLM,Qi,rRLM,Qi")))]
1005 if (GET_CODE (operands[2]) == CONST_INT)
1006 if (INTVAL(operands[2]) == 1)
1008 else if (INTVAL(operands[2]) == -1)
1011 return \"addb %2, %0\";
1013 [(set_attr "length" "1,2,2,3")])
1016 ;;- subtract instructions
1017 ;; we don't have to care for constant second
1018 ;; args, since they are canonical plus:xx now!
1019 ;; also for minus:DF ??
1021 (define_insn "subdf3"
1022 [(set (match_operand:DF 0 "register_operand" "=a,a")
1023 (minus:DF (match_operand:DF 1 "register_operand" "0,0")
1024 (match_operand:DF 2 "general_operand" "fR,Q")))]
1027 [(set_attr "length" "1,2")])
1029 (define_insn "subsi3"
1030 [(set (match_operand:SI 0 "general_operand" "=r,r,o,o")
1031 (minus:SI (match_operand:SI 1 "general_operand" "0,0,0,0")
1032 (match_operand:SI 2 "general_operand" "r,o,r,o")))]
1035 { /* Here we trust that operands don't overlap
1037 or is lateoperands the low word?? - looks like it! */
1040 rtx lateoperands[3];
1042 lateoperands[0] = operands[0];
1044 if (REG_P (operands[0]))
1045 operands[0] = gen_rtx(REG, HImode, REGNO(operands[0]) + 1);
1047 operands[0] = adj_offsettable_operand (operands[0], 2);
1049 lateoperands[2] = operands[2];
1051 if (REG_P (operands[2]))
1052 operands[2] = gen_rtx(REG, HImode, REGNO(operands[2]) + 1);
1054 operands[2] = adj_offsettable_operand(operands[2], 2);
1056 output_asm_insn (\"sub %2, %0\", operands);
1057 output_asm_insn (\"sbc %0\", lateoperands);
1058 output_asm_insn (\"sub %2, %0\", lateoperands);
1061 ;; offsettable memory addresses always are expensive!!!
1062 [(set_attr "length" "3,5,6,8")])
1064 (define_insn "subhi3"
1065 [(set (match_operand:HI 0 "general_operand" "=rR,rR,Q,Q")
1066 (minus:HI (match_operand:HI 1 "general_operand" "0,0,0,0")
1067 (match_operand:HI 2 "general_operand" "rR,Qi,rR,Qi")))]
1071 if (GET_CODE (operands[2]) == CONST_INT)
1074 return \"sub %2, %0\";
1076 [(set_attr "length" "1,2,2,3")])
1078 (define_insn "subqi3"
1079 [(set (match_operand:QI 0 "general_operand" "=rR,rR,Q,Q")
1080 (minus:QI (match_operand:QI 1 "general_operand" "0,0,0,0")
1081 (match_operand:QI 2 "general_operand" "rR,Qi,rR,Qi")))]
1085 if (GET_CODE (operands[2]) == CONST_INT)
1088 return \"subb %2, %0\";
1090 [(set_attr "length" "1,2,2,3")])
1092 ;;;;- and instructions
1093 ;; Bit-and on the pdp (like on the vax) is done with a clear-bits insn.
1094 (define_expand "andsi3"
1095 [(set (match_operand:SI 0 "general_operand" "=g")
1096 (and:SI (match_operand:SI 1 "general_operand" "0")
1097 (not:SI (match_operand:SI 2 "general_operand" "g"))))]
1101 extern rtx expand_unop ();
1102 if (GET_CODE (operands[2]) == CONST_INT)
1103 operands[2] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
1105 operands[2] = expand_unop (SImode, one_cmpl_optab, operands[2], 0, 1);
1108 (define_expand "andhi3"
1109 [(set (match_operand:HI 0 "general_operand" "=g")
1110 (and:HI (match_operand:HI 1 "general_operand" "0")
1111 (not:HI (match_operand:HI 2 "general_operand" "g"))))]
1115 extern rtx expand_unop ();
1116 if (GET_CODE (operands[2]) == CONST_INT)
1117 operands[2] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
1119 operands[2] = expand_unop (HImode, one_cmpl_optab, operands[2], 0, 1);
1122 (define_expand "andqi3"
1123 [(set (match_operand:QI 0 "general_operand" "=g")
1124 (and:QI (match_operand:QI 1 "general_operand" "0")
1125 (not:QI (match_operand:QI 2 "general_operand" "g"))))]
1129 extern rtx expand_unop ();
1130 rtx op = operands[2];
1131 if (GET_CODE (op) == CONST_INT)
1132 operands[2] = gen_rtx (CONST_INT, VOIDmode,
1133 ((1 << 8) - 1) & ~INTVAL (op));
1135 operands[2] = expand_unop (QImode, one_cmpl_optab, op, 0, 1);
1138 (define_insn "andcbsi3"
1139 [(set (match_operand:SI 0 "general_operand" "=r,r,o,o,r,r,r,o,o,o")
1140 (and:SI (match_operand:SI 1 "general_operand" "%0,0,0,0,0,0,0,0,0,0")
1141 (not:SI (match_operand:SI 2 "general_operand" "r,o,r,o,I,J,K,I,J,K"))))]
1144 { /* Here we trust that operands don't overlap
1146 or is lateoperands the low word?? - looks like it! */
1149 rtx lateoperands[3];
1151 lateoperands[0] = operands[0];
1153 if (REG_P (operands[0]))
1154 operands[0] = gen_rtx(REG, HImode, REGNO(operands[0]) + 1);
1156 operands[0] = adj_offsettable_operand (operands[0], 2);
1158 if (! CONSTANT_P(operands[2]))
1160 lateoperands[2] = operands[2];
1162 if (REG_P (operands[2]))
1163 operands[2] = gen_rtx(REG, HImode, REGNO(operands[2]) + 1);
1165 operands[2] = adj_offsettable_operand(operands[2], 2);
1167 output_asm_insn (\"bic %2, %0\", operands);
1168 output_asm_insn (\"bic %2, %0\", lateoperands);
1172 lateoperands[2] = gen_rtx(CONST_INT, VOIDmode, (INTVAL(operands[2]) >> 16) & 0xffff);
1173 operands[2] = gen_rtx(CONST_INT, VOIDmode, INTVAL(operands[2]) & 0xffff);
1175 /* these have different lengths, so we should have
1176 different constraints! */
1177 if (INTVAL(operands[2]))
1178 output_asm_insn (\"bic %2, %0\", operands);
1180 if (INTVAL(lateoperands[2]))
1181 output_asm_insn (\"bic %2, %0\", lateoperands);
1185 [(set_attr "length" "2,4,4,6,2,2,4,3,3,6")])
1187 (define_insn "andcbhi3"
1188 [(set (match_operand:HI 0 "general_operand" "=rR,rR,Q,Q")
1189 (and:HI (match_operand:HI 1 "general_operand" "0,0,0,0")
1190 (not:HI (match_operand:HI 2 "general_operand" "rR,Qi,rR,Qi"))))]
1193 [(set_attr "length" "1,2,2,3")])
1195 (define_insn "andcbqi3"
1196 [(set (match_operand:QI 0 "general_operand" "=rR,rR,Q,Q")
1197 (and:QI (match_operand:QI 1 "general_operand" "0,0,0,0")
1198 (not:QI (match_operand:QI 2 "general_operand" "rR,Qi,rR,Qi"))))]
1201 [(set_attr "length" "1,2,2,3")])
1203 ;;- Bit set (inclusive or) instructions
1204 (define_insn "iorsi3"
1205 [(set (match_operand:SI 0 "general_operand" "=r,r,o,o,r,r,r,o,o,o")
1206 (ior:SI (match_operand:SI 1 "general_operand" "%0,0,0,0,0,0,0,0,0,0")
1207 (match_operand:SI 2 "general_operand" "r,o,r,o,I,J,K,I,J,K")))]
1210 { /* Here we trust that operands don't overlap
1212 or is lateoperands the low word?? - looks like it! */
1215 rtx lateoperands[3];
1217 lateoperands[0] = operands[0];
1219 if (REG_P (operands[0]))
1220 operands[0] = gen_rtx(REG, HImode, REGNO(operands[0]) + 1);
1222 operands[0] = adj_offsettable_operand (operands[0], 2);
1224 if (! CONSTANT_P(operands[2]))
1226 lateoperands[2] = operands[2];
1228 if (REG_P (operands[2]))
1229 operands[2] = gen_rtx(REG, HImode, REGNO(operands[2]) + 1);
1231 operands[2] = adj_offsettable_operand(operands[2], 2);
1233 output_asm_insn (\"bis %2, %0\", operands);
1234 output_asm_insn (\"bis %2, %0\", lateoperands);
1238 lateoperands[2] = gen_rtx(CONST_INT, VOIDmode, (INTVAL(operands[2]) >> 16) & 0xffff);
1239 operands[2] = gen_rtx(CONST_INT, VOIDmode, INTVAL(operands[2]) & 0xffff);
1241 /* these have different lengths, so we should have
1242 different constraints! */
1243 if (INTVAL(operands[2]))
1244 output_asm_insn (\"bis %2, %0\", operands);
1246 if (INTVAL(lateoperands[2]))
1247 output_asm_insn (\"bis %2, %0\", lateoperands);
1251 [(set_attr "length" "2,4,4,6,2,2,4,3,3,6")])
1253 (define_insn "iorhi3"
1254 [(set (match_operand:HI 0 "general_operand" "=rR,rR,Q,Q")
1255 (ior:HI (match_operand:HI 1 "general_operand" "%0,0,0,0")
1256 (match_operand:HI 2 "general_operand" "rR,Qi,rR,Qi")))]
1259 [(set_attr "length" "1,2,2,3")])
1261 (define_insn "iorqi3"
1262 [(set (match_operand:QI 0 "general_operand" "=rR,rR,Q,Q")
1263 (ior:QI (match_operand:QI 1 "general_operand" "%0,0,0,0")
1264 (match_operand:QI 2 "general_operand" "rR,Qi,rR,Qi")))]
1268 ;;- xor instructions
1269 (define_insn "xorsi3"
1270 [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
1271 (xor:SI (match_operand:SI 1 "register_operand" "%0,0,0,0")
1272 (match_operand:SI 2 "arith_operand" "r,I,J,K")))]
1275 { /* Here we trust that operands don't overlap */
1278 rtx lateoperands[3];
1280 lateoperands[0] = operands[0];
1281 operands[0] = gen_rtx(REG, HImode, REGNO(operands[0]) + 1);
1283 if (REG_P(operands[2]))
1285 lateoperands[2] = operands[2];
1286 operands[2] = gen_rtx(REG, HImode, REGNO(operands[2]) + 1);
1288 output_asm_insn (\"xor %2, %0\", operands);
1289 output_asm_insn (\"xor %2, %0\", lateoperands);
1294 lateoperands[2] = gen_rtx(CONST_INT, VOIDmode, (INTVAL(operands[2]) >> 16) & 0xffff);
1295 operands[2] = gen_rtx(CONST_INT, VOIDmode, INTVAL(operands[2]) & 0xffff);
1297 if (INTVAL(operands[2]))
1298 output_asm_insn (\"xor %2, %0\", operands);
1300 if (INTVAL(lateoperands[2]))
1301 output_asm_insn (\"xor %2, %0\", lateoperands);
1305 [(set_attr "length" "2,1,1,2")])
1307 (define_insn "xorhi3"
1308 [(set (match_operand:HI 0 "general_operand" "=rR,Q")
1309 (xor:HI (match_operand:HI 1 "general_operand" "%0,0")
1310 (match_operand:HI 2 "register_operand" "r,r")))]
1313 [(set_attr "length" "1,2")])
1315 ;;- one complement instructions
1317 (define_insn "one_cmplhi2"
1318 [(set (match_operand:HI 0 "general_operand" "=rR,Q")
1319 (not:HI (match_operand:HI 1 "general_operand" "0,0")))]
1322 [(set_attr "length" "1,2")])
1324 (define_insn "one_cmplqi2"
1325 [(set (match_operand:QI 0 "general_operand" "=rR,Q")
1326 (not:QI (match_operand:QI 1 "general_operand" "0,0")))]
1329 [(set_attr "length" "1,2")])
1331 ;;- arithmetic shift instructions
1332 (define_insn "ashlsi3"
1333 [(set (match_operand:SI 0 "register_operand" "=r,r")
1334 (ashift:SI (match_operand:SI 1 "register_operand" "0,0")
1335 (match_operand:HI 2 "general_operand" "rR,Qi")))]
1338 [(set_attr "length" "1,2")])
1340 ;; Arithmetic right shift on the pdp works by negating the shift count.
1341 (define_expand "ashrsi3"
1342 [(set (match_operand:SI 0 "register_operand" "=r")
1343 (ashift:SI (match_operand:SI 1 "register_operand" "0")
1344 (match_operand:HI 2 "general_operand" "g")))]
1348 operands[2] = negate_rtx (HImode, operands[2]);
1351 ;; define asl aslb asr asrb - ashc missing!
1355 [(set (match_operand:HI 0 "general_operand" "=rR,Q")
1356 (ashift:HI (match_operand:HI 1 "general_operand" "0,0")
1360 [(set_attr "length" "1,2")])
1362 ;; and another possibility for asr is << -1
1363 ;; might cause problems since -1 can also be encoded as 65535!
1368 [(set (match_operand:HI 0 "general_operand" "=rR,Q")
1369 (ashift:HI (match_operand:HI 1 "general_operand" "0,0")
1373 [(set_attr "length" "1,2")])
1375 ;; shift is by arbitrary count is expensive,
1376 ;; shift by one cheap - so let's do that, if
1377 ;; space doesn't matter
1379 [(set (match_operand:HI 0 "general_operand" "=r")
1380 (ashift:HI (match_operand:HI 1 "general_operand" "0")
1381 (match_operand:HI 2 "expand_shift_operand" "O")))]
1387 for (i = 1; i <= abs(INTVAL(operands[2])); i++)
1388 if (INTVAL(operands[2]) < 0)
1389 output_asm_insn(\"asr %0\", operands);
1391 output_asm_insn(\"asl %0\", operands);
1396 [(set (attr "length") (const_int 4))])
1400 [(set (match_operand:QI 0 "general_operand" "=r,o")
1401 (ashift:QI (match_operand:QI 1 "general_operand" "0,0")
1402 (match_operand:HI 2 "const_immediate_operand" "n,n")))]
1405 { /* allowing predec or post_inc is possible, but hairy! */
1408 cnt = INTVAL(operands[2]) & 0x0007;
1410 for (i=0 ; i < cnt ; i++)
1411 output_asm_insn(\"aslb %0\", operands);
1415 ;; set attribute length ( match_dup 2 & 7 ) *(1 or 2) !!!
1416 [(set_attr_alternative "length"
1422 ; [(set (match_operand:HI 0 "general_operand" "=rR,Q")
1423 ; (ashiftrt:HI (match_operand:HI 1 "general_operand" "0,0")
1427 ; [(set_attr "length" "1,2")])
1431 [(set (match_operand:QI 0 "general_operand" "=r,o")
1432 (ashiftrt:QI (match_operand:QI 1 "general_operand" "0,0")
1433 (match_operand:HI 2 "const_immediate_operand" "n,n")))]
1436 { /* allowing predec or post_inc is possible, but hairy! */
1439 cnt = INTVAL(operands[2]) & 0x0007;
1441 for (i=0 ; i < cnt ; i++)
1442 output_asm_insn(\"asrb %0\", operands);
1446 [(set_attr_alternative "length"
1450 ;; the following is invalid - too complex!!! - just say 14 !!!
1451 ; [(set (attr "length") (plus (and (match_dup 2)
1453 ; (and (match_dup 2)
1454 ; (const_int 7))))])
1458 ;; can we get +-1 in the next pattern? should
1459 ;; have been caught by previous patterns!
1461 (define_insn "ashlhi3"
1462 [(set (match_operand:HI 0 "register_operand" "=r,r")
1463 (ashift:HI (match_operand:HI 1 "register_operand" "0,0")
1464 (match_operand:HI 2 "general_operand" "rR,Qi")))]
1468 if (GET_CODE(operands[2]) == CONST_INT)
1469 if (INTVAL(operands[2]) == 1)
1471 else if (INTVAL(operands[2]) == -1)
1474 return \"ash %2,%0\";
1476 [(set_attr "length" "1,2")])
1478 ;; Arithmetic right shift on the pdp works by negating the shift count.
1479 (define_expand "ashrhi3"
1480 [(set (match_operand:HI 0 "register_operand" "=r")
1481 (ashift:HI (match_operand:HI 1 "register_operand" "0")
1482 (match_operand:HI 2 "general_operand" "g")))]
1486 operands[2] = negate_rtx (HImode, operands[2]);
1489 ;;;;- logical shift instructions
1490 ;;(define_insn "lshrsi3"
1491 ;; [(set (match_operand:HI 0 "register_operand" "=r")
1492 ;; (lshiftrt:HI (match_operand:HI 1 "register_operand" "0")
1493 ;; (match_operand:HI 2 "arith_operand" "rI")))]
1499 (define_insn "absdf2"
1500 [(set (match_operand:DF 0 "general_operand" "=fR,Q")
1501 (abs:DF (match_operand:DF 1 "general_operand" "0,0")))]
1504 [(set_attr "length" "1,2")])
1506 (define_insn "abshi2"
1507 [(set (match_operand:HI 0 "general_operand" "=r,o")
1508 (abs:HI (match_operand:HI 1 "general_operand" "0,0")))]
1509 "TARGET_ABSHI_BUILTIN"
1515 output_asm_insn(\"tst %0\", operands);
1516 sprintf(buf, \"bge abshi%d\", count);
1517 output_asm_insn(buf, NULL);
1518 output_asm_insn(\"neg %0\", operands);
1519 sprintf(buf, \"\\nabshi%d:\", count++);
1520 output_asm_insn(buf, NULL);
1524 [(set_attr "length" "3,5")])
1527 ;; define expand abshi - is much better !!! - but
1528 ;; will it be optimized into an abshi2 ?
1529 ;; it will leave better code, because the tsthi might be
1531 ; -- just a thought - don't have time to check
1533 ;(define_expand "abshi2"
1534 ; [(match_operand:HI 0 "general_operand" "")
1535 ; (match_operand:HI 1 "general_operand" "")]
1539 ; rtx label = gen_label_rtx ();
1541 ; /* do I need this? */
1542 ; do_pending_stack_adjust ();
1544 ; emit_move_insn (operands[0], operands[1]);
1546 ; emit_insn (gen_tsthi (operands[0]));
1547 ; emit_insn (gen_bge (label1));
1549 ; emit_insn (gen_neghi(operands[0], operands[0])
1553 ; emit_label (label);
1555 ; /* allow REG_NOTES to be set on last insn (labels don't have enough
1556 ; fields, and can't be used for REG_NOTES anyway). */
1557 ; emit_insn (gen_rtx (USE, VOIDmode, stack_pointer_rtx));
1563 (define_insn "negdf2"
1564 [(set (match_operand:DF 0 "general_operand" "=fR,Q")
1565 (neg:DF (match_operand:DF 1 "register_operand" "0,0")))]
1568 [(set_attr "length" "1,2")])
1570 (define_insn "neghi2"
1571 [(set (match_operand:HI 0 "general_operand" "=rR,Q")
1572 (neg:HI (match_operand:HI 1 "general_operand" "0,0")))]
1575 [(set_attr "length" "1,2")])
1577 (define_insn "negqi2"
1578 [(set (match_operand:QI 0 "general_operand" "=rR,Q")
1579 (neg:QI (match_operand:QI 1 "general_operand" "0,0")))]
1582 [(set_attr "length" "1,2")])
1585 ;; Unconditional and other jump instructions
1588 (label_ref (match_operand 0 "" "")))]
1591 [(set_attr "length" "2")])
1595 (label_ref (match_operand 0 "" "")))
1596 (clobber (const_int 1))]
1599 [(set_attr "length" "2")])
1601 (define_insn "tablejump"
1602 [(set (pc) (match_operand:HI 0 "general_operand" "rR,Q"))
1603 (use (label_ref (match_operand 1 "" "")))]
1606 [(set_attr "length" "1,2")])
1608 ;; indirect jump - let's be conservative!
1609 ;; allow only register_operand, even though we could also
1610 ;; allow labels etc.
1612 (define_insn "indirect_jump"
1613 [(set (pc) (match_operand:HI 0 "register_operand" "r"))]
1617 ;;- jump to subroutine
1620 [(call (match_operand:HI 0 "general_operand" "R,Q")
1621 (match_operand:HI 1 "general_operand" "g,g"))
1622 ;; (use (reg:HI 0)) what was that ???
1624 ;;- Don't use operand 1 for most machines.
1627 [(set_attr "length" "1,2")])
1629 ;;- jump to subroutine
1630 (define_insn "call_value"
1631 [(set (match_operand 0 "" "")
1632 (call (match_operand:HI 1 "general_operand" "R,Q")
1633 (match_operand:HI 2 "general_operand" "g,g")))
1634 ;; (use (reg:HI 0)) - what was that ????
1636 ;;- Don't use operand 2 for most machines.
1639 [(set_attr "length" "1,2")])
1650 (define_insn "muldf3"
1651 [(set (match_operand:DF 0 "register_operand" "=a,a,a")
1652 (mult:DF (match_operand:DF 1 "register_operand" "%0,0,0")
1653 (match_operand:DF 2 "general_operand" "fR,Q,F")))]
1656 [(set_attr "length" "1,2,5")])
1658 ;; 16 bit result multiply:
1659 ;; currently we multiply only into odd registers, so we don't use two
1660 ;; registers - but this is a bit inefficient at times. If we define
1661 ;; a register class for each register, then we can specify properly
1662 ;; which register need which scratch register ....
1664 (define_insn "mulhi3"
1665 [(set (match_operand:HI 0 "register_operand" "=d,d") ; multiply regs
1666 (mult:HI (match_operand:HI 1 "register_operand" "%0,0")
1667 (match_operand:HI 2 "general_operand" "rR,Qi")))]
1670 [(set_attr "length" "1,2")])
1673 (define_expand "mulhisi3"
1675 (match_operand:HI 1 "general_operand" "g,g"))
1676 (set (match_operand:SI 0 "register_operand" "=r,r") ; even numbered!
1677 (mult:SI (truncate:HI
1679 (match_operand:HI 2 "general_operand" "rR,Qi")))]
1681 "operands[3] = gen_lowpart(HImode, operands[1]);")
1684 [(set (match_operand:SI 0 "register_operand" "=r,r") ; even numbered!
1685 (mult:SI (truncate:HI
1686 (match_operand:SI 1 "register_operand" "%0,0"))
1687 (match_operand:HI 2 "general_operand" "rR,Qi")))]
1690 [(set_attr "length" "1,2")])
1692 ;(define_insn "mulhisi3"
1693 ; [(set (match_operand:SI 0 "register_operand" "=r,r") ; even numbered!
1694 ; (mult:SI (truncate:HI
1695 ; (match_operand:SI 1 "register_operand" "%0,0"))
1696 ; (match_operand:HI 2 "general_operand" "rR,Qi")))]
1699 ; [(set_attr "length" "1,2")])
1702 (define_insn "divdf3"
1703 [(set (match_operand:DF 0 "register_operand" "=a,a,a")
1704 (div:DF (match_operand:DF 1 "register_operand" "0,0,0")
1705 (match_operand:DF 2 "general_operand" "fR,Q,F")))]
1708 [(set_attr "length" "1,2,5")])
1711 (define_expand "divhi3"
1712 [(set (subreg:HI (match_dup 1) 0)
1713 (div:HI (match_operand:SI 1 "general_operand" "0")
1714 (match_operand:HI 2 "general_operand" "g")))
1715 (set (match_operand:HI 0 "general_operand" "=r")
1716 (subreg:HI (match_dup 1) 0))]
1721 [(set (subreg:HI (match_operand:SI 0 "general_operand" "=r") 0)
1722 (div:HI (match_operand:SI 1 "general_operand" "0")
1723 (match_operand:HI 2 "general_operand" "g")))]
1726 [(set_attr "length" "2")])
1728 (define_expand "modhi3"
1729 [(set (subreg:HI (match_dup 1) 1)
1730 (mod:HI (match_operand:SI 1 "general_operand" "0")
1731 (match_operand:HI 2 "general_operand" "g")))
1732 (set (match_operand:HI 0 "general_operand" "=r")
1733 (subreg:HI (match_dup 1) 1))]
1738 [(set (subreg:HI (match_operand:SI 0 "general_operand" "=r") 1)
1739 (mod:HI (match_operand:SI 1 "general_operand" "0")
1740 (match_operand:HI 2 "general_operand" "g")))]
1743 [(set_attr "length" "2")])
1745 ;(define_expand "divmodhi4"
1746 ; [(parallel [(set (subreg:HI (match_dup 1) 0)
1747 ; (div:HI (match_operand:SI 1 "general_operand" "0")
1748 ; (match_operand:HI 2 "general_operand" "g")))
1749 ; (set (subreg:HI (match_dup 1) 1)
1750 ; (mod:HI (match_dup 1)
1752 ; (set (match_operand:HI 3 "general_operand" "=r")
1753 ; (subreg:HI (match_dup 1) 1))
1754 ; (set (match_operand:HI 0 "general_operand" "=r")
1755 ; (subreg:HI (match_dup 1) 0))]
1760 ; [(set (subreg:HI (match_operand:SI 0 "general_operand" "=r") 0)
1761 ; (div:HI (match_operand:SI 1 "general_operand" "0")
1762 ; (match_operand:HI 2 "general_operand" "g")))
1763 ; (set (subreg:HI (match_dup 0) 1)
1764 ; (mod:HI (match_dup 1)
1770 ;; is rotate doing the right thing to be included here ????