⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pa.md

📁 gcc库的原代码,对编程有很大帮助.
💻 MD
📖 第 1 页 / 共 5 页
字号:
	(ne:SI (match_dup 1)	       (match_dup 2)))]  ""  "{  /* fp scc patterns rarely match, and are not a win on the PA.  */  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "slt"  [(set (match_operand:SI 0 "register_operand" "")	(lt:SI (match_dup 1)	       (match_dup 2)))]  ""  "{  /* fp scc patterns rarely match, and are not a win on the PA.  */  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "sgt"  [(set (match_operand:SI 0 "register_operand" "")	(gt:SI (match_dup 1)	       (match_dup 2)))]  ""  "{  /* fp scc patterns rarely match, and are not a win on the PA.  */  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "sle"  [(set (match_operand:SI 0 "register_operand" "")	(le:SI (match_dup 1)	       (match_dup 2)))]  ""  "{  /* fp scc patterns rarely match, and are not a win on the PA.  */  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "sge"  [(set (match_operand:SI 0 "register_operand" "")	(ge:SI (match_dup 1)	       (match_dup 2)))]  ""  "{  /* fp scc patterns rarely match, and are not a win on the PA.  */  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "sltu"  [(set (match_operand:SI 0 "register_operand" "")	(ltu:SI (match_dup 1)	        (match_dup 2)))]  ""  "{  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "sgtu"  [(set (match_operand:SI 0 "register_operand" "")	(gtu:SI (match_dup 1)	        (match_dup 2)))]  ""  "{  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "sleu"  [(set (match_operand:SI 0 "register_operand" "")	(leu:SI (match_dup 1)	        (match_dup 2)))]  ""  "{  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}")(define_expand "sgeu"  [(set (match_operand:SI 0 "register_operand" "")	(geu:SI (match_dup 1)	        (match_dup 2)))]  ""  "{  if (hppa_branch_type != CMP_SI)    FAIL;  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;}");; Instruction canonicalization puts immediate operands second, which;; is the reverse of what we want.(define_insn "scc"  [(set (match_operand:SI 0 "register_operand" "=r")	(match_operator:SI 3 "comparison_operator"			   [(match_operand:SI 1 "register_operand" "r")			    (match_operand:SI 2 "arith11_operand" "rI")]))]  ""  "com%I2clr,%B3 %2,%1,%0\;ldi 1,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn "iorscc"  [(set (match_operand:SI 0 "register_operand" "=r")	(ior:SI (match_operator:SI 3 "comparison_operator"				   [(match_operand:SI 1 "register_operand" "r")				    (match_operand:SI 2 "arith11_operand" "rI")])		(match_operator:SI 6 "comparison_operator"				   [(match_operand:SI 4 "register_operand" "r")				    (match_operand:SI 5 "arith11_operand" "rI")])))]  ""  "com%I2clr,%S3 %2,%1,0\;com%I5clr,%B6 %5,%4,%0\;ldi 1,%0"  [(set_attr "type" "binary")   (set_attr "length" "12")]);; Combiner patterns for common operations performed with the output;; from an scc insn (negscc and incscc).(define_insn "negscc"  [(set (match_operand:SI 0 "register_operand" "=r")	(neg:SI (match_operator:SI 3 "comparison_operator"	       [(match_operand:SI 1 "register_operand" "r")		(match_operand:SI 2 "arith11_operand" "rI")])))]  ""  "com%I2clr,%B3 %2,%1,%0\;ldi -1,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")]);; Patterns for adding/subtracting the result of a boolean expression from;; a register.  First we have special patterns that make use of the carry;; bit, and output only two instructions.  For the cases we can't in;; general do in two instructions, the incscc pattern at the end outputs;; two or three instructions.(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(plus:SI (leu:SI (match_operand:SI 2 "register_operand" "r")			 (match_operand:SI 3 "arith11_operand" "rI"))		 (match_operand:SI 1 "register_operand" "r")))]  ""  "sub%I3 %3,%2,0\;addc 0,%1,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")]); This need only accept registers for op3, since canonicalization; replaces geu with gtu when op3 is an integer.(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(plus:SI (geu:SI (match_operand:SI 2 "register_operand" "r")			 (match_operand:SI 3 "register_operand" "r"))		 (match_operand:SI 1 "register_operand" "r")))]  ""  "sub %2,%3,0\;addc 0,%1,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")]); Match only integers for op3 here.  This is used as canonical form of the; geu pattern when op3 is an integer.  Don't match registers since we can't; make better code than the general incscc pattern.(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(plus:SI (gtu:SI (match_operand:SI 2 "register_operand" "r")			 (match_operand:SI 3 "int11_operand" "I"))		 (match_operand:SI 1 "register_operand" "r")))]  ""  "addi %k3,%2,0\;addc 0,%1,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn "incscc"  [(set (match_operand:SI 0 "register_operand" "=r,r") 	(plus:SI (match_operator:SI 4 "comparison_operator"		    [(match_operand:SI 2 "register_operand" "r,r")		     (match_operand:SI 3 "arith11_operand" "rI,rI")])		 (match_operand:SI 1 "register_operand" "0,?r")))]  ""  "@   com%I3clr,%B4 %3,%2,0\;addi 1,%0,%0   com%I3clr,%B4 %3,%2,0\;addi,tr 1,%1,%0\;copy %1,%0"  [(set_attr "type" "binary,binary")   (set_attr "length" "8,12")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (match_operand:SI 1 "register_operand" "r")		  (gtu:SI (match_operand:SI 2 "register_operand" "r")			  (match_operand:SI 3 "arith11_operand" "rI"))))]  ""  "sub%I3 %3,%2,0\;subb %1,0,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (minus:SI (match_operand:SI 1 "register_operand" "r")			    (gtu:SI (match_operand:SI 2 "register_operand" "r")				    (match_operand:SI 3 "arith11_operand" "rI")))		  (match_operand:SI 4 "register_operand" "r")))]  ""  "sub%I3 %3,%2,0\;subb %1,%4,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")]); This need only accept registers for op3, since canonicalization; replaces ltu with leu when op3 is an integer.(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (match_operand:SI 1 "register_operand" "r")		  (ltu:SI (match_operand:SI 2 "register_operand" "r")			  (match_operand:SI 3 "register_operand" "r"))))]  ""  "sub %2,%3,0\;subb %1,0,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (minus:SI (match_operand:SI 1 "register_operand" "r")			    (ltu:SI (match_operand:SI 2 "register_operand" "r")				    (match_operand:SI 3 "register_operand" "r")))		  (match_operand:SI 4 "register_operand" "r")))]  ""  "sub %2,%3,0\;subb %1,%4,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")]); Match only integers for op3 here.  This is used as canonical form of the; ltu pattern when op3 is an integer.  Don't match registers since we can't; make better code than the general incscc pattern.(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (match_operand:SI 1 "register_operand" "r")		  (leu:SI (match_operand:SI 2 "register_operand" "r")			  (match_operand:SI 3 "int11_operand" "I"))))]  ""  "addi %k3,%2,0\;subb %1,0,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r")	(minus:SI (minus:SI (match_operand:SI 1 "register_operand" "r")			    (leu:SI (match_operand:SI 2 "register_operand" "r")				    (match_operand:SI 3 "int11_operand" "I")))		  (match_operand:SI 4 "register_operand" "r")))]  ""  "addi %k3,%2,0\;subb %1,%4,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn "decscc"  [(set (match_operand:SI 0 "register_operand" "=r,r")	(minus:SI (match_operand:SI 1 "register_operand" "0,?r")		  (match_operator:SI 4 "comparison_operator"		     [(match_operand:SI 2 "register_operand" "r,r")		      (match_operand:SI 3 "arith11_operand" "rI,rI")])))]  ""  "@   com%I3clr,%B4 %3,%2,0\;addi -1,%0,%0   com%I3clr,%B4 %3,%2,0\;addi,tr -1,%1,%0\;copy %1,%0"  [(set_attr "type" "binary,binary")   (set_attr "length" "8,12")]); Patterns for max and min.  (There is no need for an earlyclobber in the; last alternative since the middle alternative will match if op0 == op1.)(define_insn "sminsi3"  [(set (match_operand:SI 0 "register_operand" "=r,r,r")	(smin:SI (match_operand:SI 1 "register_operand" "%0,0,r")		 (match_operand:SI 2 "arith11_operand" "r,I,M")))]  ""  "@  comclr,> %2,%0,0\;copy %2,%0  comiclr,> %2,%0,0\;ldi %2,%0  comclr,> %1,%2,%0\;copy %1,%0"[(set_attr "type" "multi,multi,multi") (set_attr "length" "8,8,8")])(define_insn "uminsi3"  [(set (match_operand:SI 0 "register_operand" "=r,r")	(umin:SI (match_operand:SI 1 "register_operand" "%0,0")		 (match_operand:SI 2 "arith11_operand" "r,I")))]  ""  "@  comclr,>> %2,%0,0\;copy %2,%0  comiclr,>> %2,%0,0\;ldi %2,%0"[(set_attr "type" "multi,multi") (set_attr "length" "8,8")])(define_insn "smaxsi3"  [(set (match_operand:SI 0 "register_operand" "=r,r,r")	(smax:SI (match_operand:SI 1 "register_operand" "%0,0,r")		 (match_operand:SI 2 "arith11_operand" "r,I,M")))]  ""  "@  comclr,< %2,%0,0\;copy %2,%0  comiclr,< %2,%0,0\;ldi %2,%0  comclr,< %1,%2,%0\;copy %1,%0"[(set_attr "type" "multi,multi,multi") (set_attr "length" "8,8,8")])(define_insn "umaxsi3"  [(set (match_operand:SI 0 "register_operand" "=r,r")	(umax:SI (match_operand:SI 1 "register_operand" "%0,0")		 (match_operand:SI 2 "arith11_operand" "r,I")))]  ""  "@  comclr,<< %2,%0,0\;copy %2,%0  comiclr,<< %2,%0,0\;ldi %2,%0"[(set_attr "type" "multi,multi") (set_attr "length" "8,8")]);;; Experimental conditional move patterns(define_expand "movsicc"  [(set (match_operand:SI 0 "register_operand" "")	(if_then_else:SI	 (match_operator 1 "comparison_operator"	    [(match_dup 4)	     (match_dup 5)])	 (match_operand:SI 2 "reg_or_cint_move_operand" "")	 (match_operand:SI 3 "reg_or_cint_move_operand" "")))]  ""  "{  enum rtx_code code = GET_CODE (operands[1]);  if (hppa_branch_type != CMP_SI)    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 (code, SImode, 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:SI 0 "register_operand" "=r,r,r,r,r")	(if_then_else:SI	 (match_operator 5 "comparison_operator"	    [(match_operand:SI 3 "register_operand" "r,r,r,r,r")	     (match_operand:SI 4 "arith11_operand" "rI,rI,rI,rI,rI")])	 (match_operand:SI 1 "reg_or_cint_move_operand" "0,r,J,N,K")	 (const_int 0)))]  ""  "@   com%I4clr,%S5 %4,%3,0\;ldi 0,%0   com%I4clr,%B5 %4,%3,%0\;copy %1,%0   com%I4clr,%B5 %4,%3,%0\;ldi %1,%0   com%I4clr,%B5 %4,%3,%0\;ldil L'%1,%0   com%I4clr,%B5 %4,%3,%0\;zdepi %Z1,%0"  [(set_attr "type" "multi,multi,multi,multi,nullshift")   (set_attr "length" "8,8,8,8,8")])(define_insn ""  [(set (match_operand:SI 0 "register_operand" "=r,r,r,r,r,r,r,r")	(if_then_else:SI	 (match_operator 5 "comparison_operator"	    [(match_operand:SI 3 "register_operand" "r,r,r,r,r,r,r,r")	     (match_operand:SI 4 "arith11_operand" "rI,rI,rI,rI,rI,rI,rI,rI")])	 (match_operand:SI 1 "reg_or_cint_move_operand" "0,0,0,0,r,J,N,K")	 (match_operand:SI 2 "reg_or_cint_move_operand" "r,J,N,K,0,0,0,0")))]  ""  "@   com%I4clr,%S5 %4,%3,0\;copy %2,%0   com%I4clr,%S5 %4,%3,0\;ldi %2,%0   com%I4clr,%S5 %4,%3,0\;ldil L'%2,%0   com%I4clr,%S5 %4,%3,0\;zdepi %Z2,%0   com%I4clr,%B5 %4,%3,0\;copy %1,%0   com%I4clr,%B5 %4,%3,0\;ldi %1,%0   com%I4clr,%B5 %4,%3,0\;ldil L'%1,%0   com%I4clr,%B5 %4,%3,0\;zdepi %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;

⌨️ 快捷键说明

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