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

📄 m32r.c

📁 gcc编译工具没有什么特别
💻 C
📖 第 1 页 / 共 5 页
字号:
intsymbolic_operand (op, int_mode)     rtx op;     int int_mode;{  switch (GET_CODE (op))    {    case SYMBOL_REF:    case LABEL_REF:    case CONST :      return 1;    default:      return 0;    }}/* Return 1 if OP is a reference to an object in .sdata/.sbss.  */intsmall_data_operand (op, int_mode)     rtx op;     int int_mode;{  if (! TARGET_SDATA_USE)    return 0;  if (GET_CODE (op) == SYMBOL_REF)    return SDATA_NAME_P (XSTR (op, 0));  if (GET_CODE (op) == CONST      && GET_CODE (XEXP (op, 0)) == PLUS      && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF      && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT      && INT16_P (INTVAL (XEXP (XEXP (op, 0), 1))))    return SDATA_NAME_P (XSTR (XEXP (XEXP (op, 0), 0), 0));  return 0;}/* Return 1 if OP is a symbol that can use 24 bit addressing.  */intaddr24_operand (op, int_mode)     rtx op;     int int_mode;{  if (GET_CODE (op) == LABEL_REF)    return TARGET_ADDR24;  if (GET_CODE (op) == SYMBOL_REF)    return (SMALL_NAME_P (XSTR (op, 0))	    || (TARGET_ADDR24		&& (CONSTANT_POOL_ADDRESS_P (op)		    || LIT_NAME_P (XSTR (op, 0)))));  if (GET_CODE (op) == CONST      && GET_CODE (XEXP (op, 0)) == PLUS      && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF      && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT      && UINT24_P (INTVAL (XEXP (XEXP (op, 0), 1))))    {      rtx sym = XEXP (XEXP (op, 0), 0);      return (SMALL_NAME_P (XSTR (sym, 0))	      || (TARGET_ADDR24		  && (CONSTANT_POOL_ADDRESS_P (op)		      || LIT_NAME_P (XSTR (op, 0)))));    }  return 0;}/* Return 1 if OP is a symbol that needs 32 bit addressing.  */intaddr32_operand (op, int_mode)     rtx op;     int int_mode;{  if (GET_CODE (op) == LABEL_REF)    return TARGET_ADDR32;  if (GET_CODE (op) == SYMBOL_REF)    return (! addr24_operand (op, int_mode)	    && ! small_data_operand (op, int_mode));  if (GET_CODE (op) == CONST      && GET_CODE (XEXP (op, 0)) == PLUS      && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF      && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)    {      return (! addr24_operand (op, int_mode)	      && ! small_data_operand (op, int_mode));    }  return 0;}/* Return 1 if OP is a function that can be called with the `bl' insn.  */intcall26_operand (op, int_mode)     rtx op;     int int_mode;{  if (GET_CODE (op) == SYMBOL_REF)    return ! LARGE_NAME_P (XSTR (op, 0));  return TARGET_CALL26;}/* Returns 1 if OP is an acceptable operand for seth/add3.  */intseth_add3_operand (op, int_mode)     rtx op;     int int_mode;{  if (GET_CODE (op) == SYMBOL_REF      || GET_CODE (op) == LABEL_REF)    return 1;  if (GET_CODE (op) == CONST      && GET_CODE (XEXP (op, 0)) == PLUS      && GET_CODE (XEXP (XEXP (op, 0), 0)) == SYMBOL_REF      && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT      && INT16_P (INTVAL (XEXP (XEXP (op, 0), 1))))    return 1;  return 0;}/* Return true if OP is a signed 16 bit immediate value   useful in comparisons.  */intcmp_int16_operand (op, int_mode)     rtx op;     int int_mode;{  if (GET_CODE (op) != CONST_INT)    return 0;  return CMP_INT16_P (INTVAL (op));}/* Return true if OP is an unsigned 16 bit immediate value.  */intuint16_operand (op, int_mode)     rtx op;     int int_mode;{  if (GET_CODE (op) != CONST_INT)    return 0;  return UINT16_P (INTVAL (op));}/* Return true if OP is a register or signed 8 bit value.  */intreg_or_int16_operand (op, int_mode)     rtx op;     int int_mode;{  enum machine_mode mode = (enum machine_mode)int_mode;  if (GET_CODE (op) == REG || GET_CODE (op) == SUBREG)    return register_operand (op, mode);  if (GET_CODE (op) != CONST_INT)    return 0;  return INT16_P (INTVAL (op));}/* Return true if OP is a register or an unsigned 16 bit value.  */intreg_or_uint16_operand (op, int_mode)     rtx op;     int int_mode;{  enum machine_mode mode = (enum machine_mode)int_mode;  if (GET_CODE (op) == REG || GET_CODE (op) == SUBREG)    return register_operand (op, mode);  if (GET_CODE (op) != CONST_INT)    return 0;  return UINT16_P (INTVAL (op));}/* Return true if OP is a register or signed 16 bit value for compares.  */intreg_or_cmp_int16_operand (op, int_mode)     rtx op;     int int_mode;{  enum machine_mode mode = (enum machine_mode)int_mode;  if (GET_CODE (op) == REG || GET_CODE (op) == SUBREG)    return register_operand (op, mode);  if (GET_CODE (op) != CONST_INT)    return 0;  return CMP_INT16_P (INTVAL (op));}/* Return true if OP is a const_int requiring two instructions to load.  */inttwo_insn_const_operand (op, int_mode)     rtx op;     int int_mode;{  if (GET_CODE (op) != CONST_INT)    return 0;  if (INT16_P (INTVAL (op))      || UINT24_P (INTVAL (op))      || UPPER16_P (INTVAL (op)))    return 0;  return 1;}/* Return true if OP is an acceptable argument for a single word   move source.  */intmove_src_operand (op, int_mode)     rtx op;     int int_mode;{  enum machine_mode mode = (enum machine_mode)int_mode;  switch (GET_CODE (op))    {    case SYMBOL_REF :    case CONST :      return addr24_operand (op, int_mode);    case CONST_INT :      /* ??? We allow more cse opportunities if we only allow constants	 loadable with one insn, and split the rest into two.  The instances	 where this would help should be rare and the current way is	 simpler.  */      return INT32_P (INTVAL (op));    case LABEL_REF :      return TARGET_ADDR24;    case CONST_DOUBLE :      if (mode == SFmode)	return 1;      else if (mode == SImode)	{	  /* Large unsigned constants are represented as const_double's.  */	  unsigned HOST_WIDE_INT low, high;	  low = CONST_DOUBLE_LOW (op);	  high = CONST_DOUBLE_HIGH (op);	  return high == 0 && low <= 0xffffffff;	}      else	return 0;    case REG :      return register_operand (op, mode);    case SUBREG :      /* (subreg (mem ...) ...) can occur here if the inner part was once a	 pseudo-reg and is now a stack slot.  */      if (GET_CODE (SUBREG_REG (op)) == MEM)	return address_operand (XEXP (SUBREG_REG (op), 0), mode);      else	return register_operand (op, mode);    case MEM :      return address_operand (XEXP (op, 0), mode);    default :      return 0;    }}/* Return true if OP is an acceptable argument for a double word   move source.  */intmove_double_src_operand (op, int_mode)     rtx op;     int int_mode;{  enum machine_mode mode = (enum machine_mode)int_mode;  switch (GET_CODE (op))    {    case CONST_INT :    case CONST_DOUBLE :      return 1;    case REG :      return register_operand (op, mode);    case SUBREG :      /* (subreg (mem ...) ...) can occur here if the inner part was once a	 pseudo-reg and is now a stack slot.  */      if (GET_CODE (SUBREG_REG (op)) == MEM)	return move_double_src_operand (SUBREG_REG (op), int_mode);      else	return register_operand (op, mode);    case MEM :      /* Disallow auto inc/dec for now.  */      if (GET_CODE (XEXP (op, 0)) == PRE_DEC	  || GET_CODE (XEXP (op, 0)) == PRE_INC)	return 0;      return address_operand (XEXP (op, 0), mode);    default :      return 0;    }}/* Return true if OP is an acceptable argument for a move destination.  */intmove_dest_operand (op, int_mode)     rtx op;     int int_mode;{  enum machine_mode mode = (enum machine_mode)int_mode;  switch (GET_CODE (op))    {    case REG :      return register_operand (op, mode);    case SUBREG :      /* (subreg (mem ...) ...) can occur here if the inner part was once a	 pseudo-reg and is now a stack slot.  */      if (GET_CODE (SUBREG_REG (op)) == MEM)	return address_operand (XEXP (SUBREG_REG (op), 0), mode);      else	return register_operand (op, mode);    case MEM :      return address_operand (XEXP (op, 0), mode);    default :      return 0;    }}/* Return 1 if OP is a DImode const we want to handle inline.   This must match the code in the movdi pattern.   It is used by the 'G' CONST_DOUBLE_OK_FOR_LETTER.  */inteasy_di_const (op)     rtx op;{  rtx high_rtx, low_rtx;  HOST_WIDE_INT high, low;  split_double (op, &high_rtx, &low_rtx);  high = INTVAL (high_rtx);  low = INTVAL (low_rtx);  /* Pick constants loadable with 2 16 bit `ldi' insns.  */  if (high >= -128 && high <= 127      && low >= -128 && low <= 127)    return 1;  return 0;}/* Return 1 if OP is a DFmode const we want to handle inline.   This must match the code in the movdf pattern.   It is used by the 'H' CONST_DOUBLE_OK_FOR_LETTER.  */inteasy_df_const (op)     rtx op;{  REAL_VALUE_TYPE r;  long l[2];  REAL_VALUE_FROM_CONST_DOUBLE (r, op);  REAL_VALUE_TO_TARGET_DOUBLE (r, l);  if (l[0] == 0 && l[1] == 0)    return 1;  if ((l[0] & 0xffff) == 0 && l[1] == 0)    return 1;  return 0;}/* Return 1 if OP is an EQ or NE comparison operator.  */inteqne_comparison_operator (op, int_mode)    rtx op;    int int_mode;{  enum rtx_code code = GET_CODE (op);  if (GET_RTX_CLASS (code) != '<')    return 0;  return (code == EQ || code == NE);}/* Return 1 if OP is a signed comparison operator.  */intsigned_comparison_operator (op, int_mode)    rtx op;    int int_mode;{  enum rtx_code code = GET_CODE (op);  if (GET_RTX_CLASS (code) != '<')    return 0;  return (code == EQ || code == NE	  || code == LT || code == LE || code == GT || code == GE);}/* Return 1 if OP is (mem (reg ...)).   This is used in insn length calcs.  */intmemreg_operand (op, int_mode)     rtx op;     int int_mode;{  return GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == REG;}/* Return non-zero if the operand is an insn that is a small insn.   Allow const_int 0 as well, which is a placeholder for NOP slots.  */intsmall_insn_p (op, int_mode)     rtx op;     int int_mode;{  if (GET_CODE (op) == CONST_INT && INTVAL (op) == 0)    return 1;  if (GET_RTX_CLASS (GET_CODE (op)) != 'i')    return 0;  return get_attr_length (op) == 2;}/* Return non-zero if the operand is an insn that is a large insn.  */intlarge_insn_p (op, int_mode)     rtx op;     int int_mode;{  if (GET_RTX_CLASS (GET_CODE (op)) != 'i')    return 0;  return get_attr_length (op) != 2;}/* Comparisons.  *//* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,   return the mode to be used for the comparison.  */intm32r_select_cc_mode (op, x, y)     int op;     rtx x, y;{  return (int)SImode;}/* X and Y are two things to compare using CODE.  Emit the compare insn and   return the rtx for compare [arg0 of the if_then_else].   If need_compare is true then the comparison insn must be generated, rather   than being susummed into the following branch instruction. */rtxgen_compare (int_code, x, y, need_compare)     int	   int_code;     rtx           x;     rtx           y;     int           need_compare;{  enum rtx_code     code = (enum rtx_code)int_code;  enum rtx_code     compare_code;  enum rtx_code     branch_code;  enum machine_mode mode      = SELECT_CC_MODE (code, x, y);  rtx               cc_reg    = gen_rtx (REG, mode, CARRY_REGNUM);

⌨️ 快捷键说明

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