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

📄 arm.md

📁 linux下编程用 编译软件
💻 MD
📖 第 1 页 / 共 5 页
字号:
	(plus:SI (plus:SI (ltu:SI (reg:CC_C CC_REGNUM) (const_int 0))			  (match_operand:SI 1 "s_register_operand" "r"))		 (match_operand:SI 2 "arm_rhs_operand" "rI")))]  "TARGET_ARM"  "adc%?\\t%0, %1, %2"  [(set_attr "conds" "use")])(define_insn "*addsi3_carryin_alt3"  [(set (match_operand:SI 0 "s_register_operand" "=r")	(plus:SI (plus:SI (ltu:SI (reg:CC_C CC_REGNUM) (const_int 0))			  (match_operand:SI 2 "arm_rhs_operand" "rI"))		 (match_operand:SI 1 "s_register_operand" "r")))]  "TARGET_ARM"  "adc%?\\t%0, %1, %2"  [(set_attr "conds" "use")])(define_insn "incscc"  [(set (match_operand:SI 0 "s_register_operand" "=r,r")        (plus:SI (match_operator:SI 2 "arm_comparison_operator"                    [(match_operand:CC 3 "cc_register" "") (const_int 0)])                 (match_operand:SI 1 "s_register_operand" "0,?r")))]  "TARGET_ARM"  "@  add%d2\\t%0, %1, #1  mov%D2\\t%0, %1\;add%d2\\t%0, %1, #1"  [(set_attr "conds" "use")   (set_attr "length" "4,8")]); transform ((x << y) - 1) to ~(~(x-1) << y)  Where X is a constant.(define_split  [(set (match_operand:SI 0 "s_register_operand" "")	(plus:SI (ashift:SI (match_operand:SI 1 "const_int_operand" "")			    (match_operand:SI 2 "s_register_operand" ""))		 (const_int -1)))   (clobber (match_operand:SI 3 "s_register_operand" ""))]  "TARGET_ARM"  [(set (match_dup 3) (match_dup 1))   (set (match_dup 0) (not:SI (ashift:SI (match_dup 3) (match_dup 2))))]  "  operands[1] = GEN_INT (~(INTVAL (operands[1]) - 1));")(define_expand "addsf3"  [(set (match_operand:SF          0 "s_register_operand" "")	(plus:SF (match_operand:SF 1 "s_register_operand" "")		 (match_operand:SF 2 "arm_float_add_operand" "")))]  "TARGET_ARM && TARGET_HARD_FLOAT"  "  if (TARGET_MAVERICK      && !cirrus_fp_register (operands[2], SFmode))    operands[2] = force_reg (SFmode, operands[2]);")(define_expand "adddf3"  [(set (match_operand:DF          0 "s_register_operand" "")	(plus:DF (match_operand:DF 1 "s_register_operand" "")		 (match_operand:DF 2 "arm_float_add_operand" "")))]  "TARGET_ARM && TARGET_HARD_FLOAT"  "  if (TARGET_MAVERICK      && !cirrus_fp_register (operands[2], DFmode))    operands[2] = force_reg (DFmode, operands[2]);")(define_expand "subdi3" [(parallel   [(set (match_operand:DI            0 "s_register_operand" "")	  (minus:DI (match_operand:DI 1 "s_register_operand" "")	            (match_operand:DI 2 "s_register_operand" "")))    (clobber (reg:CC CC_REGNUM))])]  "TARGET_EITHER"  "  if (TARGET_HARD_FLOAT && TARGET_MAVERICK      && TARGET_ARM      && cirrus_fp_register (operands[0], DImode)      && cirrus_fp_register (operands[1], DImode))    {      emit_insn (gen_cirrus_subdi3 (operands[0], operands[1], operands[2]));      DONE;    }  if (TARGET_THUMB)    {      if (GET_CODE (operands[1]) != REG)        operands[1] = force_reg (SImode, operands[1]);      if (GET_CODE (operands[2]) != REG)        operands[2] = force_reg (SImode, operands[2]);     }	  ")(define_insn "*arm_subdi3"  [(set (match_operand:DI           0 "s_register_operand" "=&r,&r,&r")	(minus:DI (match_operand:DI 1 "s_register_operand" "0,r,0")		  (match_operand:DI 2 "s_register_operand" "r,0,0")))   (clobber (reg:CC CC_REGNUM))]  "TARGET_ARM"  "subs\\t%Q0, %Q1, %Q2\;sbc\\t%R0, %R1, %R2"  [(set_attr "conds" "clob")   (set_attr "length" "8")])(define_insn "*thumb_subdi3"  [(set (match_operand:DI           0 "register_operand" "=l")	(minus:DI (match_operand:DI 1 "register_operand"  "0")		  (match_operand:DI 2 "register_operand"  "l")))   (clobber (reg:CC CC_REGNUM))]  "TARGET_THUMB"  "sub\\t%Q0, %Q0, %Q2\;sbc\\t%R0, %R0, %R2"  [(set_attr "length" "4")])(define_insn "*subdi_di_zesidi"  [(set (match_operand:DI           0 "s_register_operand" "=&r,&r")	(minus:DI (match_operand:DI 1 "s_register_operand"  "?r,0")		  (zero_extend:DI		   (match_operand:SI 2 "s_register_operand"  "r,r"))))   (clobber (reg:CC CC_REGNUM))]  "TARGET_ARM"  "subs\\t%Q0, %Q1, %2\;sbc\\t%R0, %R1, #0"  [(set_attr "conds" "clob")   (set_attr "length" "8")])(define_insn "*subdi_di_sesidi"  [(set (match_operand:DI            0 "s_register_operand" "=&r,&r")	(minus:DI (match_operand:DI  1 "s_register_operand"  "r,0")		  (sign_extend:DI		   (match_operand:SI 2 "s_register_operand"  "r,r"))))   (clobber (reg:CC CC_REGNUM))]  "TARGET_ARM"  "subs\\t%Q0, %Q1, %2\;sbc\\t%R0, %R1, %2, asr #31"  [(set_attr "conds" "clob")   (set_attr "length" "8")])(define_insn "*subdi_zesidi_di"  [(set (match_operand:DI            0 "s_register_operand" "=&r,&r")	(minus:DI (zero_extend:DI		   (match_operand:SI 2 "s_register_operand"  "r,r"))		  (match_operand:DI  1 "s_register_operand" "?r,0")))   (clobber (reg:CC CC_REGNUM))]  "TARGET_ARM"  "rsbs\\t%Q0, %Q1, %2\;rsc\\t%R0, %R1, #0"  [(set_attr "conds" "clob")   (set_attr "length" "8")])(define_insn "*subdi_sesidi_di"  [(set (match_operand:DI            0 "s_register_operand" "=&r,&r")	(minus:DI (sign_extend:DI		   (match_operand:SI 2 "s_register_operand"   "r,r"))		  (match_operand:DI  1 "s_register_operand"  "?r,0")))   (clobber (reg:CC CC_REGNUM))]  "TARGET_ARM"  "rsbs\\t%Q0, %Q1, %2\;rsc\\t%R0, %R1, %2, asr #31"  [(set_attr "conds" "clob")   (set_attr "length" "8")])(define_insn "*subdi_zesidi_zesidi"  [(set (match_operand:DI            0 "s_register_operand" "=r")	(minus:DI (zero_extend:DI		   (match_operand:SI 1 "s_register_operand"  "r"))		  (zero_extend:DI		   (match_operand:SI 2 "s_register_operand"  "r"))))   (clobber (reg:CC CC_REGNUM))]  "TARGET_ARM"  "subs\\t%Q0, %1, %2\;rsc\\t%R0, %1, %1"  [(set_attr "conds" "clob")   (set_attr "length" "8")])(define_expand "subsi3"  [(set (match_operand:SI           0 "s_register_operand" "")	(minus:SI (match_operand:SI 1 "reg_or_int_operand" "")		  (match_operand:SI 2 "s_register_operand" "")))]  "TARGET_EITHER"  "  if (GET_CODE (operands[1]) == CONST_INT)    {      if (TARGET_ARM)        {          arm_split_constant (MINUS, SImode, NULL_RTX,	                      INTVAL (operands[1]), operands[0],	  		      operands[2], optimize && !no_new_pseudos);          DONE;	}      else /* TARGET_THUMB */        operands[1] = force_reg (SImode, operands[1]);    }  ")(define_insn "*thumb_subsi3_insn"  [(set (match_operand:SI           0 "register_operand" "=l")	(minus:SI (match_operand:SI 1 "register_operand" "l")		  (match_operand:SI 2 "register_operand" "l")))]  "TARGET_THUMB"  "sub\\t%0, %1, %2"  [(set_attr "length" "2")])(define_insn_and_split "*arm_subsi3_insn"  [(set (match_operand:SI           0 "s_register_operand" "=r,r")	(minus:SI (match_operand:SI 1 "reg_or_int_operand" "rI,?n")		  (match_operand:SI 2 "s_register_operand" "r,r")))]  "TARGET_ARM"  "@   rsb%?\\t%0, %2, %1   #"  "TARGET_ARM   && GET_CODE (operands[1]) == CONST_INT   && !const_ok_for_arm (INTVAL (operands[1]))"  [(clobber (const_int 0))]  "  arm_split_constant (MINUS, SImode, curr_insn,                      INTVAL (operands[1]), operands[0], operands[2], 0);  DONE;  "  [(set_attr "length" "4,16")   (set_attr "predicable" "yes")])(define_peephole2  [(match_scratch:SI 3 "r")   (set (match_operand:SI 0 "arm_general_register_operand" "")	(minus:SI (match_operand:SI 1 "const_int_operand" "")		  (match_operand:SI 2 "arm_general_register_operand" "")))]  "TARGET_ARM   && !const_ok_for_arm (INTVAL (operands[1]))   && const_ok_for_arm (~INTVAL (operands[1]))"  [(set (match_dup 3) (match_dup 1))   (set (match_dup 0) (minus:SI (match_dup 3) (match_dup 2)))]  "")(define_insn "*subsi3_compare0"  [(set (reg:CC_NOOV CC_REGNUM)	(compare:CC_NOOV	 (minus:SI (match_operand:SI 1 "arm_rhs_operand" "r,I")		   (match_operand:SI 2 "arm_rhs_operand" "rI,r"))	 (const_int 0)))   (set (match_operand:SI 0 "s_register_operand" "=r,r")	(minus:SI (match_dup 1) (match_dup 2)))]  "TARGET_ARM"  "@   sub%?s\\t%0, %1, %2   rsb%?s\\t%0, %2, %1"  [(set_attr "conds" "set")])(define_insn "decscc"  [(set (match_operand:SI            0 "s_register_operand" "=r,r")        (minus:SI (match_operand:SI  1 "s_register_operand" "0,?r")		  (match_operator:SI 2 "arm_comparison_operator"                   [(match_operand   3 "cc_register" "") (const_int 0)])))]  "TARGET_ARM"  "@   sub%d2\\t%0, %1, #1   mov%D2\\t%0, %1\;sub%d2\\t%0, %1, #1"  [(set_attr "conds" "use")   (set_attr "length" "*,8")])(define_expand "subsf3"  [(set (match_operand:SF           0 "s_register_operand" "")	(minus:SF (match_operand:SF 1 "arm_float_rhs_operand" "")		  (match_operand:SF 2 "arm_float_rhs_operand" "")))]  "TARGET_ARM && TARGET_HARD_FLOAT"  "  if (TARGET_MAVERICK)    {      if (!cirrus_fp_register (operands[1], SFmode))        operands[1] = force_reg (SFmode, operands[1]);      if (!cirrus_fp_register (operands[2], SFmode))        operands[2] = force_reg (SFmode, operands[2]);    }")(define_expand "subdf3"  [(set (match_operand:DF           0 "s_register_operand" "")	(minus:DF (match_operand:DF 1 "arm_float_rhs_operand" "")		  (match_operand:DF 2 "arm_float_rhs_operand" "")))]  "TARGET_ARM && TARGET_HARD_FLOAT"  "  if (TARGET_MAVERICK)    {       if (!cirrus_fp_register (operands[1], DFmode))         operands[1] = force_reg (DFmode, operands[1]);       if (!cirrus_fp_register (operands[2], DFmode))         operands[2] = force_reg (DFmode, operands[2]);    }");; Multiplication insns(define_expand "mulsi3"  [(set (match_operand:SI          0 "s_register_operand" "")	(mult:SI (match_operand:SI 2 "s_register_operand" "")		 (match_operand:SI 1 "s_register_operand" "")))]  "TARGET_EITHER"  "");; Use `&' and then `0' to prevent the operands 0 and 1 being the same(define_insn "*arm_mulsi3"  [(set (match_operand:SI          0 "s_register_operand" "=&r,&r")	(mult:SI (match_operand:SI 2 "s_register_operand" "r,r")		 (match_operand:SI 1 "s_register_operand" "%?r,0")))]  "TARGET_ARM"  "mul%?\\t%0, %2, %1"  [(set_attr "insn" "mul")   (set_attr "predicable" "yes")]); Unfortunately with the Thumb the '&'/'0' trick can fails when operands ; 1 and 2; are the same, because reload will make operand 0 match ; operand 1 without realizing that this conflicts with operand 2.  We fix ; this by adding another alternative to match this case, and then `reload' ; it ourselves.  This alternative must come first.(define_insn "*thumb_mulsi3"  [(set (match_operand:SI          0 "register_operand" "=&l,&l,&l")	(mult:SI (match_operand:SI 1 "register_operand" "%l,*h,0")		 (match_operand:SI 2 "register_operand" "l,l,l")))]  "TARGET_THUMB"  "*  if (which_alternative < 2)    return \"mov\\t%0, %1\;mul\\t%0, %2\";  else    return \"mul\\t%0, %2\";  "  [(set_attr "length" "4,4,2")   (set_attr "insn" "mul")])(define_insn "*mulsi3_compare0"  [(set (reg:CC_NOOV CC_REGNUM)	(compare:CC_NOOV (mult:SI			  (match_operand:SI 2 "s_register_operand" "r,r")			  (match_operand:SI 1 "s_register_operand" "%?r,0"))			 (const_int 0)))   (set (match_operand:SI 0 "s_register_operand" "=&r,&r")	(mult:SI (match_dup 2) (match_dup 1)))]  "TARGET_ARM"  "mul%?s\\t%0, %2, %1"  [(set_attr "conds" "set")   (set_attr "insn" "muls")])(define_insn "*mulsi_compare0_scratch"  [(set (reg:CC_NOOV CC_REGNUM)	(compare:CC_NOOV (mult:SI			  (match_operand:SI 2 "s_register_operand" "r,r")			  (match_operand:SI 1 "s_register_operand" "%?r,0"))			 (const_int 0)))   (clobber (match_scratch:SI 0 "=&r,&r"))]  "TARGET_ARM"  "mul%?s\\t%0, %2, %1"  [(set_attr "conds" "set")   (set_attr "insn" "muls")]);; Unnamed templates to match MLA instruction.(define_insn "*mulsi3addsi"  [(set (match_operand:SI 0 "s_register_operand" "=&r,&r,&r,&r")	(plus:SI	  (mult:SI (match_operand:SI 2 "s_register_operand" "r,r,r,r")		   (match_operand:SI 1 "s_register_operand" "%r,0,r,0"))	  (match_operand:SI 3 "s_register_operand" "?r,r,0,0")))]  "TARGET_ARM"  "mla%?\\t%0, %2, %1, %3"  [(set_attr "insn" "mla")   (set_attr "predicable" "yes")])

⌨️ 快捷键说明

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