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

📄 rs6000.md

📁 linux下编程用 编译软件
💻 MD
📖 第 1 页 / 共 5 页
字号:
	(compare:CC (sign_extend:SI (match_operand:HI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r,r")	(sign_extend:SI (match_dup 1)))]  ""  "@   {exts.|extsh.} %0,%1   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")	(compare:CC (sign_extend:SI (match_operand:HI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "")	(sign_extend:SI (match_dup 1)))]  "reload_completed"  [(set (match_dup 0)	(sign_extend:SI (match_dup 1)))   (set (match_dup 2)	(compare:CC (match_dup 0)		    (const_int 0)))]  "");; Fixed-point arithmetic insns.(define_expand "add<mode>3"  [(set (match_operand:SDI 0 "gpc_reg_operand" "")	(plus:SDI (match_operand:SDI 1 "gpc_reg_operand" "")		  (match_operand:SDI 2 "reg_or_add_cint_operand" "")))]  ""  "{  if (<MODE>mode == DImode && ! TARGET_POWERPC64)    {      if (non_short_cint_operand (operands[2], DImode))	FAIL;    }  else if (GET_CODE (operands[2]) == CONST_INT	   && ! add_operand (operands[2], <MODE>mode))    {      rtx tmp = ((no_new_pseudos || rtx_equal_p (operands[0], operands[1]))		 ? operands[0] : gen_reg_rtx (<MODE>mode));      HOST_WIDE_INT val = INTVAL (operands[2]);      HOST_WIDE_INT low = ((val & 0xffff) ^ 0x8000) - 0x8000;      HOST_WIDE_INT rest = trunc_int_for_mode (val - low, <MODE>mode);      if (<MODE>mode == DImode && !CONST_OK_FOR_LETTER_P (rest, 'L'))	FAIL;      /* The ordering here is important for the prolog expander.	 When space is allocated from the stack, adding 'low' first may	 produce a temporary deallocation (which would be bad).  */      emit_insn (gen_add<mode>3 (tmp, operands[1], GEN_INT (rest)));      emit_insn (gen_add<mode>3 (operands[0], tmp, GEN_INT (low)));      DONE;    }}");; Discourage ai/addic because of carry but provide it in an alternative;; allowing register zero as source.(define_insn "*add<mode>3_internal1"  [(set (match_operand:GPR 0 "gpc_reg_operand" "=r,r,?r,r")	(plus:GPR (match_operand:GPR 1 "gpc_reg_operand" "%r,b,r,b")		  (match_operand:GPR 2 "add_operand" "r,I,I,L")))]  ""  "@   {cax|add} %0,%1,%2   {cal %0,%2(%1)|addi %0,%1,%2}   {ai|addic} %0,%1,%2   {cau|addis} %0,%1,%v2"  [(set_attr "length" "4,4,4,4")])(define_insn "addsi3_high"  [(set (match_operand:SI 0 "gpc_reg_operand" "=b")        (plus:SI (match_operand:SI 1 "gpc_reg_operand" "b")                 (high:SI (match_operand 2 "" ""))))]  "TARGET_MACHO && !TARGET_64BIT"  "{cau|addis} %0,%1,ha16(%2)"  [(set_attr "length" "4")])(define_insn "*add<mode>3_internal2"  [(set (match_operand:CC 0 "cc_reg_operand" "=x,x,?y,?y")	(compare:CC (plus:P (match_operand:P 1 "gpc_reg_operand" "%r,r,r,r")			    (match_operand:P 2 "reg_or_short_operand" "r,I,r,I"))		    (const_int 0)))   (clobber (match_scratch:P 3 "=r,r,r,r"))]  ""  "@   {cax.|add.} %3,%1,%2   {ai.|addic.} %3,%1,%2   #   #"  [(set_attr "type" "fast_compare,compare,compare,compare")   (set_attr "length" "4,4,8,8")])(define_split  [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")	(compare:CC (plus:GPR (match_operand:GPR 1 "gpc_reg_operand" "")			      (match_operand:GPR 2 "reg_or_short_operand" ""))		    (const_int 0)))   (clobber (match_scratch:GPR 3 ""))]  "reload_completed"  [(set (match_dup 3)	(plus:GPR (match_dup 1)		 (match_dup 2)))   (set (match_dup 0)	(compare:CC (match_dup 3)		    (const_int 0)))]  "")(define_insn "*add<mode>3_internal3"  [(set (match_operand:CC 3 "cc_reg_operand" "=x,x,?y,?y")	(compare:CC (plus:P (match_operand:P 1 "gpc_reg_operand" "%r,r,r,r")			    (match_operand:P 2 "reg_or_short_operand" "r,I,r,I"))		    (const_int 0)))   (set (match_operand:P 0 "gpc_reg_operand" "=r,r,r,r")	(plus:P (match_dup 1)		(match_dup 2)))]  ""  "@   {cax.|add.} %0,%1,%2   {ai.|addic.} %0,%1,%2   #   #"  [(set_attr "type" "fast_compare,compare,compare,compare")   (set_attr "length" "4,4,8,8")])(define_split  [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "")	(compare:CC (plus:P (match_operand:P 1 "gpc_reg_operand" "")			    (match_operand:P 2 "reg_or_short_operand" ""))		    (const_int 0)))   (set (match_operand:P 0 "gpc_reg_operand" "")	(plus:P (match_dup 1) (match_dup 2)))]  "reload_completed"  [(set (match_dup 0)	(plus:P (match_dup 1)		(match_dup 2)))   (set (match_dup 3)	(compare:CC (match_dup 0)		    (const_int 0)))]  "");; Split an add that we can't do in one insn into two insns, each of which;; does one 16-bit part.  This is used by combine.  Note that the low-order;; add should be last in case the result gets used in an address.(define_split  [(set (match_operand:GPR 0 "gpc_reg_operand" "")	(plus:GPR (match_operand:GPR 1 "gpc_reg_operand" "")		  (match_operand:GPR 2 "non_add_cint_operand" "")))]  ""  [(set (match_dup 0) (plus:GPR (match_dup 1) (match_dup 3)))   (set (match_dup 0) (plus:GPR (match_dup 0) (match_dup 4)))]"{  HOST_WIDE_INT val = INTVAL (operands[2]);  HOST_WIDE_INT low = ((val & 0xffff) ^ 0x8000) - 0x8000;  HOST_WIDE_INT rest = trunc_int_for_mode (val - low, <MODE>mode);  operands[4] = GEN_INT (low);  if (<MODE>mode == SImode || CONST_OK_FOR_LETTER_P (rest, 'L'))    operands[3] = GEN_INT (rest);  else if (! no_new_pseudos)    {      operands[3] = gen_reg_rtx (DImode);      emit_move_insn (operands[3], operands[2]);      emit_insn (gen_adddi3 (operands[0], operands[1], operands[3]));      DONE;    }  else    FAIL;}")(define_insn "one_cmpl<mode>2"  [(set (match_operand:GPR 0 "gpc_reg_operand" "=r")	(not:GPR (match_operand:GPR 1 "gpc_reg_operand" "r")))]  ""  "nor %0,%1,%1")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")	(compare:CC (not:P (match_operand:P 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (clobber (match_scratch:P 2 "=r,r"))]  ""  "@   nor. %2,%1,%1   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")	(compare:CC (not:P (match_operand:P 1 "gpc_reg_operand" ""))		    (const_int 0)))   (clobber (match_scratch:P 2 ""))]  "reload_completed"  [(set (match_dup 2)	(not:P (match_dup 1)))   (set (match_dup 0)	(compare:CC (match_dup 2)		    (const_int 0)))]  "")(define_insn ""  [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")	(compare:CC (not:P (match_operand:P 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (set (match_operand:P 0 "gpc_reg_operand" "=r,r")	(not:P (match_dup 1)))]  ""  "@   nor. %0,%1,%1   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")	(compare:CC (not:P (match_operand:P 1 "gpc_reg_operand" ""))		    (const_int 0)))   (set (match_operand:P 0 "gpc_reg_operand" "")	(not:P (match_dup 1)))]  "reload_completed"  [(set (match_dup 0)	(not:P (match_dup 1)))   (set (match_dup 2)	(compare:CC (match_dup 0)		    (const_int 0)))]  "")(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r")	(minus:SI (match_operand:SI 1 "reg_or_short_operand" "rI")		  (match_operand:SI 2 "gpc_reg_operand" "r")))]  "! TARGET_POWERPC"  "{sf%I1|subf%I1c} %0,%2,%1")(define_insn ""  [(set (match_operand:GPR 0 "gpc_reg_operand" "=r,r")	(minus:GPR (match_operand:GPR 1 "reg_or_short_operand" "r,I")		   (match_operand:GPR 2 "gpc_reg_operand" "r,r")))]  "TARGET_POWERPC"  "@   subf %0,%2,%1   subfic %0,%2,%1")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")	(compare:CC (minus:SI (match_operand:SI 1 "gpc_reg_operand" "r,r")			      (match_operand:SI 2 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (clobber (match_scratch:SI 3 "=r,r"))]  "! TARGET_POWERPC"  "@   {sf.|subfc.} %3,%2,%1   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")	(compare:CC (minus:P (match_operand:P 1 "gpc_reg_operand" "r,r")			     (match_operand:P 2 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (clobber (match_scratch:P 3 "=r,r"))]  "TARGET_POWERPC"  "@   subf. %3,%2,%1   #"  [(set_attr "type" "fast_compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")	(compare:CC (minus:P (match_operand:P 1 "gpc_reg_operand" "")			     (match_operand:P 2 "gpc_reg_operand" ""))		    (const_int 0)))   (clobber (match_scratch:P 3 ""))]  "reload_completed"  [(set (match_dup 3)	(minus:P (match_dup 1)		  (match_dup 2)))   (set (match_dup 0)	(compare:CC (match_dup 3)		    (const_int 0)))]  "")(define_insn ""  [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y")	(compare:CC (minus:SI (match_operand:SI 1 "gpc_reg_operand" "r,r")			      (match_operand:SI 2 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (set (match_operand:SI 0 "gpc_reg_operand" "=r,r")	(minus:SI (match_dup 1) (match_dup 2)))]  "! TARGET_POWERPC"  "@   {sf.|subfc.} %0,%2,%1   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_insn ""  [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y")	(compare:CC (minus:P (match_operand:P 1 "gpc_reg_operand" "r,r")			     (match_operand:P 2 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (set (match_operand:P 0 "gpc_reg_operand" "=r,r")	(minus:P (match_dup 1)		  (match_dup 2)))]  "TARGET_POWERPC"  "@   subf. %0,%2,%1   #"  [(set_attr "type" "fast_compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "")	(compare:CC (minus:P (match_operand:P 1 "gpc_reg_operand" "")			     (match_operand:P 2 "gpc_reg_operand" ""))		    (const_int 0)))   (set (match_operand:P 0 "gpc_reg_operand" "")	(minus:P (match_dup 1)		  (match_dup 2)))]  "reload_completed"  [(set (match_dup 0)	(minus:P (match_dup 1)		  (match_dup 2)))   (set (match_dup 3)	(compare:CC (match_dup 0)		    (const_int 0)))]  "")(define_expand "sub<mode>3"  [(set (match_operand:SDI 0 "gpc_reg_operand" "")	(minus:SDI (match_operand:SDI 1 "reg_or_short_operand" "")		   (match_operand:SDI 2 "reg_or_sub_cint_operand" "")))]  ""  "{  if (GET_CODE (operands[2]) == CONST_INT)    {      emit_insn (gen_add<mode>3 (operands[0], operands[1],				 negate_rtx (<MODE>mode, operands[2])));      DONE;    }}");; For SMIN, SMAX, UMIN, and UMAX, we use DEFINE_EXPAND's that involve a doz[i];; instruction and some auxiliary computations.  Then we just have a single;; DEFINE_INSN for doz[i] and the define_splits to make them if made by;; combine.(define_expand "sminsi3"  [(set (match_dup 3)	(if_then_else:SI (gt:SI (match_operand:SI 1 "gpc_reg_operand" "")				(match_operand:SI 2 "reg_or_short_operand" ""))			 (const_int 0)			 (minus:SI (match_dup 2) (match_dup 1))))   (set (match_operand:SI 0 "gpc_reg_operand" "")	(minus:SI (match_dup 2) (match_dup 3)))]  "TARGET_POWER || TARGET_ISEL"  "{  if (TARGET_ISEL)    {      operands[2] = force_reg (SImode, operands[2]);      rs6000_emit_minmax (operands[0], SMIN, operands[1], operands[2]);      DONE;    }  operands[3] = gen_reg_rtx (SImode);}")(define_split  [(set (match_operand:SI 0 "gpc_reg_operand" "")	(smin:SI (match_operand:SI 1 "gpc_reg_operand" "")		 (match_operand:SI 2 "reg_or_short_operand" "")))   (clobber (match_operand:SI 3 "gpc_reg_operand" ""))]  "TARGET_POWER"  [(set (match_dup 3)	(if_then_else:SI (gt:SI (match_dup 1) (match_dup 2))			 (const_int 0)			 (minus:SI (match_dup 2) (match_dup 1))))   (set (match_dup 0) (minus:SI (match_dup 2) (match_dup 3)))]  "")(define_expand "smaxsi3"  [(set (match_dup 3)	(if_then_else:SI (gt:SI (match_operand:SI 1 "gpc_reg_operand" "")				(match_operand:SI 2 "reg_or_short_operand" ""))			 (const_int 0)			 (minus:SI (match_dup 2) (match_dup 1))))   (set (match_operand:SI 0 "gpc_reg_operand" "")	(plus:SI (match_dup 3) (match_dup 1)))]  "TARGET_POWER || TARGET_ISEL"  "{  if (TARGET_ISEL)    {      operands[2] = force_reg (SImode, operands[2]);      rs6000_emit_minmax (operands[0], SMAX, operands[1], operands[2]);      DONE;    }  operands[3] = gen_reg_rtx (SImode);}")(define_split  [(set (match_operand:SI 0 "gpc_reg_operand" "")	(smax:SI (match_operand:SI 1 "gpc_reg_operand" "")		 (match_operand:SI 2 "reg_or_short_operand" "")))   (clobber (match_operand:SI 3 "gpc_reg_operand" ""))]  "TARGET_POWER"  [(set (match_dup 3)	(if_then_else:SI (gt:SI (match_dup 1) (match_dup 2))			 (const_int 0)			 (minus:SI (match_dup 2) (match_dup 1))))   (set (match_dup 0) (plus:SI (match_dup 3) (match_dup 1)))]  "")(define_expand "uminsi3"  [(set (match_dup 3) (xor:SI (match_operand:SI 1 "gpc_reg_operand" "")			      (match_dup 5)))   (set (match_dup 4) (xor:SI (match_operand:SI 2 "gpc_reg_operand" "")			      (match_dup 5)))   (set (match_dup 3) (if_then_else:SI (gt (match_dup 3) (match_dup 4))				       (const_int 0)				       (minus:SI (match_dup 4) (match_dup 3))))   (set (match_operand:SI 0 "gpc_reg_operand" "")	(minus:SI (match_dup 2) (match_dup 3)))]

⌨️ 快捷键说明

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