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

📄 pa.md

📁 gcc3.2.1源代码
💻 MD
📖 第 1 页 / 共 5 页
字号:
(define_expand "cmpsf"  [(set (reg:CCFP 0)	(compare:CCFP (match_operand:SF 0 "reg_or_0_operand" "")		      (match_operand:SF 1 "reg_or_0_operand" "")))]  "! TARGET_SOFT_FLOAT"  "{  hppa_compare_op0 = operands[0];  hppa_compare_op1 = operands[1];  hppa_branch_type = CMP_SF;  DONE;}")(define_expand "cmpdf"  [(set (reg:CCFP 0)      (compare:CCFP (match_operand:DF 0 "reg_or_0_operand" "")                    (match_operand:DF 1 "reg_or_0_operand" "")))]  "! TARGET_SOFT_FLOAT"  "{  hppa_compare_op0 = operands[0];  hppa_compare_op1 = operands[1];  hppa_branch_type = CMP_DF;  DONE;}")(define_insn ""  [(set (reg:CCFP 0)	(match_operator:CCFP 2 "comparison_operator"			     [(match_operand:SF 0 "reg_or_0_operand" "fG")			      (match_operand:SF 1 "reg_or_0_operand" "fG")]))]  "! TARGET_SOFT_FLOAT"  "fcmp,sgl,%Y2 %f0,%f1"  [(set_attr "length" "4")   (set_attr "type" "fpcc")])(define_insn ""  [(set (reg:CCFP 0)	(match_operator:CCFP 2 "comparison_operator"			     [(match_operand:DF 0 "reg_or_0_operand" "fG")			      (match_operand:DF 1 "reg_or_0_operand" "fG")]))]  "! TARGET_SOFT_FLOAT"  "fcmp,dbl,%Y2 %f0,%f1"  [(set_attr "length" "4")   (set_attr "type" "fpcc")]);; scc insns.(define_expand "seq"  [(set (match_operand:SI 0 "register_operand" "")	(eq:SI (match_dup 1)	       (match_dup 2)))]  "!TARGET_64BIT"  "{  /* fp scc patterns rarely match, and are not a win on the PA.  */  if (hppa_branch_type != CMP_SI)    FAIL;  /* set up operands from compare.  */  operands[1] = hppa_compare_op0;  operands[2] = hppa_compare_op1;  /* fall through and generate default code */}")(define_expand "sne"  [(set (match_operand:SI 0 "register_operand" "")	(ne:SI (match_dup 1)	       (match_dup 2)))]  "!TARGET_64BIT"  "{  /* 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)))]  "!TARGET_64BIT"  "{  /* 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)))]  "!TARGET_64BIT"  "{  /* 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)))]  "!TARGET_64BIT"  "{  /* 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)))]  "!TARGET_64BIT"  "{  /* 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)))]  "!TARGET_64BIT"  "{  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)))]  "!TARGET_64BIT"  "{  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)))]  "!TARGET_64BIT"  "{  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)))]  "!TARGET_64BIT"  "{  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|cmp%I2clr},%B3 %2,%1,%0\;ldi 1,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r")	(match_operator:DI 3 "comparison_operator"			   [(match_operand:DI 1 "register_operand" "r")			    (match_operand:DI 2 "arith11_operand" "rI")]))]  "TARGET_64BIT"  "cmp%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|cmp%I2clr},%S3 %2,%1,%%r0\;{com%I5clr|cmp%I5clr},%B6 %5,%4,%0\;ldi 1,%0"  [(set_attr "type" "binary")   (set_attr "length" "12")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r")	(ior:DI (match_operator:DI 3 "comparison_operator"				   [(match_operand:DI 1 "register_operand" "r")				    (match_operand:DI 2 "arith11_operand" "rI")])		(match_operator:DI 6 "comparison_operator"				   [(match_operand:DI 4 "register_operand" "r")				    (match_operand:DI 5 "arith11_operand" "rI")])))]  "TARGET_64BIT"  "cmp%I2clr,*%S3 %2,%1,%%r0\;cmp%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|cmp%I2clr},%B3 %2,%1,%0\;ldi -1,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r")	(neg:DI (match_operator:DI 3 "comparison_operator"	       [(match_operand:DI 1 "register_operand" "r")		(match_operand:DI 2 "arith11_operand" "rI")])))]  "TARGET_64BIT"  "cmp%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,%%r0\;{addc|add,c} %%r0,%1,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r")	(plus:DI (leu:DI (match_operand:DI 2 "register_operand" "r")			 (match_operand:DI 3 "arith11_operand" "rI"))		 (match_operand:DI 1 "register_operand" "r")))]  "TARGET_64BIT"  "sub%I3 %3,%2,%%r0\;add,dc %%r0,%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,%%r0\;{addc|add,c} %%r0,%1,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r")	(plus:DI (geu:DI (match_operand:DI 2 "register_operand" "r")			 (match_operand:DI 3 "register_operand" "r"))		 (match_operand:DI 1 "register_operand" "r")))]  "TARGET_64BIT"  "sub %2,%3,%%r0\;add,dc %%r0,%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,%%r0\;{addc|add,c} %%r0,%1,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r")	(plus:DI (gtu:DI (match_operand:DI 2 "register_operand" "r")			 (match_operand:DI 3 "int11_operand" "I"))		 (match_operand:DI 1 "register_operand" "r")))]  "TARGET_64BIT"  "addi %k3,%2,%%r0\;add,dc %%r0,%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|cmp%I3clr},%B4 %3,%2,%%r0\;addi 1,%0,%0   {com%I3clr|cmp%I3clr},%B4 %3,%2,%%r0\;addi,tr 1,%1,%0\;copy %1,%0"  [(set_attr "type" "binary,binary")   (set_attr "length" "8,12")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r,r") 	(plus:DI (match_operator:DI 4 "comparison_operator"		    [(match_operand:DI 2 "register_operand" "r,r")		     (match_operand:DI 3 "arith11_operand" "rI,rI")])		 (match_operand:DI 1 "register_operand" "0,?r")))]  "TARGET_64BIT"  "@   cmp%I3clr,*%B4 %3,%2,%%r0\;addi 1,%0,%0   cmp%I3clr,*%B4 %3,%2,%%r0\;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,%%r0\;{subb|sub,b} %1,%%r0,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r")	(minus:DI (match_operand:DI 1 "register_operand" "r")		  (gtu:DI (match_operand:DI 2 "register_operand" "r")			  (match_operand:DI 3 "arith11_operand" "rI"))))]  "TARGET_64BIT"  "sub%I3 %3,%2,%%r0\;sub,db %1,%%r0,%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,%%r0\;{subb|sub,b} %1,%4,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r")	(minus:DI (minus:DI (match_operand:DI 1 "register_operand" "r")			    (gtu:DI (match_operand:DI 2 "register_operand" "r")				    (match_operand:DI 3 "arith11_operand" "rI")))		  (match_operand:DI 4 "register_operand" "r")))]  "TARGET_64BIT"  "sub%I3 %3,%2,%%r0\;sub,db %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,%%r0\;{subb|sub,b} %1,%%r0,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r")	(minus:DI (match_operand:DI 1 "register_operand" "r")		  (ltu:DI (match_operand:DI 2 "register_operand" "r")			  (match_operand:DI 3 "register_operand" "r"))))]  "TARGET_64BIT"  "sub %2,%3,%%r0\;sub,db %1,%%r0,%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,%%r0\;{subb|sub,b} %1,%4,%0"  [(set_attr "type" "binary")   (set_attr "length" "8")])(define_insn ""  [(set (match_operand:DI 0 "register_operand" "=r")	(minus:DI (minus:DI (match_operand:DI 1 "register_operand" "r")			    (ltu:DI (match_operand:DI 2 "register_operand" "r")				    (match_operand:DI 3 "register_operand" "r")))		  (match_operand:DI 4 "register_operand" "r")))]  "TARGET_64BIT"  "sub %2,%3,%%r0\;sub,db %1,%4,%0"  [(set_attr "type" "binary")

⌨️ 快捷键说明

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