📄 alpha.md
字号:
(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" "@ 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" [(float_extend:DF (match_operand:SF 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" [(float_extend:DF (match_operand:SF 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" [(float_extend:DF (match_operand:SF 4 "reg_or_fp0_operand" "fG,fG")) (match_operand:DF 2 "fp0_operand" "G,G")]) (float_extend:DF (match_operand:SF 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_expand "smaxdf3" [(set (match_dup 3) (le:DF (match_operand:DF 1 "reg_or_fp0_operand" "") (match_operand:DF 2 "reg_or_fp0_operand" ""))) (set (match_operand:DF 0 "register_operand" "") (if_then_else:DF (eq (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "TARGET_FP" "{ operands[3] = gen_reg_rtx (DFmode);}")(define_expand "smindf3" [(set (match_dup 3) (lt:DF (match_operand:DF 1 "reg_or_fp0_operand" "") (match_operand:DF 2 "reg_or_fp0_operand" ""))) (set (match_operand:DF 0 "register_operand" "") (if_then_else:DF (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "TARGET_FP" "{ operands[3] = gen_reg_rtx (DFmode);}")(define_expand "smaxsf3" [(set (match_dup 3) (le:DF (match_operand:SF 1 "reg_or_fp0_operand" "") (float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "")))) (set (match_operand:SF 0 "register_operand" "") (if_then_else:SF (eq (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "TARGET_FP" "{ operands[3] = gen_reg_rtx (SFmode);}")(define_expand "sminsf3" [(set (match_dup 3) (lt:DF (match_operand:SF 1 "reg_or_fp0_operand" "") (float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "")))) (set (match_operand:SF 0 "register_operand" "") (if_then_else:SF (ne (match_dup 3) (const_int 0)) (match_dup 1) (match_dup 2)))] "TARGET_FP" "{ operands[3] = gen_reg_rtx (SFmode);}")(define_insn "" [(set (pc) (if_then_else (match_operator 1 "signed_comparison_operator" [(match_operand:DF 2 "reg_or_fp0_operand" "fG") (match_operand:DF 3 "fp0_operand" "G")]) (label_ref (match_operand 0 "" "")) (pc)))] "TARGET_FP" "fb%C1 %R2,%0" [(set_attr "type" "fbr")])(define_insn "" [(set (pc) (if_then_else (match_operator 1 "signed_comparison_operator" [(float_extend:DF (match_operand:SF 2 "reg_or_fp0_operand" "fG")) (match_operand:DF 3 "fp0_operand" "G")]) (label_ref (match_operand 0 "" "")) (pc)))] "TARGET_FP" "fb%C1 %R2,%0" [(set_attr "type" "fbr")]);; These are the main define_expand's used to make conditional branches;; and compares.(define_expand "cmpdf" [(set (cc0) (compare (match_operand:DF 0 "reg_or_fp0_operand" "") (match_operand:DF 1 "reg_or_fp0_operand" "")))] "" "{ alpha_compare_op0 = operands[0]; alpha_compare_op1 = operands[1]; alpha_compare_fp_p = 1; DONE;}")(define_expand "cmpdi" [(set (cc0) (compare (match_operand:DI 0 "reg_or_0_operand" "") (match_operand:DI 1 "reg_or_8bit_operand" "")))] "" "{ alpha_compare_op0 = operands[0]; alpha_compare_op1 = operands[1]; alpha_compare_fp_p = 0; DONE;}")(define_expand "beq" [(set (match_dup 1) (match_dup 2)) (set (pc) (if_then_else (match_dup 3) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ enum machine_mode mode = alpha_compare_fp_p ? DFmode : DImode; operands[1] = gen_reg_rtx (mode); operands[2] = gen_rtx (EQ, mode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (NE, VOIDmode, operands[1], CONST0_RTX (mode));}")(define_expand "bne" [(set (match_dup 1) (match_dup 2)) (set (pc) (if_then_else (match_dup 3) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ enum machine_mode mode = alpha_compare_fp_p ? DFmode : DImode; operands[1] = gen_reg_rtx (mode); operands[2] = gen_rtx (EQ, mode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (EQ, VOIDmode, operands[1], CONST0_RTX (mode));}")(define_expand "blt" [(set (match_dup 1) (match_dup 2)) (set (pc) (if_then_else (match_dup 3) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ enum machine_mode mode = alpha_compare_fp_p ? DFmode : DImode; operands[1] = gen_reg_rtx (mode); operands[2] = gen_rtx (LT, mode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (NE, VOIDmode, operands[1], CONST0_RTX (mode));}")(define_expand "ble" [(set (match_dup 1) (match_dup 2)) (set (pc) (if_then_else (match_dup 3) (label_ref (match_operand 0 "" "")) (pc)))] "" "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -