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

📄 i960.md

📁 早期freebsd实现
💻 MD
📖 第 1 页 / 共 5 页
字号:
		      (pc)))]  ""  "{ operands[1] = gen_compare_reg (LEU, i960_compare_op0, i960_compare_op1); }");; Now the normal branch insns (forward and reverse).(define_insn ""  [(set (pc)	(if_then_else (match_operator 0 "comparison_operator"				      [(reg:CC 36) (const_int 0)])		      (label_ref (match_operand 1 "" ""))		      (pc)))]  ""  "b%C0 %l1"  [(set_attr "type" "branch")])(define_insn ""  [(set (pc)	(if_then_else (match_operator 0 "comparison_operator"				      [(reg:CC 36) (const_int 0)])		      (pc)		      (label_ref (match_operand 1 "" ""))))]  ""  "b%I0 %l1"  [(set_attr "type" "branch")])(define_insn ""  [(set (pc)	(if_then_else (match_operator 0 "comparison_operator"				      [(reg:CC_UNS 36) (const_int 0)])		      (label_ref (match_operand 1 "" ""))		      (pc)))]  ""  "b%C0 %l1"  [(set_attr "type" "branch")])(define_insn ""  [(set (pc)	(if_then_else (match_operator 0 "comparison_operator"				      [(reg:CC_UNS 36) (const_int 0)])		      (pc)		      (label_ref (match_operand 1 "" ""))))]  ""  "b%I0 %l1"  [(set_attr "type" "branch")])(define_insn ""  [(set (pc)	(if_then_else	 (match_operator 0 "comparison_operator"			 [(match_operand:SI 1 "arith_operand" "d")			  (match_operand:SI 2 "arith_operand" "dI")])	 (label_ref (match_operand 3 "" ""))	 (pc)))]  ""  "cmp%S0%B0%R0	%2,%1,%l3"  [(set_attr "type" "branch")])(define_insn ""  [(set (pc)	(if_then_else	 (match_operator 0 "comparison_operator"			 [(match_operand:SI 1 "arith_operand" "d")			  (match_operand:SI 2 "arith_operand" "dI")])	 (pc)	 (label_ref (match_operand 3 "" ""))))]  ""  "cmp%S0%B0%X0	%2,%1,%l3"  [(set_attr "type" "branch")]);; Normal move instructions.;; This code is based on the sparc machine description.(define_expand "movsi"  [(set (match_operand:SI 0 "general_operand" "")	(match_operand:SI 1 "general_operand" ""))]  ""  "{  if (emit_move_sequence (operands, SImode))    DONE;}");; The store case can not be separate, because reload may convert a register;; to register move insn to a store (or load) insn without rerecognizing;; the insn.;; Special pattern for zero stores to memory for functions which don't use;; the arg pointer.(define_insn ""  [(set (match_operand:SI 0 "general_operand" "=d,d,d,m")	(match_operand:SI 1 "general_operand" "dI,i,m,dJ"))]  "current_function_args_size == 0   && (register_operand (operands[0], SImode)       || register_operand (operands[1], SImode)       || operands[1] == const0_rtx)"  "*{  switch (which_alternative)    {    case 0:      if (i960_last_insn_type == I_TYPE_REG && TARGET_C_SERIES)	{	  if (GET_CODE (operands[1]) == REG)	    return \"lda	(%1),%0\";	  else	    return \"lda	%1,%0\";	}      return \"mov	%1,%0\";    case 1:      return i960_output_ldconst (operands[0], operands[1]);    case 2:      return \"ld	%1,%0\";    case 3:      if (operands[1] == const0_rtx)	return \"st	g14,%0\";      return \"st	%1,%0\";          }}"  [(set_attr "type" "move,address,load,store")   (set_attr "length" "*,3,*,*")])(define_insn ""  [(set (match_operand:SI 0 "general_operand" "=d,d,d,m")	(match_operand:SI 1 "general_operand" "dI,i,m,d"))]  "current_function_args_size != 0   && (register_operand (operands[0], SImode)       || register_operand (operands[1], SImode))"  "*{  switch (which_alternative)    {    case 0:      if (i960_last_insn_type == I_TYPE_REG && TARGET_C_SERIES)	{	  if (GET_CODE (operands[1]) == REG)	    return \"lda	(%1),%0\";	  else	    return \"lda	%1,%0\";	}      return \"mov	%1,%0\";    case 1:      return i960_output_ldconst (operands[0], operands[1]);    case 2:      return \"ld	%1,%0\";    case 3:      return \"st	%1,%0\";          }}"  [(set_attr "type" "move,address,load,store")   (set_attr "length" "*,3,*,*")])(define_expand "movhi"  [(set (match_operand:HI 0 "general_operand" "")	(match_operand:HI 1 "general_operand" ""))]  ""  "{  if (emit_move_sequence (operands, HImode))    DONE;}");; Special pattern for zero stores to memory for functions which don't use;; the arg pointer.;; The store case can not be separate.  See above.(define_insn ""  [(set (match_operand:HI 0 "general_operand" "=d,d,d,m")	(match_operand:HI 1 "general_operand" "dI,i,m,dJ"))]  "current_function_args_size == 0   && (register_operand (operands[0], HImode)       || register_operand (operands[1], HImode)       || operands[1] == const0_rtx)"  "*{  switch (which_alternative)    {    case 0:      if (i960_last_insn_type == I_TYPE_REG && TARGET_C_SERIES)	{	  if (GET_CODE (operands[1]) == REG)	    return \"lda	(%1),%0\";	  else	    return \"lda	%1,%0\";	}      return \"mov	%1,%0\";    case 1:      return i960_output_ldconst (operands[0], operands[1]);    case 2:      return \"ldos	%1,%0\";    case 3:      if (operands[1] == const0_rtx)	return \"stos	g14,%0\";      return \"stos	%1,%0\";    }}"  [(set_attr "type" "move,misc,load,store")   (set_attr "length" "*,3,*,*")]);; The store case can not be separate.  See above.(define_insn ""  [(set (match_operand:HI 0 "general_operand" "=d,d,d,m")	(match_operand:HI 1 "general_operand" "dI,i,m,d"))]  "current_function_args_size != 0   && (register_operand (operands[0], HImode)       || register_operand (operands[1], HImode))"  "*{  switch (which_alternative)    {    case 0:      if (i960_last_insn_type == I_TYPE_REG && TARGET_C_SERIES)	{	  if (GET_CODE (operands[1]) == REG)	    return \"lda	(%1),%0\";	  else	    return \"lda	%1,%0\";	}      return \"mov	%1,%0\";    case 1:      return i960_output_ldconst (operands[0], operands[1]);    case 2:      return \"ldos	%1,%0\";    case 3:      return \"stos	%1,%0\";    }}"  [(set_attr "type" "move,misc,load,store")   (set_attr "length" "*,3,*,*")])(define_expand "movqi"  [(set (match_operand:QI 0 "general_operand" "")	(match_operand:QI 1 "general_operand" ""))]  ""  "{  if (emit_move_sequence (operands, QImode))    DONE;}");; The store case can not be separate.  See comment above.(define_insn ""  [(set (match_operand:QI 0 "general_operand" "=d,d,d,m")	(match_operand:QI 1 "general_operand" "dI,i,m,dJ"))]  "current_function_args_size == 0   && (register_operand (operands[0], QImode)       || register_operand (operands[1], QImode)       || operands[1] == const0_rtx)"  "*{  switch (which_alternative)    {    case 0:      if (i960_last_insn_type == I_TYPE_REG && TARGET_C_SERIES)	{	  if (GET_CODE (operands[1]) == REG)	    return \"lda	(%1),%0\";	  else	    return \"lda	%1,%0\";	}      return \"mov	%1,%0\";    case 1:      return i960_output_ldconst (operands[0], operands[1]);    case 2:      return \"ldob	%1,%0\";    case 3:      if (operands[1] == const0_rtx)	return \"stob	g14,%0\";      return \"stob	%1,%0\";    }}"  [(set_attr "type" "move,misc,load,store")   (set_attr "length" "*,3,*,*")]);; The store case can not be separate.  See comment above.(define_insn ""  [(set (match_operand:QI 0 "general_operand" "=d,d,d,m")	(match_operand:QI 1 "general_operand" "dI,i,m,d"))]  "current_function_args_size != 0   && (register_operand (operands[0], QImode)       || register_operand (operands[1], QImode))"  "*{  switch (which_alternative)    {    case 0:      if (i960_last_insn_type == I_TYPE_REG && TARGET_C_SERIES)	{	  if (GET_CODE (operands[1]) == REG)	    return \"lda	(%1),%0\";	  else	    return \"lda	%1,%0\";	}      return \"mov	%1,%0\";    case 1:      return i960_output_ldconst (operands[0], operands[1]);    case 2:      return \"ldob	%1,%0\";    case 3:      return \"stob	%1,%0\";    }}"  [(set_attr "type" "move,misc,load,store")   (set_attr "length" "*,3,*,*")])(define_expand "movdi"  [(set (match_operand:DI 0 "general_operand" "")	(match_operand:DI 1 "general_operand" ""))]  ""  "{  if (emit_move_sequence (operands, DImode))    DONE;}");; The store case can not be separate.  See comment above.(define_insn ""  [(set (match_operand:DI 0 "general_operand" "=d,d,d,m,o")	(match_operand:DI 1 "general_operand" "dI,i,m,d,J"))]  "current_function_args_size == 0   && (register_operand (operands[0], DImode)       || register_operand (operands[1], DImode)       || operands[1] == const0_rtx)"  "*{  switch (which_alternative)    {    case 0:      return \"movl	%1,%0\";    case 1:      return i960_output_ldconst (operands[0], operands[1]);    case 2:      return \"ldl	%1,%0\";    case 3:      return \"stl	%1,%0\";    case 4:      operands[1] = adj_offsettable_operand (operands[0], 4);      return \"st	g14,%0\;st	g14,%1\";    }}"  [(set_attr "type" "move,load,load,store,store")]);; The store case can not be separate.  See comment above.(define_insn ""  [(set (match_operand:DI 0 "general_operand" "=d,d,d,m")	(match_operand:DI 1 "general_operand" "dI,i,m,d"))]  "current_function_args_size != 0   && (register_operand (operands[0], DImode)       || register_operand (operands[1], DImode))"  "*{  switch (which_alternative)    {    case 0:      return \"movl	%1,%0\";    case 1:      return i960_output_ldconst (operands[0], operands[1]);    case 2:      return \"ldl	%1,%0\";    case 3:      return \"stl	%1,%0\";    }}"  [(set_attr "type" "move,load,load,store")])(define_expand "movti"  [(set (match_operand:TI 0 "general_operand" "")	(match_operand:TI 1 "general_operand" ""))]  ""  "{  if (emit_move_sequence (operands, TImode))    DONE;}");; The store case can not be separate.  See comment above.(define_insn ""  [(set (match_operand:TI 0 "general_operand" "=d,d,d,m,o")	(match_operand:TI 1 "general_operand" "dI,i,m,d,J"))]  "current_function_args_size == 0   && (register_operand (operands[0], TImode)       || register_operand (operands[1], TImode)       || operands[1] == const0_rtx)"  "*{  switch (which_alternative)    {    case 0:      return \"movq	%1,%0\";    case 1:      return i960_output_ldconst (operands[0], operands[1]);    case 2:      return \"ldq	%1,%0\";    case 3:      return \"stq	%1,%0\";    case 4:      operands[1] = adj_offsettable_operand (operands[0], 4);      operands[2] = adj_offsettable_operand (operands[0], 8);      operands[3] = adj_offsettable_operand (operands[0], 12);      return \"st	g14,%0\;st	g14,%1\;st	g14,%2\;st	g14,%3\";    }}"  [(set_attr "type" "move,load,load,store,store")]);; The store case can not be separate.  See comment above.(define_insn ""  [(set (match_operand:TI 0 "general_operand" "=d,d,d,m")	(match_operand:TI 1 "general_operand" "dI,i,m,d"))]  "current_function_args_size != 0   && (register_operand (operands[0], TImode)       || register_operand (operands[1], TImode))"  "*{  switch (which_alternative)    {    case 0:      return \"movq	%1,%0\";    case 1:      return i960_output_ldconst (operands[0], operands[1]);    case 2:      return \"ldq	%1,%0\";    case 3:      return \"stq	%1,%0\";    }}"  [(set_attr "type" "move,load,load,store")])(define_expand "store_multiple"  [(set (match_operand:SI 0 "" "")	;;- dest	(match_operand:SI 1 "" ""))	;;- src   (use (match_operand:SI 2 "" ""))]	;;- nregs  ""  "{  int regno;  int count;  rtx from;  int i;  if (GET_CODE (operands[0]) != MEM      || GET_CODE (operands[1]) != REG      || GET_CODE (operands[2]) != CONST_INT)    FAIL;  count = INTVAL (operands[2]);  if (count > 12)    FAIL;  regno = REGNO (operands[1]);  from = memory_address (SImode, XEXP (operands[0], 0));  while (count >= 4 && ((regno & 3) == 0))    {      emit_insn (gen_rtx (SET, VOIDmode,			  gen_rtx (MEM, TImode, from),			  gen_rtx (REG, TImode, regno)));      count -= 4;      regno += 4;      from = memory_address (TImode, plus_constant (from, 16));    }  while (count >= 2 && ((regno & 1) == 0))    {

⌨️ 快捷键说明

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