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

📄 mn10300.md

📁 linux下的gcc编译器
💻 MD
📖 第 1 页 / 共 5 页
字号:
;; GCC machine description for Matsushita MN10300;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003;; Free Software Foundation, Inc.;; Contributed by Jeff Law (law@cygnus.com).;; This file is part of GNU CC.;; GNU CC is free software; you can redistribute it and/or modify;; it under the terms of the GNU General Public License as published by;; the Free Software Foundation; either version 2, or (at your option);; any later version.;; GNU CC is distributed in the hope that it will be useful,;; but WITHOUT ANY WARRANTY; without even the implied warranty of;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the;; GNU General Public License for more details.;; You should have received a copy of the GNU General Public License;; along with GNU CC; see the file COPYING.  If not, write to;; the Free Software Foundation, 59 Temple Place - Suite 330,;; Boston, MA 02111-1307, USA.;; The original PO technology requires these to be ordered by speed,;; so that assigner will pick the fastest.;; See file "rtl.def" for documentation on define_insn, match_*, et. al.;; Condition code settings.;; none - insn does not affect cc;; none_0hit - insn does not affect cc but it does modify operand 0;;	This attribute is used to keep track of when operand 0 changes.;; 	See the description of NOTICE_UPDATE_CC for more info.;; set_znv - insn sets z,n,v to usable values; c is unusable.;; set_zn  - insn sets z,n to usable values; v,c are unusable.;; compare - compare instruction;; invert -- like compare, but flags are inverted.;; clobber - value of cc is unknown(define_attr "cc" "none,none_0hit,set_znv,set_zn,compare,clobber,invert"  (const_string "clobber"));; ----------------------------------------------------------------------;; MOVE INSTRUCTIONS;; ----------------------------------------------------------------------;; movqi(define_expand "movqi"  [(set (match_operand:QI 0 "general_operand" "")	(match_operand:QI 1 "general_operand" ""))]  ""  "{  /* One of the ops has to be in a register */  if (!register_operand (operand0, QImode)      && !register_operand (operand1, QImode))    operands[1] = copy_to_mode_reg (QImode, operand1);}")(define_insn ""  [(set (match_operand:QI 0 "nonimmediate_operand" "=d*x*a,d*x,d*x*a,d*x*a,m")	(match_operand:QI 1 "general_operand" "0,I,d*xai,m,d*xa"))]  "TARGET_AM33   && (register_operand (operands[0], QImode)       || register_operand (operands[1], QImode))"  "*{  switch (which_alternative)    {    case 0:      return \"nop\";    case 1:      return \"clr %0\";    case 2:      if (GET_CODE (operands[1]) == CONST_DOUBLE)	{	  rtx xoperands[2];	  xoperands[0] = operands[0];	  xoperands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));	  output_asm_insn (\"mov %1,%0\", xoperands);	  return \"\";	}      if (REGNO_REG_CLASS (true_regnum (operands[0])) == EXTENDED_REGS	  && GET_CODE (operands[1]) == CONST_INT)	{	  HOST_WIDE_INT val = INTVAL (operands[1]);	  if (((val & 0x80) && ! (val & 0xffffff00))	      || ((val & 0x800000) && ! (val & 0xff000000)))	    return \"movu %1,%0\";	}      return \"mov %1,%0\";    case 3:    case 4:      return \"movbu %1,%0\";    default:      abort ();    }}"  [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit")])(define_insn ""  [(set (match_operand:QI 0 "nonimmediate_operand" "=d*a,d,d*a,d,m")	(match_operand:QI 1 "general_operand" "0,I,dai,m,d"))]  "register_operand (operands[0], QImode)   || register_operand (operands[1], QImode)"  "*{  switch (which_alternative)    {    case 0:      return \"nop\";    case 1:      return \"clr %0\";    case 2:      if (GET_CODE (operands[1]) == CONST_DOUBLE)	{	  rtx xoperands[2];	  xoperands[0] = operands[0];	  xoperands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));	  output_asm_insn (\"mov %1,%0\", xoperands);	  return \"\";	}      return \"mov %1,%0\";    case 3:    case 4:      return \"movbu %1,%0\";    default:      abort ();    }}"  [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit")]);; movhi(define_expand "movhi"  [(set (match_operand:HI 0 "general_operand" "")	(match_operand:HI 1 "general_operand" ""))]  ""  "{  /* One of the ops has to be in a register */  if (!register_operand (operand1, HImode)      && !register_operand (operand0, HImode))    operands[1] = copy_to_mode_reg (HImode, operand1);}")(define_insn ""  [(set (match_operand:HI 0 "nonimmediate_operand" "=d*x*a,d*x,d*x*a,d*x*a,m")	(match_operand:HI 1 "general_operand" "0,I,d*x*ai,m,d*x*a"))]  "TARGET_AM33   && (register_operand (operands[0], HImode)       || register_operand (operands[1], HImode))"  "*{  switch (which_alternative)    {    case 0:      return \"nop\";    case 1:      return \"clr %0\";    case 2:      if (GET_CODE (operands[1]) == CONST_DOUBLE)	{	  rtx xoperands[2];	  xoperands[0] = operands[0];	  xoperands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));	  output_asm_insn (\"mov %1,%0\", xoperands);	  return \"\";	}      if (REGNO_REG_CLASS (true_regnum (operands[0])) == EXTENDED_REGS	  && GET_CODE (operands[1]) == CONST_INT)	{	  HOST_WIDE_INT val = INTVAL (operands[1]);	  if (((val & 0x80) && ! (val & 0xffffff00))	      || ((val & 0x800000) && ! (val & 0xff000000)))	    return \"movu %1,%0\";	}      return \"mov %1,%0\";    case 3:    case 4:      return \"movhu %1,%0\";    default:      abort ();    }}"  [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit")])(define_insn ""  [(set (match_operand:HI 0 "nonimmediate_operand" "=d*a,d,d*a,d,m")	(match_operand:HI 1 "general_operand" "0,I,dai,m,d"))]  "register_operand (operands[0], HImode)   || register_operand (operands[1], HImode)"  "*{  switch (which_alternative)    {    case 0:      return \"nop\";    case 1:      return \"clr %0\";    case 2:      if (GET_CODE (operands[1]) == CONST_DOUBLE)	{	  rtx xoperands[2];	  xoperands[0] = operands[0];	  xoperands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));	  output_asm_insn (\"mov %1,%0\", xoperands);	  return \"\";	}      return \"mov %1,%0\";    case 3:    case 4:      return \"movhu %1,%0\";    default:      abort ();    }}"  [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit")]);; movsi and helpers;; We use this to handle addition of two values when one operand is the;; stack pointer and the other is a memory reference of some kind.  Reload;; does not handle them correctly without this expander.(define_expand "reload_insi"  [(set (match_operand:SI 0 "register_operand" "=a")	(match_operand:SI 1 "impossible_plus_operand" ""))   (clobber (match_operand:SI 2 "register_operand" "=&r"))]  ""  "{  if (XEXP (operands[1], 0) == stack_pointer_rtx)    {      if (GET_CODE (XEXP (operands[1], 1)) == SUBREG	  && (GET_MODE_SIZE (GET_MODE (XEXP (operands[1], 1)))	      > GET_MODE_SIZE (GET_MODE (SUBREG_REG (XEXP (operands[1], 1))))))	emit_move_insn (operands[2],			gen_rtx_ZERO_EXTEND			(GET_MODE (XEXP (operands[1], 1)),			 SUBREG_REG (XEXP (operands[1], 1))));      else	emit_move_insn (operands[2], XEXP (operands[1], 1));      emit_move_insn (operands[0], XEXP (operands[1], 0));    }  else    {      if (GET_CODE (XEXP (operands[1], 0)) == SUBREG	  && (GET_MODE_SIZE (GET_MODE (XEXP (operands[1], 0)))	      > GET_MODE_SIZE (GET_MODE (SUBREG_REG (XEXP (operands[1], 0))))))	emit_move_insn (operands[2],			gen_rtx_ZERO_EXTEND			(GET_MODE (XEXP (operands[1], 0)),			 SUBREG_REG (XEXP (operands[1], 0))));      else	emit_move_insn (operands[2], XEXP (operands[1], 0));      emit_move_insn (operands[0], XEXP (operands[1], 1));    }  emit_insn (gen_addsi3 (operands[0], operands[0], operands[2]));  DONE;}")(define_expand "movsi"  [(set (match_operand:SI 0 "general_operand" "")	(match_operand:SI 1 "general_operand" ""))]  ""  "{  /* One of the ops has to be in a register */  if (!register_operand (operand1, SImode)      && !register_operand (operand0, SImode))    operands[1] = copy_to_mode_reg (SImode, operand1);}")(define_insn ""  [(set (match_operand:SI 0 "nonimmediate_operand"				"=dx,ax,dx,a,dxm,dxm,axm,axm,dx,dx,ax,ax,axR,!*y")	(match_operand:SI 1 "general_operand"				"0,0,I,I,dx,ax,dx,ax,dixm,aixm,dixm,aixm,!*y,axR"))]  "register_operand (operands[0], SImode)   || register_operand (operands[1], SImode)"  "*{  switch (which_alternative)    {    case 0:    case 1:      return \"nop\";    case 2:      return \"clr %0\";    case 3:    case 4:    case 5:    case 6:    case 7:    case 8:    case 9:    case 10:    case 11:    case 12:    case 13:      if (GET_CODE (operands[1]) == CONST_DOUBLE)	{	  rtx xoperands[2];	  xoperands[0] = operands[0];	  xoperands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));	  output_asm_insn (\"mov %1,%0\", xoperands);	  return \"\";	}      if (REGNO_REG_CLASS (true_regnum (operands[0])) == EXTENDED_REGS	  && GET_CODE (operands[1]) == CONST_INT)	{	  HOST_WIDE_INT val = INTVAL (operands[1]);	  if (((val & 0x80) && ! (val & 0xffffff00))	      || ((val & 0x800000) && ! (val & 0xff000000)))	    return \"movu %1,%0\";	}      return \"mov %1,%0\";    default:      abort ();    }}"  [(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])(define_expand "movsf"  [(set (match_operand:SF 0 "general_operand" "")	(match_operand:SF 1 "general_operand" ""))]  ""  "{  /* One of the ops has to be in a register */  if (!register_operand (operand1, SFmode)      && !register_operand (operand0, SFmode))    operands[1] = copy_to_mode_reg (SFmode, operand1);}")(define_insn ""  [(set (match_operand:SF 0 "nonimmediate_operand" "=dx,ax,dx,a,daxm,dax")	(match_operand:SF 1 "general_operand" "0,0,G,G,dax,daxFm"))]  "register_operand (operands[0], SFmode)   || register_operand (operands[1], SFmode)"  "*{  switch (which_alternative)    {    case 0:    case 1:      return \"nop\";    case 2:      return \"clr %0\";    case 3:    case 4:    case 5:      if (REGNO_REG_CLASS (true_regnum (operands[0])) == EXTENDED_REGS	  && GET_CODE (operands[1]) == CONST_INT)	{	  HOST_WIDE_INT val = INTVAL (operands[1]);	  if (((val & 0x80) && ! (val & 0xffffff00))	      || ((val & 0x800000) && ! (val & 0xff000000)))	    return \"movu %1,%0\";	}      return \"mov %1,%0\";    default:      abort ();    }}"  [(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit")])(define_expand "movdi"  [(set (match_operand:DI 0 "general_operand" "")	(match_operand:DI 1 "general_operand" ""))]  ""  "{  /* One of the ops has to be in a register */  if (!register_operand (operand1, DImode)      && !register_operand (operand0, DImode))    operands[1] = copy_to_mode_reg (DImode, operand1);}")(define_insn ""  [(set (match_operand:DI 0 "nonimmediate_operand"				"=dx,ax,dx,a,dxm,dxm,axm,axm,dx,dx,ax,ax")	(match_operand:DI 1 "general_operand"				"0,0,I,I,dx,ax,dx,ax,dxim,axim,dxim,axim"))]  "register_operand (operands[0], DImode)   || register_operand (operands[1], DImode)"  "*{  long val[2];  REAL_VALUE_TYPE rv;  switch (which_alternative)    {      case 0:      case 1:	return \"nop\";      case 2:	return \"clr %L0\;clr %H0\";      case 3:	if (rtx_equal_p (operands[0], operands[1]))	  return \"sub %L1,%L0\;mov %L0,%H0\";	else	  return \"mov %1,%L0\;mov %L0,%H0\";      case 4:      case 5:      case 6:      case 7:      case 8:      case 9:      case 10:      case 11:	if (GET_CODE (operands[1]) == CONST_INT)	  {	    rtx low, high;	    split_double (operands[1], &low, &high);	    val[0] = INTVAL (low);	    val[1] = INTVAL (high);	  }	if (GET_CODE (operands[1]) == CONST_DOUBLE)	  {	    if (GET_MODE (operands[1]) == DFmode)	      {		REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]);		REAL_VALUE_TO_TARGET_DOUBLE (rv, val);	      }	    else if (GET_MODE (operands[1]) == VOIDmode		     || GET_MODE (operands[1]) == DImode)	      {		val[0] = CONST_DOUBLE_LOW (operands[1]);		val[1] = CONST_DOUBLE_HIGH (operands[1]);	      }	  }

⌨️ 快捷键说明

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