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

📄 cris.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 4 页
字号:
	  && (GET_MODE (XEXP (XEXP (X, 0), 0)) == HImode		\	      || GET_MODE (XEXP (XEXP (X, 0), 0)) == QImode)		\	  && (REG_P (XEXP (XEXP (XEXP (X, 0), 0), 0))			\	      || (GET_CODE (XEXP (XEXP (XEXP (X, 0), 0), 0))		\		  == POST_INC						\		  && REG_P (XEXP (XEXP (XEXP (XEXP (X, 0), 0), 0),	\				  0)))))				\	{								\	  int something_reloaded = 0;					\									\	  if (REGNO (XEXP (X, 1)) >= FIRST_PSEUDO_REGISTER)		\	    {								\	      /* Second reg is pseudo, reload it.  */			\	      push_reload (XEXP (X, 1), NULL_RTX, &XEXP (X, 1), 	\			   NULL,					\			   GENERAL_REGS, GET_MODE (X), VOIDmode, 0, 0,	\			   OPNUM, TYPE);				\	      something_reloaded = 1;					\	    }								\									\	  if (REG_P (XEXP (XEXP (XEXP (X, 0), 0), 0))			\	      && (REGNO (XEXP (XEXP (XEXP (X, 0), 0), 0))		\		  >= FIRST_PSEUDO_REGISTER))				\	    {								\	      /* First one is a pseudo - reload that.  */		\	      push_reload (XEXP (XEXP (XEXP (X, 0), 0), 0), NULL_RTX,	\			   &XEXP (XEXP (XEXP (X, 0), 0), 0), NULL, 	\			   GENERAL_REGS,				\			   GET_MODE (X), VOIDmode, 0, 0, OPNUM, TYPE);	\	      something_reloaded = 1;					\	    }								\									\	  if (! something_reloaded					\	      || (GET_CODE (XEXP (XEXP (X, 0), 0)) == POST_INC		\		  && (REGNO (XEXP (XEXP (XEXP (X, 0), 0), 0))		\		      >= FIRST_PSEUDO_REGISTER)))			\	    /* Reload the sign_extend.	Happens if neither reg is a	\	       pseudo, or the first one was inside post_increment.  */	\	    push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL,	\			 GENERAL_REGS, GET_MODE (X), VOIDmode, 0, 0,	\			 OPNUM, TYPE);					\	  goto WIN;							\	}								\    }									\  while (0)/* In CRIS, only the postincrement address mode depends thus,   since the increment depends on the size of the operand.  */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)	\  do							\    {							\      if (GET_CODE (ADDR) == POST_INC)			\	goto LABEL;					\    }							\  while (0)#define LEGITIMATE_CONSTANT_P(X) 1/* Node: Condition Code */#define NOTICE_UPDATE_CC(EXP, INSN) cris_notice_update_cc (EXP, INSN)/* FIXME: Maybe define CANONICALIZE_COMPARISON later, when playing with   optimizations.  It is needed; currently we do this with instruction   patterns and NOTICE_UPDATE_CC.  *//* Node: Costs *//* FIXME: Need to define REGISTER_MOVE_COST when more register classes are   introduced.  *//* This isn't strictly correct for v0..3 in buswidth-8bit mode, but   should suffice.  */#define MEMORY_MOVE_COST(M, CLASS, IN) \ (((M) == QImode) ? 4 : ((M) == HImode) ? 4 : 6)/* Regardless of the presence of delay slots, the default value of 1 for   BRANCH_COST is the best in the range (1, 2, 3), tested with gcc-2.7.2   with testcases ipps and gcc, giving smallest and fastest code.  */#define SLOW_BYTE_ACCESS 0/* This is the threshold *below* which inline move sequences of   word-length sizes will be emitted.  The "9" will translate to   (9 - 1) * 4 = 32 bytes maximum moved, but using 16 instructions   (8 instruction sequences) or less.  */#define MOVE_RATIO 9/* Node: Sections */#define TEXT_SECTION_ASM_OP "\t.text"#define DATA_SECTION_ASM_OP "\t.data"#define FORCE_EH_FRAME_INFO_IN_DATA_SECTION (! TARGET_ELF)/* The jump table is immediately connected to the preceding insn.  */#define JUMP_TABLES_IN_TEXT_SECTION 1/* Node: PIC */#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 0 : INVALID_REGNUM)#define LEGITIMATE_PIC_OPERAND_P(X) cris_legitimate_pic_operand (X)/* Node: File Framework *//* We don't want an .ident for gcc.  To avoid that but still support   #ident, we override ASM_OUTPUT_IDENT and, since the gcc .ident is its   only use besides ASM_OUTPUT_IDENT, undef IDENT_ASM_OP from elfos.h.  */#undef IDENT_ASM_OP#undef ASM_OUTPUT_IDENT#define ASM_OUTPUT_IDENT(FILE, NAME) \  fprintf (FILE, "%s\"%s\"\n", "\t.ident\t", NAME);#define ASM_APP_ON "#APP\n"#define ASM_APP_OFF "#NO_APP\n"/* Node: Data Output */#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \  do { if (!cris_output_addr_const_extra (STREAM, X)) goto FAIL; } while (0)#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) (C) == '@'/* Node: Uninitialized Data *//* Remember to round off odd values if we want data alignment,   since we cannot do that with an .align directive.   Using .comm causes the space not to be reserved in .bss, but by   tricks with the symbol type.  Not good if other tools than binutils   are used on the object files.  Since ".global ... .lcomm ..." works, we   use that.  Use .._ALIGNED_COMMON, since gcc whines when we only have   ..._COMMON, and we prefer to whine ourselves; BIGGEST_ALIGNMENT is not   the one to check.  This done for a.out only.  *//* FIXME: I suspect a bug in gcc with alignment.  Do not warn until   investigated; it mucks up the testsuite results.  */#define CRIS_ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN, LOCAL) \  do									\    {									\      int align_ = (ALIGN) / BITS_PER_UNIT;				\      if (TARGET_DATA_ALIGN && TARGET_ALIGN_BY_32 && align_ < 4)	\	align_ = 4;							\      else if (TARGET_DATA_ALIGN && align_ < 2)				\	align_ = 2;							\      /* FIXME: Do we need this?  */					\      else if (align_ < 1)						\	align_ = 1;							\									\      if (TARGET_ELF)							\	{								\	  if (LOCAL)							\	    {								\	      fprintf ((FILE), "%s", LOCAL_ASM_OP);			\	      assemble_name ((FILE), (NAME));				\	      fprintf ((FILE), "\n");					\	    }								\	  fprintf ((FILE), "%s", COMMON_ASM_OP);			\	  assemble_name ((FILE), (NAME));				\	  fprintf ((FILE), ",%u,%u\n", (int)(SIZE), align_);		\	}								\      else								\	{								\	  /* We can't tell a one-only or weak COMM from a "global	\	     COMM" so just make all non-locals weak.  */		\	  if (! (LOCAL))						\	    ASM_WEAKEN_LABEL (FILE, NAME);				\	  fputs ("\t.lcomm ", (FILE));					\	  assemble_name ((FILE), (NAME));				\	  fprintf ((FILE), ",%u\n",					\		   ((int)(SIZE) + (align_ - 1)) & ~(align_ - 1));	\	}								\    }									\  while (0)#define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \ CRIS_ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN, 0)#undef ASM_OUTPUT_ALIGNED_DECL_LOCAL#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \ CRIS_ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN, 1)/* FIXME: define ASM_OUTPUT_SHARED_COMMON and emit an error when it is   used with -melinux and a.out.  *//* Node: Label Output *//* Globalizing directive for a label.  */#define GLOBAL_ASM_OP "\t.global "#define SUPPORTS_WEAK 1#define ASM_OUTPUT_SYMBOL_REF(STREAM, SYM) \ cris_asm_output_symbol_ref (STREAM, SYM)#define ASM_OUTPUT_LABEL_REF(STREAM, BUF) \ cris_asm_output_label_ref (STREAM, BUF)/* Remove any previous definition (elfos.h).  */#undef ASM_GENERATE_INTERNAL_LABEL#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM)	\  sprintf (LABEL, "*%s%s%ld", LOCAL_LABEL_PREFIX, PREFIX, (long) NUM)/* Node: Initialization *//* (no definitions) *//* Node: Macros for Initialization *//* (no definitions) *//* Node: Instruction Output */#define REGISTER_NAMES					\ {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8",	\  "r9", "r10", "r11", "r12", "r13", "sp", "pc", "srp", "faked_ap"}#define ADDITIONAL_REGISTER_NAMES \ {{"r14", 14}, {"r15", 15}}#define PRINT_OPERAND(FILE, X, CODE)		\ cris_print_operand (FILE, X, CODE)/* For delay-slot handling.  */#define PRINT_OPERAND_PUNCT_VALID_P(CODE)	\ ((CODE) == '#' || (CODE) == '!')#define PRINT_OPERAND_ADDRESS(FILE, ADDR)	\   cris_print_operand_address (FILE, ADDR)/* Output an empty line to illustrate the presence of the delay slot.  */#define DBR_OUTPUT_SEQEND(FILE) \  fprintf (FILE, "\n")#define LOCAL_LABEL_PREFIX (TARGET_ELF ? "." : "")/* cppinit.c initializes a const array from this, so it must be constant,   can't have it different based on options.  Luckily, the prefix is   always allowed, so let's have it on all GCC-generated code.  Note that   we have this verbatim everywhere in the back-end, not using %R or %s or   such.  */#define REGISTER_PREFIX "$"/* Remove any previous definition (elfos.h).  *//* We use -fno-leading-underscore to remove it, when necessary.  */#undef USER_LABEL_PREFIX#define USER_LABEL_PREFIX "_"#define ASM_OUTPUT_REG_PUSH(FILE, REGNO) \  fprintf (FILE, "\tpush $%s\n", reg_names[REGNO])#define ASM_OUTPUT_REG_POP(FILE, REGNO) \  fprintf (FILE, "\tpop $%s\n", reg_names[REGNO])/* Node: Dispatch Tables */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)	\  asm_fprintf (FILE, "\t.word %LL%d-%LL%d\n", VALUE, REL)#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \  asm_fprintf (FILE, "\t.dword %LL%d\n", VALUE)/* Defined to also emit an .align in elfos.h.  We don't want that.  */#undef ASM_OUTPUT_CASE_LABEL/* Since the "bound" insn loads the comparison value if the compared<   value (register) is out of bounds (0..comparison value-1), we need   to output another case to catch it.   The way to find it is to look for the label_ref at the else-arm inside   the expanded casesi core-insn.   FIXME: Check this construct when changing to new version of gcc.  */#define ASM_OUTPUT_CASE_END(STREAM, NUM, TABLE)				\  do									\    {									\      asm_fprintf (STREAM, "\t.word %LL%d-%LL%d%s\n",			\		   CODE_LABEL_NUMBER					\		    (XEXP (XEXP (XEXP					\				  (XVECEXP				\				    (PATTERN				\				     (prev_nonnote_insn			\				      (PREV_INSN (TABLE))),		\				     0, 0), 1), 2), 0)),		\		   NUM,							\		   (TARGET_PDEBUG ? "; default" : ""));			\    }									\  while (0)/* Node: Exception Region Output *//* (no definitions) *//* FIXME: Fill in with our own optimized layout.  *//* Node: Alignment Output */#define ASM_OUTPUT_ALIGN(FILE, LOG)  \ fprintf (FILE, "\t.align %d\n", (LOG))/* Node: All Debuggers */#define DBX_REGISTER_NUMBER(REGNO) \ ((REGNO) == CRIS_SRP_REGNUM ? CRIS_CANONICAL_SRP_REGNUM : (REGNO))/* FIXME: Investigate DEBUGGER_AUTO_OFFSET, DEBUGGER_ARG_OFFSET.  *//* Node: DBX Options *//* Is this correct? Check later.  */#define DBX_NO_XREFS#define DBX_CONTIN_LENGTH 0/* FIXME: Is this needed when we have 0 DBX_CONTIN_LENGTH?  */#define DBX_CONTIN_CHAR '?'/* Node: DBX Hooks *//* (no definitions) *//* Node: File names and DBX *//* (no definitions) *//* Node: SDB and DWARF *//* (no definitions) *//* Node: Misc *//* FIXME: Check this one more time.  */#define PREDICATE_CODES					\ {"cris_orthogonal_operator",				\  {PLUS, MINUS, IOR, AND, UMIN}},			\ {"cris_commutative_orth_op",				\  {PLUS, IOR, AND, UMIN}},				\ {"cris_operand_extend_operator",			\  {PLUS, MINUS, UMIN}},					\ {"cris_additive_operand_extend_operator",		\  {PLUS, MINUS}},					\ {"cris_extend_operator",				\  {ZERO_EXTEND, SIGN_EXTEND}},				\ {"cris_plus_or_bound_operator",			\  {PLUS, UMIN}},					\ {"cris_mem_op",					\  {MEM}},						\ {"cris_bdap_operand",					\  {SUBREG, REG, LABEL_REF, SYMBOL_REF, MEM, CONST_INT,	\   CONST_DOUBLE, CONST, SIGN_EXTEND}},			\ {"cris_bdap_biap_operand",				\  {SUBREG, REG, LABEL_REF, SYMBOL_REF, MEM, CONST_INT,	\   CONST_DOUBLE, CONST, SIGN_EXTEND, MULT}},		\ {"cris_general_operand_or_gotless_symbol",		\  {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,		\   LABEL_REF, SUBREG, REG, MEM}},			\ {"cris_general_operand_or_symbol",			\  {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,		\   LABEL_REF, SUBREG, REG, MEM}},			\ {"cris_general_operand_or_plt_symbol",			\  {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,		\   LABEL_REF, SUBREG, REG, MEM}},			\ {"cris_mem_call_operand",				\  {MEM}},/* A combination of the bound (umin) insn together with a   sign-extended add via the table to PC seems optimal.   If the table overflows, the assembler will take care of it.   Theoretically, in extreme cases (uncertain if they occur), an error   will be emitted, so FIXME: Check how large case-tables are emitted,   possible add an option to emit SImode case-tables.  */#define CASE_VECTOR_MODE HImode#define CASE_VECTOR_PC_RELATIVE 1/* FIXME: Investigate CASE_VECTOR_SHORTEN_MODE to make sure HImode is not   used when broken-.word could possibly fail (plus testcase).  */#define FIXUNS_TRUNC_LIKE_FIX_TRUNC/* This is the number of bytes that can be moved in one   reasonably fast instruction sequence.  For CRIS, this is two   instructions: mem => reg, reg => mem.  */#define MOVE_MAX 4/* Maybe SHIFT_COUNT_TRUNCATED is safe to define?  FIXME: Check later.  */#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1#define Pmode SImode#define FUNCTION_MODE QImode#define NO_IMPLICIT_EXTERN_C/* * Local variables: * eval: (c-set-style "gnu") * indent-tabs-mode: t * End: */

⌨️ 快捷键说明

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