pa.md

来自「GCC编译器源代码」· Markdown 代码 · 共 2,146 行 · 第 1/5 页

MD
2,146
字号
      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;}");; 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 "register_operand" "r")			  (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 "register_operand" "r")			  (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)))]);; Branch on Bit patterns.(define_insn ""  [(set (pc)	(if_then_else	 (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r")			      (const_int 1)			      (match_operand:SI 1 "uint5_operand" ""))	     (const_int 0))	 (label_ref (match_operand 2 "" ""))	 (pc)))]  ""  "*{  return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn),			 get_attr_length (insn), 0, insn, 0);}"[(set_attr "type" "cbranch") (set (attr "length")    (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))		      (const_int 8184))           (const_int 4)	   (const_int 8)))])(define_insn ""  [(set (pc)	(if_then_else	 (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r")			      (const_int 1)			      (match_operand:SI 1 "uint5_operand" ""))	     (const_int 0))	 (pc)	 (label_ref (match_operand 2 "" ""))))]  ""  "*{  return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn),			 get_attr_length (insn), 1, insn, 0);}"[(set_attr "type" "cbranch") (set (attr "length")    (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))		      (const_int 8184))           (const_int 4)	   (const_int 8)))])(define_insn ""  [(set (pc)	(if_then_else	 (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r")			      (const_int 1)			      (match_operand:SI 1 "uint5_operand" ""))	     (const_int 0))	 (label_ref (match_operand 2 "" ""))	 (pc)))]  ""  "*{  return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn),			 get_attr_length (insn), 0, insn, 1);}"[(set_attr "type" "cbranch") (set (attr "length")    (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))		      (const_int 8184))           (const_int 4)	   (const_int 8)))])(define_insn ""  [(set (pc)	(if_then_else	 (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r")			      (const_int 1)			      (match_operand:SI 1 "uint5_operand" ""))	     (const_int 0))	 (pc)	 (label_ref (match_operand 2 "" ""))))]  ""  "*{  return output_bb (operands, INSN_ANNULLED_BRANCH_P (insn),			 get_attr_length (insn), 1, insn, 1);}"[(set_attr "type" "cbranch") (set (attr "length")    (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))		      (const_int 8184))           (const_int 4)	   (const_int 8)))]);; Branch on Variable Bit patterns.(define_insn ""  [(set (pc)	(if_then_else	 (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r")			      (const_int 1)			      (match_operand:SI 1 "register_operand" "q"))	     (const_int 0))	 (label_ref (match_operand 2 "" ""))	 (pc)))]  ""  "*{  return output_bvb (operands, INSN_ANNULLED_BRANCH_P (insn),		     get_attr_length (insn), 0, insn, 0);}"[(set_attr "type" "cbranch") (set (attr "length")    (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))		      (const_int 8184))           (const_int 4)	   (const_int 8)))])(define_insn ""  [(set (pc)	(if_then_else	 (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r")			      (const_int 1)			      (match_operand:SI 1 "register_operand" "q"))	     (const_int 0))	 (pc)	 (label_ref (match_operand 2 "" ""))))]  ""  "*{  return output_bvb (operands, INSN_ANNULLED_BRANCH_P (insn),		     get_attr_length (insn), 1, insn, 0);}"[(set_attr "type" "cbranch") (set (attr "length")    (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))		      (const_int 8184))           (const_int 4)	   (const_int 8)))])(define_insn ""  [(set (pc)	(if_then_else	 (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r")			      (const_int 1)			      (match_operand:SI 1 "register_operand" "q"))	     (const_int 0))	 (label_ref (match_operand 2 "" ""))	 (pc)))]  ""  "*{  return output_bvb (operands, INSN_ANNULLED_BRANCH_P (insn),		     get_attr_length (insn), 0, insn, 1);}"[(set_attr "type" "cbranch") (set (attr "length")    (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))		      (const_int 8184))           (const_int 4)	   (const_int 8)))])(define_insn ""  [(set (pc)	(if_then_else	 (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r")			      (const_int 1)			      (match_operand:SI 1 "register_operand" "q"))	     (const_int 0))	 (pc)	 (label_ref (match_operand 2 "" ""))))]  ""  "*{  return output_bvb (operands, INSN_ANNULLED_BRANCH_P (insn),		     get_attr_length (insn), 1, insn, 1);}"[(set_attr "type" "cbranch") (set (attr "length")    (if_then_else (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))		      (const_int 8184))           (const_int 4)	   (const_int 8)))]);; Floating point branches(define_insn ""  [(set (pc) (if_then_else (ne (reg:CCFP 0) (const_int 0))			   (label_ref (match_operand 0 "" ""))			   (pc)))]  "! TARGET_SOFT_FLOAT"  "*{  if (INSN_ANNULLED_BRANCH_P (insn))    return \"ftest\;bl,n %0,0\";  else    return \"ftest\;bl%* %0,0\";}"  [(set_attr "type" "fbranch")   (set_attr "length" "8")])(define_insn ""  [(set (pc) (if_then_else (ne (reg:CCFP 0) (const_int 0))			   (pc)			   (label_ref (match_operand 0 "" ""))))]  "! TARGET_SOFT_FLOAT"  "*{  if (INSN_ANNULLED_BRANCH_P (insn))    return \"ftest\;add,tr 0,0,0\;bl,n %0,0\";  else    return \"ftest\;add,tr 0,0,0\;bl%* %0,0\";}"  [(set_attr "type" "fbranch")   (set_attr "length" "12")]);; Move instructions(define_expand "movsi"  [(set (match_operand:SI 0 "general_operand" "")	(match_operand:SI 1 "general_operand" ""))]  ""  "{

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?