📄 alpha.md
字号:
(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (mult:DF (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "fG")) (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_tp != ALPHA_TP_INSN" "mul%-%)%& %R1,%R2,%0" [(set_attr "type" "fmul") (set_attr "trap" "yes")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (mult:DF (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "%fG")) (float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && alpha_tp != ALPHA_TP_INSN" "mul%-%)%& %R1,%R2,%0" [(set_attr "type" "fmul") (set_attr "trap" "yes")])(define_insn "" [(set (match_operand:SF 0 "register_operand" "=&f") (minus:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG") (match_operand:SF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_tp == ALPHA_TP_INSN" "sub%,%)%& %R1,%R2,%0" [(set_attr "type" "fadd") (set_attr "trap" "yes")])(define_insn "subsf3" [(set (match_operand:SF 0 "register_operand" "=f") (minus:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG") (match_operand:SF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "sub%,%)%& %R1,%R2,%0" [(set_attr "type" "fadd") (set_attr "trap" "yes")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=&f") (minus:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_tp == ALPHA_TP_INSN" "sub%-%)%& %R1,%R2,%0" [(set_attr "type" "fadd") (set_attr "trap" "yes")])(define_insn "subdf3" [(set (match_operand:DF 0 "register_operand" "=f") (minus:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP" "sub%-%)%& %R1,%R2,%0" [(set_attr "type" "fadd") (set_attr "trap" "yes")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (minus:DF (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "fG")) (match_operand:DF 2 "reg_or_fp0_operand" "fG")))] "TARGET_FP && alpha_tp != ALPHA_TP_INSN" "sub%-%)%& %R1,%R2,%0" [(set_attr "type" "fadd") (set_attr "trap" "yes")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (minus:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG") (float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && alpha_tp != ALPHA_TP_INSN" "sub%-%)%& %R1,%R2,%0" [(set_attr "type" "fadd") (set_attr "trap" "yes")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (minus:DF (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "fG")) (float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && alpha_tp != ALPHA_TP_INSN" "sub%-%)%& %R1,%R2,%0" [(set_attr "type" "fadd") (set_attr "trap" "yes")])(define_insn "sqrtsf2" [(set (match_operand:SF 0 "register_operand" "=f") (sqrt:SF (match_operand:SF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP && TARGET_CIX" "sqrt%, %1,%0" [(set_attr "type" "fdivs") (set_attr "trap" "yes")])(define_insn "sqrtdf2" [(set (match_operand:DF 0 "register_operand" "=f") (sqrt:DF (match_operand:DF 1 "reg_or_fp0_operand" "fG")))] "TARGET_FP && TARGET_CIX" "sqrt%- %1,%0" [(set_attr "type" "fdivt") (set_attr "trap" "yes")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=f") (sqrt:DF (float_extend:DF (match_operand:SF 1 "reg_or_fp0_operand" "fG"))))] "TARGET_FP && TARGET_CIX&& alpha_tp != ALPHA_TP_INSN" "sqrt%- %1,%0" [(set_attr "type" "fdivt") (set_attr "trap" "yes")]);; Next are all the integer comparisons, and conditional moves and branches;; and some of the related define_expand's and define_split's.(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (match_operator:DI 1 "alpha_comparison_operator" [(match_operand:DI 2 "reg_or_0_operand" "rJ") (match_operand:DI 3 "reg_or_8bit_operand" "rI")]))] "" "cmp%C1 %r2,%3,%0" [(set_attr "type" "icmp")])(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (match_operator:DI 1 "alpha_swapped_comparison_operator" [(match_operand:DI 2 "reg_or_8bit_operand" "rI") (match_operand:DI 3 "reg_or_0_operand" "rJ")]))] "" "cmp%c1 %r3,%2,%0" [(set_attr "type" "icmp")]);; This pattern exists so conditional moves of SImode values are handled.;; Comparisons are still done in DImode though.(define_insn "" [(set (match_operand:SI 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: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" [(set_attr "type" "cmov")])(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" [(set_attr "type" "cmov")])(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" [(set_attr "type" "cmov")])(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" [(set_attr "type" "cmov")]);; 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" [(set_attr "type" "cmov")])(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_insn "sminqi3" [(set (match_operand:QI 0 "register_operand" "=r") (smin:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ") (match_operand:QI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "minsb8 %r1,%2,%0" [(set_attr "type" "shift")])(define_insn "uminqi3" [(set (match_operand:QI 0 "register_operand" "=r") (umin:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ") (match_operand:QI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "minub8 %r1,%2,%0" [(set_attr "type" "shift")])(define_insn "smaxqi3" [(set (match_operand:QI 0 "register_operand" "=r") (smax:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ") (match_operand:QI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "maxsb8 %r1,%2,%0" [(set_attr "type" "shift")])(define_insn "umaxqi3" [(set (match_operand:QI 0 "register_operand" "=r") (umax:SI (match_operand:QI 1 "reg_or_0_operand" "%rJ") (match_operand:QI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "maxub8 %r1,%2,%0" [(set_attr "type" "shift")])(define_insn "sminhi3" [(set (match_operand:HI 0 "register_operand" "=r") (smin:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ") (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "minsw4 %r1,%2,%0" [(set_attr "type" "shift")])(define_insn "uminhi3" [(set (match_operand:HI 0 "register_operand" "=r") (umin:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ") (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "minuw4 %r1,%2,%0" [(set_attr "type" "shift")])(define_insn "smaxhi3" [(set (match_operand:HI 0 "register_operand" "=r") (smax:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ") (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "maxsw4 %r1,%2,%0" [(set_attr "type" "shift")])(define_insn "umaxhi3" [(set (match_operand:HI 0 "register_operand" "=r") (umax:SI (match_operand:HI 1 "reg_or_0_operand" "%rJ") (match_operand:HI 2 "reg_or_8bit_operand" "rI")))] "TARGET_MAX" "maxuw4 %r1,%2,%0" [(set_attr "type" "shift")])(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_i
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -