📄 pa.md
字号:
{com%I4clr|cmp%I4clr},%S5 %4,%3,%%r0\;ldi %2,%0 {com%I4clr|cmp%I4clr},%S5 %4,%3,%%r0\;ldil L'%2,%0 {com%I4clr|cmp%I4clr},%S5 %4,%3,%%r0\;{zdepi|depwi,z} %Z2,%0 {com%I4clr|cmp%I4clr},%B5 %4,%3,%%r0\;copy %1,%0 {com%I4clr|cmp%I4clr},%B5 %4,%3,%%r0\;ldi %1,%0 {com%I4clr|cmp%I4clr},%B5 %4,%3,%%r0\;ldil L'%1,%0 {com%I4clr|cmp%I4clr},%B5 %4,%3,%%r0\;{zdepi|depwi,z} %Z1,%0" [(set_attr "type" "multi,multi,multi,nullshift,multi,multi,multi,nullshift") (set_attr "length" "8,8,8,8,8,8,8,8")])(define_expand "movdicc" [(set (match_operand:DI 0 "register_operand" "") (if_then_else:DI (match_operator 1 "comparison_operator" [(match_dup 4) (match_dup 5)]) (match_operand:DI 2 "reg_or_cint_move_operand" "") (match_operand:DI 3 "reg_or_cint_move_operand" "")))] "TARGET_64BIT" "{ enum rtx_code code = GET_CODE (operands[1]); if (hppa_branch_type != CMP_SI) FAIL; if (GET_MODE (hppa_compare_op0) != GET_MODE (hppa_compare_op1) || GET_MODE (hppa_compare_op0) != GET_MODE (operands[0])) FAIL; /* operands[1] is currently the result of compare_from_rtx. We want to emit a compare of the original operands. */ operands[1] = gen_rtx_fmt_ee (code, DImode, hppa_compare_op0, hppa_compare_op1); operands[4] = hppa_compare_op0; operands[5] = hppa_compare_op1;}"); We need the first constraint alternative in order to avoid; earlyclobbers on all other alternatives.(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,r,r,r,r") (if_then_else:DI (match_operator 2 "comparison_operator" [(match_operand:DI 3 "register_operand" "r,r,r,r,r") (match_operand:DI 4 "arith11_operand" "rI,rI,rI,rI,rI")]) (match_operand:DI 1 "reg_or_cint_move_operand" "0,r,J,N,K") (const_int 0)))] "TARGET_64BIT" "@ cmp%I4clr,*%S2 %4,%3,%%r0\;ldi 0,%0 cmp%I4clr,*%B2 %4,%3,%0\;copy %1,%0 cmp%I4clr,*%B2 %4,%3,%0\;ldi %1,%0 cmp%I4clr,*%B2 %4,%3,%0\;ldil L'%1,%0 cmp%I4clr,*%B2 %4,%3,%0\;depdi,z %z1,%0" [(set_attr "type" "multi,multi,multi,multi,nullshift") (set_attr "length" "8,8,8,8,8")])(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,r,r,r,r,r,r,r") (if_then_else:DI (match_operator 5 "comparison_operator" [(match_operand:DI 3 "register_operand" "r,r,r,r,r,r,r,r") (match_operand:DI 4 "arith11_operand" "rI,rI,rI,rI,rI,rI,rI,rI")]) (match_operand:DI 1 "reg_or_cint_move_operand" "0,0,0,0,r,J,N,K") (match_operand:DI 2 "reg_or_cint_move_operand" "r,J,N,K,0,0,0,0")))] "TARGET_64BIT" "@ cmp%I4clr,*%S5 %4,%3,%%r0\;copy %2,%0 cmp%I4clr,*%S5 %4,%3,%%r0\;ldi %2,%0 cmp%I4clr,*%S5 %4,%3,%%r0\;ldil L'%2,%0 cmp%I4clr,*%S5 %4,%3,%%r0\;depdi,z %z2,%0 cmp%I4clr,*%B5 %4,%3,%%r0\;copy %1,%0 cmp%I4clr,*%B5 %4,%3,%%r0\;ldi %1,%0 cmp%I4clr,*%B5 %4,%3,%%r0\;ldil L'%1,%0 cmp%I4clr,*%B5 %4,%3,%%r0\;depdi,z %z1,%0" [(set_attr "type" "multi,multi,multi,nullshift,multi,multi,multi,nullshift") (set_attr "length" "8,8,8,8,8,8,8,8")]);; Conditional Branches(define_expand "beq" [(set (pc) (if_then_else (eq (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type != CMP_SI) { emit_insn (gen_cmp_fp (EQ, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE; } /* set up operands from compare. */ operands[1] = hppa_compare_op0; operands[2] = hppa_compare_op1; /* fall through and generate default code */}")(define_expand "bne" [(set (pc) (if_then_else (ne (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type != CMP_SI) { emit_insn (gen_cmp_fp (NE, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE; } operands[1] = hppa_compare_op0; operands[2] = hppa_compare_op1;}")(define_expand "bgt" [(set (pc) (if_then_else (gt (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type != CMP_SI) { emit_insn (gen_cmp_fp (GT, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE; } operands[1] = hppa_compare_op0; operands[2] = hppa_compare_op1;}")(define_expand "blt" [(set (pc) (if_then_else (lt (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type != CMP_SI) { emit_insn (gen_cmp_fp (LT, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE; } operands[1] = hppa_compare_op0; operands[2] = hppa_compare_op1;}")(define_expand "bge" [(set (pc) (if_then_else (ge (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type != CMP_SI) { emit_insn (gen_cmp_fp (GE, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE; } operands[1] = hppa_compare_op0; operands[2] = hppa_compare_op1;}")(define_expand "ble" [(set (pc) (if_then_else (le (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type != CMP_SI) { emit_insn (gen_cmp_fp (LE, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE; } operands[1] = hppa_compare_op0; operands[2] = hppa_compare_op1;}")(define_expand "bgtu" [(set (pc) (if_then_else (gtu (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type != CMP_SI) FAIL; operands[1] = hppa_compare_op0; operands[2] = hppa_compare_op1;}")(define_expand "bltu" [(set (pc) (if_then_else (ltu (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type != CMP_SI) FAIL; operands[1] = hppa_compare_op0; operands[2] = hppa_compare_op1;}")(define_expand "bgeu" [(set (pc) (if_then_else (geu (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type != CMP_SI) FAIL; operands[1] = hppa_compare_op0; operands[2] = hppa_compare_op1;}")(define_expand "bleu" [(set (pc) (if_then_else (leu (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type != CMP_SI) FAIL; operands[1] = hppa_compare_op0; operands[2] = hppa_compare_op1;}")(define_expand "bltgt" [(set (pc) (if_then_else (ltgt (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type == CMP_SI) FAIL; emit_insn (gen_cmp_fp (LTGT, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE;}")(define_expand "bunle" [(set (pc) (if_then_else (unle (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type == CMP_SI) FAIL; emit_insn (gen_cmp_fp (UNLE, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE;}")(define_expand "bunlt" [(set (pc) (if_then_else (unlt (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type == CMP_SI) FAIL; emit_insn (gen_cmp_fp (UNLT, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE;}")(define_expand "bunge" [(set (pc) (if_then_else (unge (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type == CMP_SI) FAIL; emit_insn (gen_cmp_fp (UNGE, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE;}")(define_expand "bungt" [(set (pc) (if_then_else (ungt (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type == CMP_SI) FAIL; emit_insn (gen_cmp_fp (UNGT, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE;}")(define_expand "buneq" [(set (pc) (if_then_else (uneq (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type == CMP_SI) FAIL; emit_insn (gen_cmp_fp (UNEQ, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE;}")(define_expand "bunordered" [(set (pc) (if_then_else (unordered (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type == CMP_SI) FAIL; emit_insn (gen_cmp_fp (UNORDERED, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE;}")(define_expand "bordered" [(set (pc) (if_then_else (ordered (match_dup 1) (match_dup 2)) (label_ref (match_operand 0 "" "")) (pc)))] "" "{ if (hppa_branch_type == CMP_SI) FAIL; emit_insn (gen_cmp_fp (ORDERED, hppa_compare_op0, hppa_compare_op1)); emit_bcond_fp (NE, operands[0]); DONE;}");; Match the branch patterns.;; Note a long backward conditional branch with an annulled delay slot;; has a length of 12.(define_insn "" [(set (pc) (if_then_else (match_operator 3 "comparison_operator" [(match_operand:SI 1 "reg_or_0_operand" "rM") (match_operand:SI 2 "arith5_operand" "rL")]) (label_ref (match_operand 0 "" "")) (pc)))] "" "*{ return output_cbranch (operands, INSN_ANNULLED_BRANCH_P (insn), get_attr_length (insn), 0, insn);}"[(set_attr "type" "cbranch") (set (attr "length") (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8)))) (const_int 8184)) (const_int 4) (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8)))) (const_int 262100)) (const_int 8) (eq (symbol_ref "flag_pic") (const_int 0)) (const_int 20)] (const_int 28)))]);; Match the negated branch.(define_insn "" [(set (pc) (if_then_else (match_operator 3 "comparison_operator" [(match_operand:SI 1 "reg_or_0_operand" "rM") (match_operand:SI 2 "arith5_operand" "rL")]) (pc) (label_ref (match_operand 0 "" ""))))] "" "*{ return output_cbranch (operands, INSN_ANNULLED_BRANCH_P (insn), get_attr_length (insn), 1, insn);}"[(set_attr "type" "cbranch") (set (attr "length") (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8)))) (const_int 8184)) (const_int 4) (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8)))) (const_int 262100)) (const_int 8) (eq (symbol_ref "flag_pic") (const_int 0)) (const_int 20)] (const_int 28)))])(define_insn "" [(set (pc) (if_then_else (match_operator 3 "comparison_operator" [(match_operand:DI 1 "reg_or_0_operand" "rM") (match_operand:DI 2 "reg_or_0_operand" "rM")]) (label_ref (match_operand 0 "" "")) (pc)))] "TARGET_64BIT"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -