📄 alpha.md
字号:
[(match_operand:DI 3 "reg_or_0_operand" "rJ,rJ,J,J") (match_operand:DI 4 "reg_or_0_operand" "J,J,rJ,rJ")]) (match_operand:SI 1 "reg_or_8bit_operand" "rI,0,rI,0") (match_operand:SI 5 "reg_or_8bit_operand" "0,rI,0,rI")))] "operands[3] == const0_rtx || operands[4] == const0_rtx" "@ cmov%C2 %r3,%1,%0 cmov%D2 %r3,%5,%0 cmov%c2 %r4,%1,%0 cmov%d2 %r4,%5,%0")(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,r,r,r") (if_then_else:DI (match_operator 2 "signed_comparison_operator" [(match_operand:DI 3 "reg_or_0_operand" "rJ,rJ,J,J") (match_operand:DI 4 "reg_or_0_operand" "J,J,rJ,rJ")]) (match_operand:DI 1 "reg_or_8bit_operand" "rI,0,rI,0") (match_operand:DI 5 "reg_or_8bit_operand" "0,rI,0,rI")))] "operands[3] == const0_rtx || operands[4] == const0_rtx" "@ cmov%C2 %r3,%1,%0 cmov%D2 %r3,%5,%0 cmov%c2 %r4,%1,%0 cmov%d2 %r4,%5,%0")(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,r") (if_then_else:DI (eq (zero_extract:DI (match_operand:DI 2 "reg_or_0_operand" "rJ,rJ") (const_int 1) (const_int 0)) (const_int 0)) (match_operand:DI 1 "reg_or_8bit_operand" "rI,0") (match_operand:DI 3 "reg_or_8bit_operand" "0,rI")))] "" "@ cmovlbc %r2,%1,%0 cmovlbs %r2,%3,%0")(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,r") (if_then_else:DI (ne (zero_extract:DI (match_operand:DI 2 "reg_or_0_operand" "rJ,rJ") (const_int 1) (const_int 0)) (const_int 0)) (match_operand:DI 1 "reg_or_8bit_operand" "rI,0") (match_operand:DI 3 "reg_or_8bit_operand" "0,rI")))] "" "@ cmovlbs %r2,%1,%0 cmovlbc %r2,%3,%0");; This form is added since combine thinks that an IF_THEN_ELSE with both;; arms constant is a single insn, so it won't try to form it if combine;; knows they are really two insns. This occurs in divides by powers;; of two.(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (if_then_else:DI (match_operator 2 "signed_comparison_operator" [(match_operand:DI 3 "reg_or_0_operand" "rJ") (const_int 0)]) (plus:DI (match_dup 0) (match_operand:DI 1 "reg_or_8bit_operand" "rI")) (match_dup 0))) (clobber (match_scratch:DI 4 "=&r"))] "" "addq %0,%1,%4\;cmov%C2 %r3,%4,%0")(define_split [(set (match_operand:DI 0 "register_operand" "") (if_then_else:DI (match_operator 2 "signed_comparison_operator" [(match_operand:DI 3 "reg_or_0_operand" "") (const_int 0)]) (plus:DI (match_dup 0) (match_operand:DI 1 "reg_or_8bit_operand" "")) (match_dup 0))) (clobber (match_operand:DI 4 "register_operand" ""))] "" [(set (match_dup 4) (plus:DI (match_dup 0) (match_dup 1))) (set (match_dup 0) (if_then_else:DI (match_op_dup 2 [(match_dup 3) (const_int 0)]) (match_dup 4) (match_dup 0)))] "")(define_split [(parallel [(set (match_operand:DI 0 "register_operand" "") (if_then_else:DI (match_operator 1 "comparison_operator" [(zero_extract:DI (match_operand:DI 2 "register_operand" "") (const_int 1) (match_operand:DI 3 "const_int_operand" "")) (const_int 0)]) (match_operand:DI 4 "reg_or_8bit_operand" "") (match_operand:DI 5 "reg_or_8bit_operand" ""))) (clobber (match_operand:DI 6 "register_operand" ""))])] "INTVAL (operands[3]) != 0" [(set (match_dup 6) (lshiftrt:DI (match_dup 2) (match_dup 3))) (set (match_dup 0) (if_then_else:DI (match_op_dup 1 [(zero_extract:DI (match_dup 6) (const_int 1) (const_int 0)) (const_int 0)]) (match_dup 4) (match_dup 5)))] "");; For ABS, we have two choices, depending on whether the input and output;; registers are the same or not.(define_expand "absdi2" [(set (match_operand:DI 0 "register_operand" "") (abs:DI (match_operand:DI 1 "register_operand" "")))] "" "{ if (rtx_equal_p (operands[0], operands[1])) emit_insn (gen_absdi2_same (operands[0], gen_reg_rtx (DImode))); else emit_insn (gen_absdi2_diff (operands[0], operands[1])); DONE;}")(define_expand "absdi2_same" [(set (match_operand:DI 1 "register_operand" "") (neg:DI (match_operand:DI 0 "register_operand" ""))) (set (match_dup 0) (if_then_else:DI (ge (match_dup 0) (const_int 0)) (match_dup 0) (match_dup 1)))] "" "")(define_expand "absdi2_diff" [(set (match_operand:DI 0 "register_operand" "") (neg:DI (match_operand:DI 1 "register_operand" ""))) (set (match_dup 0) (if_then_else:DI (lt (match_dup 1) (const_int 0)) (match_dup 0) (match_dup 1)))] "" "")(define_split [(set (match_operand:DI 0 "register_operand" "") (abs:DI (match_dup 0))) (clobber (match_operand:DI 2 "register_operand" ""))] "" [(set (match_dup 1) (neg:DI (match_dup 0))) (set (match_dup 0) (if_then_else:DI (ge (match_dup 0) (const_int 0)) (match_dup 0) (match_dup 1)))] "")(define_split [(set (match_operand:DI 0 "register_operand" "") (abs:DI (match_operand:DI 1 "register_operand" "")))] "! rtx_equal_p (operands[0], operands[1])" [(set (match_dup 0) (neg:DI (match_dup 1))) (set (match_dup 0) (if_then_else:DI (lt (match_dup 1) (const_int 0)) (match_dup 0) (match_dup 1)))] "")(define_split [(set (match_operand:DI 0 "register_operand" "") (neg:DI (abs:DI (match_dup 0)))) (clobber (match_operand:DI 2 "register_operand" ""))] "" [(set (match_dup 1) (neg:DI (match_dup 0))) (set (match_dup 0) (if_then_else:DI (le (match_dup 0) (const_int 0)) (match_dup 0) (match_dup 1)))] "")(define_split [(set (match_operand:DI 0 "register_operand" "") (neg:DI (abs:DI (match_operand:DI 1 "register_operand" ""))))] "! rtx_equal_p (operands[0], operands[1])" [(set (match_dup 0) (neg:DI (match_dup 1))) (set (match_dup 0) (if_then_else:DI (gt (match_dup 1) (const_int 0)) (match_dup 0) (match_dup 1)))] "")(define_expand "smaxdi3" [(set (match_dup 3) (le:DI (match_operand:DI 1 "reg_or_0_operand" "") (match_operand:DI 2 "reg_or_8bit_operand" ""))) (set (match_operand:DI 0 "register_operand" "") (if_then_else:DI (eq (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" "{ operands[3] = gen_reg_rtx (DImode);}")(define_split [(set (match_operand:DI 0 "register_operand" "") (smax:DI (match_operand:DI 1 "reg_or_0_operand" "") (match_operand:DI 2 "reg_or_8bit_operand" ""))) (clobber (match_operand:DI 3 "register_operand" ""))] "operands[2] != const0_rtx" [(set (match_dup 3) (le:DI (match_dup 1) (match_dup 2))) (set (match_dup 0) (if_then_else:DI (eq (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "")(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (smax:DI (match_operand:DI 1 "register_operand" "0") (const_int 0)))] "" "cmovlt %0,0,%0")(define_expand "smindi3" [(set (match_dup 3) (lt:DI (match_operand:DI 1 "reg_or_0_operand" "") (match_operand:DI 2 "reg_or_8bit_operand" ""))) (set (match_operand:DI 0 "register_operand" "") (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" "{ operands[3] = gen_reg_rtx (DImode);}")(define_split [(set (match_operand:DI 0 "register_operand" "") (smin:DI (match_operand:DI 1 "reg_or_0_operand" "") (match_operand:DI 2 "reg_or_8bit_operand" ""))) (clobber (match_operand:DI 3 "register_operand" ""))] "operands[2] != const0_rtx" [(set (match_dup 3) (lt:DI (match_dup 1) (match_dup 2))) (set (match_dup 0) (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "")(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (smin:DI (match_operand:DI 1 "register_operand" "0") (const_int 0)))] "" "cmovgt %0,0,%0")(define_expand "umaxdi3" [(set (match_dup 3) (leu:DI (match_operand:DI 1 "reg_or_0_operand" "") (match_operand:DI 2 "reg_or_8bit_operand" ""))) (set (match_operand:DI 0 "register_operand" "") (if_then_else:DI (eq (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" "{ operands[3] = gen_reg_rtx (DImode);}")(define_split [(set (match_operand:DI 0 "register_operand" "") (umax:DI (match_operand:DI 1 "reg_or_0_operand" "") (match_operand:DI 2 "reg_or_8bit_operand" ""))) (clobber (match_operand:DI 3 "register_operand" ""))] "operands[2] != const0_rtx" [(set (match_dup 3) (leu:DI (match_dup 1) (match_dup 2))) (set (match_dup 0) (if_then_else:DI (eq (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "")(define_expand "umindi3" [(set (match_dup 3) (ltu:DI (match_operand:DI 1 "reg_or_0_operand" "") (match_operand:DI 2 "reg_or_8bit_operand" ""))) (set (match_operand:DI 0 "register_operand" "") (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "" "{ operands[3] = gen_reg_rtx (DImode);}")(define_split [(set (match_operand:DI 0 "register_operand" "") (umin:DI (match_operand:DI 1 "reg_or_0_operand" "") (match_operand:DI 2 "reg_or_8bit_operand" ""))) (clobber (match_operand:DI 3 "register_operand" ""))] "operands[2] != const0_rtx" [(set (match_dup 3) (ltu:DI (match_dup 1) (match_dup 2))) (set (match_dup 0) (if_then_else:DI (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "")(define_insn "" [(set (pc) (if_then_else (match_operator 1 "signed_comparison_operator" [(match_operand:DI 2 "reg_or_0_operand" "rJ") (const_int 0)]) (label_ref (match_operand 0 "" "")) (pc)))] "" "b%C1 %r2,%0" [(set_attr "type" "ibr")])(define_insn "" [(set (pc) (if_then_else (ne (zero_extract:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") (const_int 1) (const_int 0)) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "blbs %r1,%0" [(set_attr "type" "ibr")])(define_insn "" [(set (pc) (if_then_else (eq (zero_extract:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") (const_int 1) (const_int 0)) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "blbc %r1,%0" [(set_attr "type" "ibr")])(define_split [(parallel [(set (pc) (if_then_else (match_operator 1 "comparison_operator" [(zero_extract:DI (match_operand:DI 2 "register_operand" "") (const_int 1) (match_operand:DI 3 "const_int_operand" "")) (const_int 0)]) (label_ref (match_operand 0 "" "")) (pc))) (clobber (match_operand:DI 4 "register_operand" ""))])] "INTVAL (operands[3]) != 0" [(set (match_dup 4) (lshiftrt:DI (match_dup 2) (match_dup 3))) (set (pc) (if_then_else (match_op_dup 1 [(zero_extract:DI (match_dup 4) (const_int 1) (const_int 0)) (const_int 0)]) (label_ref (match_dup 0)) (pc)))] "");; The following are the corresponding floating-point insns. Recall;; we need to have variants that expand the arguments from SF mode;; to DFmode.(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_comparison_operator" [(match_operand:DF 2 "reg_or_fp0_operand" "fG") (match_operand:DF 3 "reg_or_fp0_operand" "fG")]))] "TARGET_FP" "cmpt%C1 %R2,%R3,%0" [(set_attr "type" "fpop")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_comparison_operator" [(float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "fG")) (match_operand:DF 3 "reg_or_fp0_operand" "fG")]))] "TARGET_FP" "cmpt%C1 %R2,%R3,%0" [(set_attr "type" "fpop")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_comparison_operator" [(match_operand:DF 2 "reg_or_fp0_operand" "fG") (float_extend:DF (match_operand:SF 3 "reg_or_fp0_operand" "fG"))]))] "TARGET_FP" "cmpt%C1 %R2,%R3,%0" [(set_attr "type" "fpop")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (match_operator:DF 1 "alpha_comparison_operator" [(float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "fG")) (float_extend:DF (match_operand:SF 3 "reg_or_fp0_operand" "fG"))]))] "TARGET_FP" "cmpt%C1 %R2,%R3,%0" [(set_attr "type" "fpop")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f,f") (if_then_else:DF (match_operator 3 "signed_comparison_operator" [(match_operand:DF 4 "reg_or_fp0_operand" "fG,fG") (match_operand:DF 2 "fp0_operand" "G,G")]) (match_operand:DF 1 "reg_or_fp0_operand" "fG,0") (match_operand:DF 5 "reg_or_fp0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 fcmov%D3 %R4,%R5,%0" [(set_attr "type" "fpop")])(define_insn "" [(set (match_operand:SF 0 "register_operand" "=f,f") (if_then_else:SF (match_operator 3 "signed_comparison_operator" [(match_operand:DF 4 "reg_or_fp0_operand" "fG,fG") (match_operand:DF 2 "fp0_operand" "G,G")]) (match_operand:SF 1 "reg_or_fp0_operand" "fG,0") (match_operand:SF 5 "reg_or_fp0_operand" "0,fG")))] "TARGET_FP" "@ fcmov%C3 %R4,%R1,%0 fcmov%D3 %R4,%R5,%0" [(set_attr "type" "fpop")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f,f") (if_then_else:DF (match_operator 3 "signed_comparison_operator" [(match_operand:DF 1 "reg_or_fp0_operand" "fG,fG") (match_operand:DF 2 "fp0_operand" "G,G")]) (float_extend:DF (match_operand:SF 4 "reg_or_fp0_operand" "fG,0")) (match_operand:DF 5 "reg_or_fp0_operand" "0,fG")))] "TARGET_FP"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -