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

📄 xtensa.md

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 MD
📖 第 1 页 / 共 5 页
字号:
  "rsqrt.s\\t%0, %2"  [(set_attr "type"	"fsqrt")   (set_attr "mode"	"SF")   (set_attr "length"	"3")]);;;;  ....................;;;;	ABSOLUTE VALUE;;;;  ....................;;(define_insn "abssi2"  [(set (match_operand:SI 0 "register_operand" "=a")	(abs:SI (match_operand:SI 1 "register_operand" "r")))]  ""  "abs\\t%0, %1"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")])(define_insn "abssf2"  [(set (match_operand:SF 0 "register_operand" "=f")	(abs:SF (match_operand:SF 1 "register_operand" "f")))]  "TARGET_HARD_FLOAT"  "abs.s\\t%0, %1"  [(set_attr "type"	"farith")   (set_attr "mode"	"SF")   (set_attr "length"	"3")]);;;;  ....................;;;;	MIN AND MAX INSTRUCTIONS;;;;  ....................;;(define_insn "sminsi3"  [(set (match_operand:SI 0 "register_operand" "=a")        (smin:SI (match_operand:SI 1 "register_operand" "%r")                 (match_operand:SI 2 "register_operand" "r")))]  "TARGET_MINMAX"  "min\\t%0, %1, %2"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")])(define_insn "uminsi3"  [(set (match_operand:SI 0 "register_operand" "=a")        (umin:SI (match_operand:SI 1 "register_operand" "%r")                 (match_operand:SI 2 "register_operand" "r")))]  "TARGET_MINMAX"  "minu\\t%0, %1, %2"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")])(define_insn "smaxsi3"  [(set (match_operand:SI 0 "register_operand" "=a")        (smax:SI (match_operand:SI 1 "register_operand" "%r")                 (match_operand:SI 2 "register_operand" "r")))]  "TARGET_MINMAX"  "max\\t%0, %1, %2"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")])(define_insn "umaxsi3"  [(set (match_operand:SI 0 "register_operand" "=a")        (umax:SI (match_operand:SI 1 "register_operand" "%r")                 (match_operand:SI 2 "register_operand" "r")))]  "TARGET_MINMAX"  "maxu\\t%0, %1, %2"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")]);;;;  ....................;;;;	FIND FIRST BIT INSTRUCTION;;;;  ....................;;(define_expand "ffssi2"  [(set (match_operand:SI 0 "register_operand" "")	(ffs:SI (match_operand:SI 1 "register_operand" "")))]  "TARGET_NSA"  "{  rtx temp = gen_reg_rtx (SImode);  emit_insn (gen_negsi2 (temp, operands[1]));  emit_insn (gen_andsi3 (temp, temp, operands[1]));  emit_insn (gen_nsau (temp, temp));  emit_insn (gen_negsi2 (temp, temp));  emit_insn (gen_addsi3 (operands[0], temp, GEN_INT (32)));  DONE;}");; there is no RTL operator corresponding to NSAU(define_insn "nsau"  [(set (match_operand:SI 0 "register_operand" "=a")	(unspec:SI [(match_operand:SI 1 "register_operand" "r")] UNSPEC_NSAU))]  "TARGET_NSA"  "nsau\\t%0, %1"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")]);;;;  ....................;;;;	NEGATION and ONE'S COMPLEMENT;;;;  ....................;;(define_insn "negsi2"  [(set (match_operand:SI 0 "register_operand" "=a")	(neg:SI (match_operand:SI 1 "register_operand" "r")))]  ""  "neg\\t%0, %1"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")])(define_expand "one_cmplsi2"  [(set (match_operand:SI 0 "register_operand" "")	(not:SI (match_operand:SI 1 "register_operand" "")))]  ""  "{  rtx temp = gen_reg_rtx (SImode);  emit_insn (gen_movsi (temp, constm1_rtx));  emit_insn (gen_xorsi3 (operands[0], temp, operands[1]));  DONE;}")(define_insn "negsf2"  [(set (match_operand:SF 0 "register_operand" "=f")	(neg:SF (match_operand:SF 1 "register_operand" "f")))]  "TARGET_HARD_FLOAT"  "neg.s\\t%0, %1"  [(set_attr "type"	"farith")   (set_attr "mode"	"SF")   (set_attr "length"	"3")]);;;;  ....................;;;;	LOGICAL;;;;  ....................;;(define_insn "andsi3"  [(set (match_operand:SI 0 "register_operand" "=a,a")	(and:SI (match_operand:SI 1 "register_operand" "%r,r")		(match_operand:SI 2 "mask_operand" "P,r")))]  ""  "@   extui\\t%0, %1, 0, %K2   and\\t%0, %1, %2"  [(set_attr "type"	"arith,arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3,3")])(define_insn "iorsi3"  [(set (match_operand:SI 0 "register_operand" "=a")	(ior:SI (match_operand:SI 1 "register_operand" "%r")		(match_operand:SI 2 "register_operand" "r")))]  ""  "or\\t%0, %1, %2"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")])(define_insn "xorsi3"  [(set (match_operand:SI 0 "register_operand" "=a")	(xor:SI (match_operand:SI 1 "register_operand" "%r")		(match_operand:SI 2 "register_operand" "r")))]  ""  "xor\\t%0, %1, %2"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")]);;;;  ....................;;;;	ZERO EXTENSION;;;;  ....................;;(define_insn "zero_extendhisi2"  [(set (match_operand:SI 0 "register_operand" "=a,a")	(zero_extend:SI (match_operand:HI 1 "nonimmed_operand" "r,U")))]  ""  "@   extui\\t%0, %1, 0, 16   l16ui\\t%0, %1"  [(set_attr "type"	"arith,load")   (set_attr "mode"	"SI")   (set_attr "length"	"3,3")])(define_insn "zero_extendqisi2"  [(set (match_operand:SI 0 "register_operand" "=a,a")	(zero_extend:SI (match_operand:QI 1 "nonimmed_operand" "r,U")))]  ""  "@   extui\\t%0, %1, 0, 8   l8ui\\t%0, %1"  [(set_attr "type"	"arith,load")   (set_attr "mode"	"SI")   (set_attr "length"	"3,3")]);;;;  ....................;;;;	SIGN EXTENSION;;;;  ....................;;(define_expand "extendhisi2"  [(set (match_operand:SI 0 "register_operand" "")	(sign_extend:SI (match_operand:HI 1 "register_operand" "")))]  ""  "{  if (sext_operand (operands[1], HImode))    emit_insn (gen_extendhisi2_internal (operands[0], operands[1]));  else    xtensa_extend_reg (operands[0], operands[1]);  DONE;}")(define_insn "extendhisi2_internal"  [(set (match_operand:SI 0 "register_operand" "=B,a")	(sign_extend:SI (match_operand:HI 1 "sext_operand" "r,U")))]  ""  "@   sext\\t%0, %1, 15   l16si\\t%0, %1"  [(set_attr "type"	"arith,load")   (set_attr "mode"	"SI")   (set_attr "length"	"3,3")])(define_expand "extendqisi2"  [(set (match_operand:SI 0 "register_operand" "")	(sign_extend:SI (match_operand:QI 1 "register_operand" "")))]  ""  "{  if (TARGET_SEXT)    {      emit_insn (gen_extendqisi2_internal (operands[0], operands[1]));      DONE;    }  xtensa_extend_reg (operands[0], operands[1]);  DONE;}")(define_insn "extendqisi2_internal"  [(set (match_operand:SI 0 "register_operand" "=B")	(sign_extend:SI (match_operand:QI 1 "register_operand" "r")))]  "TARGET_SEXT"  "sext\\t%0, %1, 7"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")]);;;;  ....................;;;;	FIELD EXTRACT;;;;  ....................;;(define_expand "extv"  [(set (match_operand:SI 0 "register_operand" "")	(sign_extract:SI (match_operand:SI 1 "register_operand" "")			 (match_operand:SI 2 "const_int_operand" "")			 (match_operand:SI 3 "const_int_operand" "")))]  "TARGET_SEXT"  "{  if (!sext_fldsz_operand (operands[2], SImode)) FAIL;  /* we could expand to a right shift followed by sext but that's     no better than the standard left and right shift sequence */  if (!lsbitnum_operand (operands[3], SImode)) FAIL;  emit_insn (gen_extv_internal (operands[0], operands[1],				operands[2], operands[3]));  DONE;}")(define_insn "extv_internal"  [(set (match_operand:SI 0 "register_operand" "=a")	(sign_extract:SI (match_operand:SI 1 "register_operand" "r")			 (match_operand:SI 2 "sext_fldsz_operand" "i")			 (match_operand:SI 3 "lsbitnum_operand" "i")))]  "TARGET_SEXT"  "*{  int fldsz = INTVAL (operands[2]);  operands[2] = GEN_INT (fldsz - 1);  return \"sext\\t%0, %1, %2\";}"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")])(define_expand "extzv"  [(set (match_operand:SI 0 "register_operand" "")	(zero_extract:SI (match_operand:SI 1 "register_operand" "")			 (match_operand:SI 2 "const_int_operand" "")			 (match_operand:SI 3 "const_int_operand" "")))]  ""  "{  if (!extui_fldsz_operand (operands[2], SImode)) FAIL;  emit_insn (gen_extzv_internal (operands[0], operands[1],				 operands[2], operands[3]));  DONE;}")(define_insn "extzv_internal"  [(set (match_operand:SI 0 "register_operand" "=a")	(zero_extract:SI (match_operand:SI 1 "register_operand" "r")			 (match_operand:SI 2 "extui_fldsz_operand" "i")			 (match_operand:SI 3 "const_int_operand" "i")))]  ""  "*{  int shift;  if (BITS_BIG_ENDIAN)    shift = (32 - (INTVAL (operands[2]) + INTVAL (operands[3]))) & 0x1f;  else    shift = INTVAL (operands[3]) & 0x1f;  operands[3] = GEN_INT (shift);  return \"extui\\t%0, %1, %3, %2\";}"  [(set_attr "type"	"arith")   (set_attr "mode"	"SI")   (set_attr "length"	"3")]);;;;  ....................;;;;	CONVERSIONS;;;;  ....................;;(define_insn "fix_truncsfsi2"  [(set (match_operand:SI 0 "register_operand" "=a")	(fix:SI (match_operand:SF 1 "register_operand" "f")))]  "TARGET_HARD_FLOAT"  "trunc.s\\t%0, %1, 0"  [(set_attr "type"	"fconv")   (set_attr "mode"	"SF")   (set_attr "length"	"3")])(define_insn "fixuns_truncsfsi2"  [(set (match_operand:SI 0 "register_operand" "=a")	(unsigned_fix:SI (match_operand:SF 1 "register_operand" "f")))]  "TARGET_HARD_FLOAT"  "utrunc.s %0, %1, 0"  [(set_attr "type"	"fconv")   (set_attr "mode"	"SF")   (set_attr "length"	"3")])(define_insn "floatsisf2"  [(set (match_operand:SF 0 "register_operand" "=f")	(float:SF (match_operand:SI 1 "register_operand" "a")))]  "TARGET_HARD_FLOAT"  "float.s\\t%0, %1, 0"  [(set_attr "type"	"fconv")   (set_attr "mode"	"SF")   (set_attr "length"	"3")])(define_insn "floatunssisf2"  [(set (match_operand:SF 0 "register_operand" "=f")	(unsigned_float:SF (match_operand:SI 1 "register_operand" "a")))]  "TARGET_HARD_FLOAT"  "ufloat.s %0, %1, 0"  [(set_attr "type"	"fconv")   (set_attr "mode"	"SF")   (set_attr "length"	"3")]);;;;  ....................;;;;	DATA MOVEMENT;;;;  ....................;;;; 64-bit Integer moves(define_expand "movdi"  [(set (match_operand:DI 0 "nonimmed_operand" "")	(match_operand:DI 1 "general_operand" ""))]  ""  "{  if (CONSTANT_P (operands[1]))    {      rtx src0, src1, dst0, dst1;      if ((dst0 = operand_subword (operands[0], 0, 1, DImode))	  && (src0 = operand_subword (operands[1], 0, 1, DImode))	  && (dst1 = operand_subword (operands[0], 1, 1, DImode))	  && (src1 = operand_subword (operands[1], 1, 1, DImode)))	{	  emit_insn (gen_movsi (dst0, src0));	  emit_insn (gen_movsi (dst1, src1));	  DONE;	}      else	/* any other constant will be loaded from memory */	operands[1] = force_const_mem (DImode, operands[1]);    }  if (!(reload_in_progress | reload_completed))    {      if (!register_operand (operands[0], DImode)	  && !register_operand (operands[1], DImode))	operands[1] = force_reg (DImode, operands[1]);      if (xtensa_copy_incoming_a7 (operands, DImode))	DONE;    }}")(define_insn "movdi_internal"  [(set (match_operand:DI 0 "nonimmed_operand" "=D,D,S,a,a,a,U")	(match_operand:DI 1 "non_const_move_operand" "d,S,d,r,T,U,r"))]  "register_operand (operands[0], DImode)   || register_operand (operands[1], DImode)"  "*{  switch (which_alternative)    {    case 0: return \"mov.n\\t%0, %1\;mov.n\\t%D0, %D1\";    case 2: return \"%v0s32i.n\\t%1, %0\;s32i.n\\t%D1, %N0\";    case 3: return \"mov\\t%0, %1\;mov\\t%D0, %D1\";    case 6: return \"%v0s32i\\t%1, %0\;s32i\\t%D1, %N0\";    case 1:    case 4:    case 5:      {	/* Check if the first half of the destination register is used	   in the source address.  If so, reverse the order of the loads	   so that the source address doesn't get clobbered until it is	   no longer needed. */	rtx dstreg = operands[0];	if (GET_CODE (dstreg) == SUBREG)	  dstreg = SUBREG_REG (dstreg);	if (GET_CODE (dstreg) != REG)	  abort();	if (reg_mentioned_p (dstreg, operands[1]))	  {	    switch (which_alternative)	      {	      case 1: return \"%v1l32i.n\\t%D0, %N1\;l32i.n\\t%0, %1\";	      case 4: return \"%v1l32r\\t%D0, %N1\;l32r\\t%0, %1\";	      case 5: return \"%v1l32i\\t%D0, %N1\;l32i\\t%0, %1\";	      }	  }	else	  {	    switch (which_alternative)	      {	      case 1: return \"%v1l32i.n\\t%0, %1\;l32i.n\\t%D0, %N1\";	      case 4: return \"%v1l32r\\t%0, %1\;l32r\\t%D0, %N1\";	      case 5: return \"%v1l32i\\t%0, %1\;l32i\\t%D0, %N1\";	      }	  }      }    }  abort ();  return \"\";

⌨️ 快捷键说明

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