📄 ia64.md
字号:
(use (match_operand:SI 2 "const_int_operand" ""))] "INTEL_EXTENDED_IEEE_FORMAT" "fcvt.fxu.trunc.s%2 %0 = %1" [(set_attr "itanium_class" "fcvtfx")]);; ::::::::::::::::::::;; ::;; :: Bit field extraction;; ::;; ::::::::::::::::::::(define_insn "extv" [(set (match_operand:DI 0 "gr_register_operand" "=r") (sign_extract:DI (match_operand:DI 1 "gr_register_operand" "r") (match_operand:DI 2 "const_int_operand" "n") (match_operand:DI 3 "const_int_operand" "n")))] "" "extr %0 = %1, %3, %2" [(set_attr "itanium_class" "ishf")])(define_insn "extzv" [(set (match_operand:DI 0 "gr_register_operand" "=r") (zero_extract:DI (match_operand:DI 1 "gr_register_operand" "r") (match_operand:DI 2 "const_int_operand" "n") (match_operand:DI 3 "const_int_operand" "n")))] "" "extr.u %0 = %1, %3, %2" [(set_attr "itanium_class" "ishf")]);; Insert a bit field.;; Can have 3 operands, source1 (inserter), source2 (insertee), dest.;; Source1 can be 0 or -1.;; Source2 can be 0.;; ??? Actual dep instruction is more powerful than what these insv;; patterns support. Unfortunately, combine is unable to create patterns;; where source2 != dest.(define_expand "insv" [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "") (match_operand:DI 1 "const_int_operand" "") (match_operand:DI 2 "const_int_operand" "")) (match_operand:DI 3 "nonmemory_operand" ""))] ""{ int width = INTVAL (operands[1]); int shift = INTVAL (operands[2]); /* If operand[3] is a constant, and isn't 0 or -1, then load it into a pseudo. */ if (! register_operand (operands[3], DImode) && operands[3] != const0_rtx && operands[3] != constm1_rtx) operands[3] = force_reg (DImode, operands[3]); /* If this is a single dep instruction, we have nothing to do. */ if (! ((register_operand (operands[3], DImode) && width <= 16) || operands[3] == const0_rtx || operands[3] == constm1_rtx)) { /* Check for cases that can be implemented with a mix instruction. */ if (width == 32 && shift == 0) { /* Directly generating the mix4left instruction confuses optimize_bit_field in function.c. Since this is performing a useful optimization, we defer generation of the complicated mix4left RTL to the first splitting phase. */ rtx tmp = gen_reg_rtx (DImode); emit_insn (gen_shift_mix4left (operands[0], operands[3], tmp)); DONE; } else if (width == 32 && shift == 32) { emit_insn (gen_mix4right (operands[0], operands[3])); DONE; } /* We could handle remaining cases by emitting multiple dep instructions. If we need more than two dep instructions then we lose. A 6 insn sequence mov mask1,mov mask2,shl;;and,and;;or is better than mov;;dep,shr;;dep,shr;;dep. The former can be executed in 3 cycles, the latter is 6 cycles on an Itanium (TM) processor, because there is only one function unit that can execute dep and shr immed. If we only need two dep instruction, then we still lose. mov;;dep,shr;;dep is still 4 cycles. Even if we optimize away the unnecessary mov, this is still undesirable because it will be hard to optimize, and it creates unnecessary pressure on the I0 function unit. */ FAIL;#if 0 /* This code may be useful for other IA-64 processors, so we leave it in for now. */ while (width > 16) { rtx tmp; emit_insn (gen_insv (operands[0], GEN_INT (16), GEN_INT (shift), operands[3])); shift += 16; width -= 16; tmp = gen_reg_rtx (DImode); emit_insn (gen_lshrdi3 (tmp, operands[3], GEN_INT (16))); operands[3] = tmp; } operands[1] = GEN_INT (width); operands[2] = GEN_INT (shift);#endif }})(define_insn "*insv_internal" [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "+r") (match_operand:DI 1 "const_int_operand" "n") (match_operand:DI 2 "const_int_operand" "n")) (match_operand:DI 3 "nonmemory_operand" "rP"))] "(gr_register_operand (operands[3], DImode) && INTVAL (operands[1]) <= 16) || operands[3] == const0_rtx || operands[3] == constm1_rtx" "dep %0 = %3, %0, %2, %1" [(set_attr "itanium_class" "ishf")]);; Combine doesn't like to create bit-field insertions into zero.(define_insn "*depz_internal" [(set (match_operand:DI 0 "gr_register_operand" "=r") (and:DI (ashift:DI (match_operand:DI 1 "gr_register_operand" "r") (match_operand:DI 2 "const_int_operand" "n")) (match_operand:DI 3 "const_int_operand" "n")))] "CONST_OK_FOR_M (INTVAL (operands[2])) && ia64_depz_field_mask (operands[3], operands[2]) > 0"{ operands[3] = GEN_INT (ia64_depz_field_mask (operands[3], operands[2])); return "%,dep.z %0 = %1, %2, %3";} [(set_attr "itanium_class" "ishf")])(define_insn "shift_mix4left" [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "+r") (const_int 32) (const_int 0)) (match_operand:DI 1 "gr_register_operand" "r")) (clobber (match_operand:DI 2 "gr_register_operand" "=r"))] "" "#" [(set_attr "itanium_class" "unknown")])(define_split [(set (zero_extract:DI (match_operand:DI 0 "register_operand" "") (const_int 32) (const_int 0)) (match_operand:DI 1 "register_operand" "")) (clobber (match_operand:DI 2 "register_operand" ""))] "reload_completed" [(set (match_dup 3) (ashift:DI (match_dup 1) (const_int 32))) (set (zero_extract:DI (match_dup 0) (const_int 32) (const_int 0)) (lshiftrt:DI (match_dup 3) (const_int 32)))] "operands[3] = operands[2];")(define_split [(set (zero_extract:DI (match_operand:DI 0 "register_operand" "") (const_int 32) (const_int 0)) (match_operand:DI 1 "register_operand" "")) (clobber (match_operand:DI 2 "register_operand" ""))] "! reload_completed" [(set (match_dup 3) (ashift:DI (match_dup 1) (const_int 32))) (set (zero_extract:DI (match_dup 0) (const_int 32) (const_int 0)) (lshiftrt:DI (match_dup 3) (const_int 32)))] "operands[3] = operands[2];")(define_insn "*mix4left" [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "+r") (const_int 32) (const_int 0)) (lshiftrt:DI (match_operand:DI 1 "gr_register_operand" "r") (const_int 32)))] "" "mix4.l %0 = %0, %r1" [(set_attr "itanium_class" "mmshf")])(define_insn "mix4right" [(set (zero_extract:DI (match_operand:DI 0 "gr_register_operand" "+r") (const_int 32) (const_int 32)) (match_operand:DI 1 "gr_reg_or_0_operand" "rO"))] "" "mix4.r %0 = %r1, %0" [(set_attr "itanium_class" "mmshf")]);; This is used by the rotrsi3 pattern.(define_insn "*mix4right_3op" [(set (match_operand:DI 0 "gr_register_operand" "=r") (ior:DI (zero_extend:DI (match_operand:SI 1 "gr_register_operand" "r")) (ashift:DI (zero_extend:DI (match_operand:SI 2 "gr_register_operand" "r")) (const_int 32))))] "" "mix4.r %0 = %2, %1" [(set_attr "itanium_class" "mmshf")]);; ::::::::::::::::::::;; ::;; :: 1 bit Integer arithmetic;; ::;; ::::::::::::::::::::(define_insn_and_split "andbi3" [(set (match_operand:BI 0 "register_operand" "=c,c,r") (and:BI (match_operand:BI 1 "register_operand" "%0,0,r") (match_operand:BI 2 "register_operand" "c,r,r")))] "" "@ # tbit.nz.and.orcm %0, %I0 = %2, 0 and %0 = %2, %1" "reload_completed && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0])) && GET_CODE (operands[2]) == REG && PR_REGNO_P (REGNO (operands[2]))" [(cond_exec (eq (match_dup 2) (const_int 0)) (set (match_dup 0) (and:BI (ne:BI (const_int 0) (const_int 0)) (match_dup 0))))] "" [(set_attr "itanium_class" "unknown,tbit,ilog")])(define_insn_and_split "*andcmbi3" [(set (match_operand:BI 0 "register_operand" "=c,c,r") (and:BI (not:BI (match_operand:BI 1 "register_operand" "c,r,r")) (match_operand:BI 2 "register_operand" "0,0,r")))] "" "@ # tbit.z.and.orcm %0, %I0 = %1, 0 andcm %0 = %2, %1" "reload_completed && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0])) && GET_CODE (operands[1]) == REG && PR_REGNO_P (REGNO (operands[1]))" [(cond_exec (ne (match_dup 1) (const_int 0)) (set (match_dup 0) (and:BI (ne:BI (const_int 0) (const_int 0)) (match_dup 0))))] "" [(set_attr "itanium_class" "unknown,tbit,ilog")])(define_insn_and_split "iorbi3" [(set (match_operand:BI 0 "register_operand" "=c,c,r") (ior:BI (match_operand:BI 1 "register_operand" "%0,0,r") (match_operand:BI 2 "register_operand" "c,r,r")))] "" "@ # tbit.nz.or.andcm %0, %I0 = %2, 0 or %0 = %2, %1" "reload_completed && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0])) && GET_CODE (operands[2]) == REG && PR_REGNO_P (REGNO (operands[2]))" [(cond_exec (ne (match_dup 2) (const_int 0)) (set (match_dup 0) (ior:BI (eq:BI (const_int 0) (const_int 0)) (match_dup 0))))] "" [(set_attr "itanium_class" "unknown,tbit,ilog")])(define_insn_and_split "*iorcmbi3" [(set (match_operand:BI 0 "register_operand" "=c,c") (ior:BI (not:BI (match_operand:BI 1 "register_operand" "c,r")) (match_operand:BI 2 "register_operand" "0,0")))] "" "@ # tbit.z.or.andcm %0, %I0 = %1, 0" "reload_completed && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0])) && GET_CODE (operands[1]) == REG && PR_REGNO_P (REGNO (operands[1]))" [(cond_exec (eq (match_dup 1) (const_int 0)) (set (match_dup 0) (ior:BI (eq:BI (const_int 0) (const_int 0)) (match_dup 0))))] "" [(set_attr "itanium_class" "unknown,tbit")])(define_insn "one_cmplbi2" [(set (match_operand:BI 0 "register_operand" "=c,r,c,&c") (not:BI (match_operand:BI 1 "register_operand" "r,r,0,c"))) (clobber (match_scratch:BI 2 "=X,X,c,X"))] "" "@ tbit.z %0, %I0 = %1, 0 xor %0 = 1, %1 # #" [(set_attr "itanium_class" "tbit,ilog,unknown,unknown")])(define_split [(set (match_operand:BI 0 "register_operand" "") (not:BI (match_operand:BI 1 "register_operand" ""))) (clobber (match_scratch:BI 2 ""))] "reload_completed && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0])) && rtx_equal_p (operands[0], operands[1])" [(set (match_dup 4) (match_dup 3)) (set (match_dup 0) (const_int 1)) (cond_exec (ne (match_dup 2) (const_int 0)) (set (match_dup 0) (const_int 0))) (set (match_dup 0) (unspec:BI [(match_dup 0)] UNSPEC_PRED_REL_MUTEX))] "operands[3] = gen_rtx_REG (CCImode, REGNO (operands[1])); operands[4] = gen_rtx_REG (CCImode, REGNO (operands[2]));")(define_split [(set (match_operand:BI 0 "register_operand" "") (not:BI (match_operand:BI 1 "register_operand" ""))) (clobber (match_scratch:BI 2 ""))] "reload_completed && GET_CODE (operands[0]) == REG && PR_REGNO_P (REGNO (operands[0])) && GET_CODE (operands[1]) == REG && PR_REGNO_P (REGNO (operands[1])) && ! rtx_equal_p (operands[0], operands[1])" [(cond_exec (ne (match_dup 1) (const_int 0)) (set (match_dup 0) (const_int 0))) (cond_exec (eq (match_dup 1) (const_int 0)) (set (match_dup 0) (const_int 1))) (set (match_dup 0) (unspec:BI [(match_dup 0)] UNSPEC_PRED_REL_MUTEX))] "")(define_insn "*cmpsi_and_0" [(set (match_operand:BI 0 "register_operand" "=c") (and:BI (match_operator:BI 4 "predicate_operator" [(match_operand:SI 2 "gr_reg_or_0_operand" "rO") (match_operand:SI 3 "gr_reg_or_8bit_operand" "rK")]) (match_operand:BI 1 "register_operand" "0")))] "" "cmp4.%C4.and.orcm %0, %I0 = %3, %r2" [(set_attr "itanium_class" "icmp")])(define_insn "*cmpsi_and_1" [(set (match_operand:BI 0 "register_operand" "=c") (and:BI (match_operator:BI 3 "signed_inequality_operator" [(match_operand:SI 2 "gr_register_operand" "r") (const_int 0)]) (match_operand:BI 1 "register_operand" "0")))] "" "cmp4.%C3.and.orcm %0, %I0 = r0, %2" [(set_attr "itanium_class" "icmp")])(define_insn "*cmpsi_andnot_0" [(set (match_operand:BI 0 "register_operand" "=c") (and:BI (not:BI (match_operator:BI 4 "predicate_operator" [(match_operand:SI 2 "gr_reg_or_0_operand" "rO") (match_operand:SI 3 "gr_reg_or_8bit_operand" "rK")])) (match_operand:BI 1 "register_operand" "0")))] "" "cmp4.%C4.or.andcm %I0, %0 = %3, %r2" [(set_attr "itanium_class" "icmp")])(define_insn "*cmpsi_andnot_1" [(set (match_operand:BI 0 "register_operand" "=c") (and:BI (not:BI (match_operator:BI 3 "signed_inequality_operator" [(match_operand:SI 2 "gr_register_operand" "r") (const_int 0)])) (match_operand:BI 1 "register_operand" "0")))] "" "cmp4.%C3.or.andcm %I0, %0 = r0, %2" [(set_attr "itanium_class" "icmp")])(define_insn "*cmpdi_and_0" [(set (match_operand:BI 0 "register_operand" "=c") (and:BI (match_operator:BI 4 "predicate_operator" [(match_operand:DI 2 "gr_register_operand" "r") (match_operand:DI 3 "gr_reg_or_8bit_operand" "rK")]) (match_operand:BI 1 "register_operand" "0")))] "" "cmp.%C4.and.orcm %0, %I0 = %3, %2" [(set_attr "itanium_class" "icmp")])(define_insn "*cmpdi_and_1" [(set (match_operand:BI 0 "register_operand" "=c") (and:BI (match_operator:BI 3 "signed_inequality_operator" [(match_operand:DI 2 "gr_register_operand" "r") (const_int 0)]) (match_operand:BI 1 "register_operand" "0")))] "" "cmp.%C3.and.orcm %0, %I0 = r0, %2" [(set_attr "itanium_class" "icmp")])(define_insn "*cmpdi_andnot_0" [(set (match_operand:BI 0 "register_operand" "=c") (and:BI (not:BI (match_operator:BI 4 "predicate_operator" [(match_operand:DI 2 "gr_register_operand" "r") (match_operand:DI 3 "gr_reg_or_8bit_operand" "rK")])) (match_operand:BI 1 "register_operand" "0")))] "" "cmp.%C4.or.andcm %I0, %0 = %3, %2" [(set_attr "itanium_class" "icmp")])(define_insn "*cmpdi_andnot_1" [(set (match_operand:BI 0 "register_operand" "=c")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -