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

📄 cris.h

📁 linux下的gcc编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
   if (GET_CODE (XEXP (X, 1)) == CONST_INT				\       /* Two constants may actually happen before optimization.  */	\       && GET_CODE (XEXP (X, 0)) != CONST_INT				\       && !CONST_OK_FOR_LETTER_P (INTVAL (XEXP (X, 1)), 'I'))		\     return								\       rtx_cost (XEXP (X, 0), OUTER_CODE) + 2				\       + 2 * GET_MODE_NUNITS (GET_MODE (XEXP (X, 0)));			\									\ case ZERO_EXTEND: case SIGN_EXTEND:					\   /* Same as move. If embedded in other insn, cost is 0.  */		\   return rtx_cost (XEXP (X, 0), OUTER_CODE);#define ADDRESS_COST(X) cris_address_cost (X)/* 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/* We pull a little trick to register the _fini function with atexit,   after (presumably) registering the eh frame info, since we don't handle   _fini (a.k.a. ___fini_start) in crt0 or have a crti for "pure" ELF.  If   you change this, don't forget that you can't have library function   references (e.g. to atexit) in crtend.o, since those won't be resolved   to libraries; those are linked in *before* crtend.o.  */#ifdef CRT_BEGIN# define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)		\static void __attribute__((__used__))				\call_ ## FUNC (void)						\{								\  asm (SECTION_OP);						\  FUNC ();							\  if (__builtin_strcmp (#FUNC, "frame_dummy") == 0)		\   {								\     extern void __fini__start (void);				\     atexit (__fini__start);					\   }								\  asm (TEXT_SECTION_ASM_OP);					\}#endif/* 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 *//* NO_APP *only at file start* means faster assembly.   It also means comments are not allowed.   In some cases comments will be output for debugging purposes.   Make sure they are allowed then.  *//* Override previous definitions (elfos.h).  */#undef ASM_FILE_START#define ASM_FILE_START(STREAM)					\  do								\    {								\      if (TARGET_PDEBUG || flag_print_asm_name)			\	fprintf ((STREAM), "#APP\n");				\      else							\	fprintf ((STREAM), "#NO_APP\n");			\      if (TARGET_ELF)						\	output_file_directive ((STREAM), main_input_filename);	\    }								\  while (0)/* Override previous definitions (elfos.h).  */#undef ASM_FILE_END#define ASM_FILE_END(STREAM)/* 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 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", (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",					\		   ((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/* FIXME: This macro isn't documented, but this would probably be an   appropriate location.  It's only used in crtstuff.c, else we'd have to   handle (to #undef or ignore it) in a.out.  */#define HAVE_GAS_HIDDEN 1#undef  ASM_OUTPUT_INTERNAL_LABEL#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM)	\  do							\    {							\      asm_fprintf (FILE, "%L%s%d:\n", PREFIX, NUM);	\    }							\  while (0)/* 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)#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)		\  do								\    {								\      (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10);	\      sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO));		\    }								\  while (0)/* 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_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_

⌨️ 快捷键说明

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