📄 alpha.md
字号:
"@ 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 "maxdf3" [(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) (match_dup 4)) (match_dup 1) (match_dup 2)))] "TARGET_FP" "{ operands[3] = gen_reg_rtx (DFmode); operands[4] = CONST0_RTX (DFmode);}")(define_expand "mindf3" [(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) (match_dup 4)) (match_dup 1) (match_dup 2)))] "TARGET_FP" "{ operands[3] = gen_reg_rtx (DFmode); operands[4] = CONST0_RTX (DFmode);}")(define_expand "maxsf3" [(set (match_dup 3) (le:DF (float_extend: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) (match_dup 4)) (match_dup 1) (match_dup 2)))] "TARGET_FP" "{ operands[3] = gen_reg_rtx (DFmode); operands[4] = CONST0_RTX (DFmode);}")(define_expand "minsf3" [(set (match_dup 3) (lt:DF (float_extend: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) (match_dup 4)) (match_dup 1) (match_dup 2)))] "TARGET_FP" "{ operands[3] = gen_reg_rtx (DFmode); operands[4] = CONST0_RTX (DFmode);}")(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" "")))] "TARGET_FP" "{ 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; enum rtx_code compare_code, branch_code; if (alpha_compare_fp_p) mode = DFmode, compare_code = EQ, branch_code = NE; else { mode = DImode, compare_code = MINUS, branch_code = EQ; if (GET_CODE (alpha_compare_op1) == CONST_INT) { compare_code = PLUS; alpha_compare_op1 = GEN_INT (- INTVAL (alpha_compare_op1)); } } operands[1] = gen_reg_rtx (mode); operands[2] = gen_rtx (compare_code, mode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (branch_code, 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; enum rtx_code compare_code, branch_code; if (alpha_compare_fp_p) mode = DFmode, compare_code = EQ, branch_code = EQ; else { mode = DImode, compare_code = MINUS, branch_code = NE; if (GET_CODE (alpha_compare_op1) == CONST_INT) { compare_code = PLUS; alpha_compare_op1 = GEN_INT (- INTVAL (alpha_compare_op1)); } } operands[1] = gen_reg_rtx (mode); operands[2] = gen_rtx (compare_code, mode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (branch_code, 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)))] "" "{ enum machine_mode mode = alpha_compare_fp_p ? DFmode : DImode; operands[1] = gen_reg_rtx (mode); operands[2] = gen_rtx (LE, mode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (NE, VOIDmode, operands[1], CONST0_RTX (mode));}")(define_expand "bgt" [(set (match_dup 1) (match_dup 2)) (set (pc) (if_then_else (match_dup 3) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (alpha_compare_fp_p) { operands[1] = gen_reg_rtx (DFmode); operands[2] = gen_rtx (LT, DFmode, alpha_compare_op1, alpha_compare_op0); operands[3] = gen_rtx (NE, VOIDmode, operands[1], CONST0_RTX (DFmode)); } else { operands[1] = gen_reg_rtx (DImode); operands[2] = gen_rtx (LE, DImode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (EQ, VOIDmode, operands[1], const0_rtx); }}")(define_expand "bge" [(set (match_dup 1) (match_dup 2)) (set (pc) (if_then_else (match_dup 3) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (alpha_compare_fp_p) { operands[1] = gen_reg_rtx (DFmode); operands[2] = gen_rtx (LE, DFmode, alpha_compare_op1, alpha_compare_op0); operands[3] = gen_rtx (NE, VOIDmode, operands[1], CONST0_RTX (DFmode)); } else { operands[1] = gen_reg_rtx (DImode); operands[2] = gen_rtx (LT, DImode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (EQ, VOIDmode, operands[1], const0_rtx); }}")(define_expand "bltu" [(set (match_dup 1) (match_dup 2)) (set (pc) (if_then_else (match_dup 3) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ operands[1] = gen_reg_rtx (DImode); operands[2] = gen_rtx (LTU, DImode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (NE, VOIDmode, operands[1], const0_rtx);}")(define_expand "bleu" [(set (match_dup 1) (match_dup 2)) (set (pc) (if_then_else (match_dup 3) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ operands[1] = gen_reg_rtx (DImode); operands[2] = gen_rtx (LEU, DImode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (NE, VOIDmode, operands[1], const0_rtx);}")(define_expand "bgtu" [(set (match_dup 1) (match_dup 2)) (set (pc) (if_then_else (match_dup 3) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ operands[1] = gen_reg_rtx (DImode); operands[2] = gen_rtx (LEU, DImode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (EQ, VOIDmode, operands[1], const0_rtx);}")(define_expand "bgeu" [(set (match_dup 1) (match_dup 2)) (set (pc) (if_then_else (match_dup 3) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ operands[1] = gen_reg_rtx (DImode); operands[2] = gen_rtx (LTU, DImode, alpha_compare_op0, alpha_compare_op1); operands[3] = gen_rtx (EQ, VOIDmode, operands[1], const0_rtx);}")(define_expand "seq" [(set (match_operand:DI 0 "register_operand" "") (match_dup 1))] "" "{ if (alpha_compare_fp_p) FAIL; operands[1] = gen_rtx (EQ, DImode, alpha_compare_op0, alpha_compare_op1);}")(define_expand "sne" [(set (match_operand:DI 0 "register_operand" "") (match_dup 1)) (set (match_dup 0) (xor:DI (match_dup 0) (const_int 1)))] "" "{ if (alpha_compare_fp_p) FAIL; operands[1] = gen_rtx (EQ, DImode, alpha_compare_op0, alpha_compare_op1);}")(define_expand "slt" [(set (match_operand:DI 0 "register_operand" "") (match_dup 1))] "" "{ if (alpha_compare_fp_p) FAIL; operands[1] = gen_rtx (LT, DImode, alpha_compare_op0, alpha_compare_op1);}")(define_expand "sle" [(set (match_operand:DI 0 "register_operand" "") (match_dup 1))] "" "{ if (alpha_compare_fp_p) FAIL; operands[1] = gen_rtx (LE, DImode, alpha_compare_op0, alpha_compare_op1);}")(define_expand "sgt" [(set (match_operand:DI 0 "register_operand" "") (match_dup 1))] "" "{ if (alpha_compare_fp_p) FAIL; operands[1] = gen_rtx (LT, DImode, force_reg (DImode, alpha_compare_op1), alpha_compare_op0);}")(define_expand "sge" [(set (match_operand:DI 0 "register_operand" "") (match_dup 1))] "" "{ if (alpha_compare_fp_p) FAIL; operands[1] = gen_rtx (LE, DImode, force_reg (DImode, alpha_compare_op1), alpha_compare_op0);}")(define_expand "sltu" [(set (match_operand:DI 0 "register_operand" "") (match_dup 1))] "" "{ if (alpha_compare_fp_p) FAIL; operands[1] = gen_rtx (LTU, DImode, alpha_compare_op0, alpha_compare_op1);}"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -