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

📄 arc.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
(REG_P (X) && REG_OK_FOR_BASE_P (X))/* local to this file */#define RTX_OK_FOR_INDEX_P(X) \(0 && /*???*/ REG_P (X) && REG_OK_FOR_INDEX_P (X))/* local to this file *//* ??? Loads can handle any constant, stores can only handle small ones.  */#define RTX_OK_FOR_OFFSET_P(X) \(GET_CODE (X) == CONST_INT && SMALL_INT (INTVAL (X)))#define LEGITIMATE_OFFSET_ADDRESS_P(MODE, X) \(GET_CODE (X) == PLUS				\ && RTX_OK_FOR_BASE_P (XEXP (X, 0))		\ && (RTX_OK_FOR_INDEX_P (XEXP (X, 1))		\     || RTX_OK_FOR_OFFSET_P (XEXP (X, 1))))#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)		\{ if (RTX_OK_FOR_BASE_P (X))				\    goto ADDR;						\  if (LEGITIMATE_OFFSET_ADDRESS_P ((MODE), (X)))	\    goto ADDR;						\  if (GET_CODE (X) == CONST_INT && LARGE_INT (INTVAL (X))) \    goto ADDR;						\  if (GET_CODE (X) == SYMBOL_REF			\	   || GET_CODE (X) == LABEL_REF			\	   || GET_CODE (X) == CONST)			\    goto ADDR;						\  if ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == PRE_INC) \      /* We're restricted here by the `st' insn.  */	\      && RTX_OK_FOR_BASE_P (XEXP ((X), 0)))		\    goto ADDR;						\}/* Try machine-dependent ways of modifying an illegitimate address   to be legitimate.  If we find one, return the new, valid address.   This macro is used in only one place: `memory_address' in explow.c.   OLDX is the address as it was before break_out_memory_refs was called.   In some cases it is useful to look at this to decide what needs to be done.   MODE and WIN are passed so that this macro can use   GO_IF_LEGITIMATE_ADDRESS.   It is always safe for this macro to do nothing.  It exists to recognize   opportunities to optimize the output.  */#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)/* Go to LABEL if ADDR (a legitimate address expression)   has an effect that depends on the machine mode it is used for.  */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \{ if (GET_CODE (ADDR) == PRE_DEC)	\    goto LABEL;				\  if (GET_CODE (ADDR) == PRE_INC)	\    goto LABEL;				\}/* Condition code usage.  *//* Some insns set all condition code flags, some only set the ZNC flags, and   some only set the ZN flags.  */#define EXTRA_CC_MODES CCZNCmode, CCZNmode#define EXTRA_CC_NAMES "CCZNC", "CCZN"/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,   return the mode to be used for the comparison.  */extern enum machine_mode arc_select_cc_mode ();#define SELECT_CC_MODE(OP, X, Y) \arc_select_cc_mode (OP, X, Y)/* Return non-zero if SELECT_CC_MODE will never return MODE for a   floating point inequality comparison.  */#define REVERSIBLE_CC_MODE(MODE) 1 /*???*//* Costs.  *//* An insn is define to cost 4 "units", and we work from there.   COSTS_N_INSNS (N) is defined as (N) * 4 - 2 so that seems reasonable.   Some values are supposed to be defined relative to each other and thus   aren't necessarily related to COSTS_N_INSNS.  *//* Compute the cost of computing a constant rtl expression RTX   whose rtx-code is CODE.  The body of this macro is a portion   of a switch statement.  If the code is computed here,   return it with a return statement.  Otherwise, break from the switch.  *//* Small integers are as cheap as registers.  4 byte values can be fetched   as immediate constants - let's give that the cost of an extra insn. */#define CONST_COSTS(X, CODE, OUTER_CODE) \  case CONST_INT :						\    if (SMALL_INT (INTVAL (X)))					\      return 0;							\    /* fall through */						\  case CONST :							\  case LABEL_REF :						\  case SYMBOL_REF :						\    return 4;							\  case CONST_DOUBLE :						\    {								\      rtx high, low;						\      split_double (X, &high, &low);				\      return 4 * (!SMALL_INT (INTVAL (high))			\		  + !SMALL_INT (INTVAL (low)));			\    }/* Compute the cost of an address.  */#define ADDRESS_COST(ADDR) (REG_P (ADDR) ? 1 : arc_address_cost (ADDR))/* Compute extra cost of moving data between one register class   and another.  */#define REGISTER_MOVE_COST(CLASS1, CLASS2) 2/* Compute the cost of moving data between registers and memory.  *//* Memory is 3 times as expensive as registers.   ??? Is that the right way to look at it?  */#define MEMORY_MOVE_COST(MODE,CLASS,IN) \(GET_MODE_SIZE (MODE) <= UNITS_PER_WORD ? 6 : 12)/* The cost of a branch insn.  *//* ??? What's the right value here?  Branches are certainly more   expensive than reg->reg moves.  */#define BRANCH_COST 2/* Provide the costs of a rtl expression.  This is in the body of a   switch on CODE.  The purpose for the cost of MULT is to encourage   `synth_mult' to find a synthetic multiply when reasonable.   If we need more than 12 insns to do a multiply, then go out-of-line,   since the call overhead will be < 10% of the cost of the multiply.  */#define RTX_COSTS(X, CODE, OUTER_CODE) \  case ASHIFT :						\  case ASHIFTRT :					\  case LSHIFTRT :					\    if (TARGET_SHIFTER)					\      return COSTS_N_INSNS (1);				\    if (GET_CODE (XEXP ((X), 1)) != CONST_INT)		\      return COSTS_N_INSNS (16);			\    return COSTS_N_INSNS (INTVAL (XEXP ((X), 1)));/* Nonzero if access to memory by bytes is slow and undesirable.   For RISC chips, it means that access to memory by bytes is no   better than access by words when possible, so grab a whole word   and maybe make use of that.  */#define SLOW_BYTE_ACCESS 1/* Define this macro if it is as good or better to call a constant   function address than to call an address kept in a register.  *//* On the ARC, calling through registers is slow.  */#define NO_FUNCTION_CSE/* Define this macro if it is as good or better for a function to call   itself with an explicit address than to call an address kept in a   register.  *//* On the ARC, calling through registers is slow.  */#define NO_RECURSIVE_FUNCTION_CSE/* Section selection.  *//* WARNING: These section names also appear in dwarfout.c.  *//* The names of the text, data, and readonly-data sections are runtime   selectable.  */#define ARC_SECTION_FORMAT		"\t.section %s"#define ARC_DEFAULT_TEXT_SECTION	".text"#define ARC_DEFAULT_DATA_SECTION	".data"#define ARC_DEFAULT_RODATA_SECTION	".rodata"extern char *arc_text_section,*arc_data_section,*arc_rodata_section;/* initfini.c uses this in an asm.  */#if defined (CRT_INIT) || defined (CRT_FINI)#define TEXT_SECTION_ASM_OP	"\t.section .text"#else#define TEXT_SECTION_ASM_OP	arc_text_section /*"\t.section .text"*/#endif#define DATA_SECTION_ASM_OP	arc_data_section /*"\t.section .data"*/#undef CONST_SECTION_ASM_OP#define CONST_SECTION_ASM_OP	arc_rodata_section /*"\t.section .rodata"*/#define BSS_SECTION_ASM_OP	"\t.section .bss"/* Define this macro if jump tables (for tablejump insns) should be   output in the text section, along with the assembler instructions.   Otherwise, the readonly data section is used.   This macro is irrelevant if there is no separate readonly data section.  *//*#define JUMP_TABLES_IN_TEXT_SECTION*//* Define this macro if references to a symbol must be treated   differently depending on something about the variable or   function named by the symbol (such as what section it is in).   The macro definition, if any, is executed immediately after the   rtl for DECL or other node is created.   The value of the rtl will be a `mem' whose address is a   `symbol_ref'.   The usual thing for this macro to do is to store a flag in the   `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified   name string in the `symbol_ref' (if one bit is not enough   information).  *//* On the ARC, function addresses are not the same as normal addresses.   Branch to absolute address insns take an address that is right-shifted   by 2.  We encode the fact that we have a function here, and then emit a   special assembler op when outputting the address.  */#define ENCODE_SECTION_INFO(DECL) \do {							\  if (TREE_CODE (DECL) == FUNCTION_DECL)		\    SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;	\} while (0)/* Decode SYM_NAME and store the real name part in VAR, sans   the characters that encode section info.  Define this macro if   ENCODE_SECTION_INFO alters the symbol's name string.  *//*#define STRIP_NAME_ENCODING(VAR, SYM_NAME)*//* For DWARF.  Marginally different than default so output is "prettier"   (and consistent with above).  */#define PUSHSECTION_FORMAT "\t%s %s\n"/* Tell crtstuff.c we're using ELF.  */#define OBJECT_FORMAT_ELF/* PIC *//* The register number of the register used to address a table of static   data addresses in memory.  In some cases this register is defined by a   processor's ``application binary interface'' (ABI).  When this macro   is defined, RTL is generated for this register once, as with the stack   pointer and frame pointer registers.  If this macro is not defined, it   is up to the machine-dependent files to allocate such a register (if   necessary).  */#define PIC_OFFSET_TABLE_REGNUM 26/* Define this macro if the register defined by PIC_OFFSET_TABLE_REGNUM is   clobbered by calls.  Do not define this macro if PIC_OFFSET_TABLE_REGNUM   is not defined.  *//* This register is call-saved on the ARC.  *//*#define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED*//* By generating position-independent code, when two different programs (A   and B) share a common library (libC.a), the text of the library can be   shared whether or not the library is linked at the same address for both   programs.  In some of these environments, position-independent code   requires not only the use of different addressing modes, but also   special code to enable the use of these addressing modes.   The FINALIZE_PIC macro serves as a hook to emit these special   codes once the function is being compiled into assembly code, but not   before.  (It is not done before, because in the case of compiling an   inline function, it would lead to multiple PIC prologues being   included in functions which used inline functions and were compiled to   assembly language.)  */#define FINALIZE_PIC arc_finalize_pic ()/* A C expression that is nonzero if X is a legitimate immediate   operand on the target machine when generating position independent code.   You can assume that X satisfies CONSTANT_P, so you need not   check this.  You can also assume `flag_pic' is true, so you need not   check it either.  You need not define this macro if all constants   (including SYMBOL_REF) can be immediate operands when generating   position independent code.  *//*#define LEGITIMATE_PIC_OPERAND_P(X)*//* Control the assembler format that we output.  *//* Output at beginning of assembler file.  */extern void arc_asm_file_start ();#undef ASM_FILE_START#define ASM_FILE_START(FILE) arc_asm_file_start (FILE)/* A C statement to output assembler commands which will identify the   object file as having been compiled with GNU CC (or another GNU   compiler).  */#undef ASM_IDENTIFY_GCC#define ASM_IDENTIFY_GCC(FILE) /* nothing *//* Needed because we define ASM_IDENTIFY_GCC.  */#define ASM_IDENTIFY_LANGUAGE(FILE) output_lang_identify (FILE)/* A C string constant describing how to begin a comment in the target   assembler language.  The compiler assumes that the comment will   end at the end of the line.  */#define ASM_COMMENT_START ";"/* Output to assembler file text saying following lines   may contain character constants, extra white space, comments, etc.  */#define ASM_APP_ON ""/* Output to assembler file text saying following lines   no longer contain unusual constructs.  */#define ASM_APP_OFF ""/* This is how to output an assembler line defining a `char' constant.  */#define ASM_OUTPUT_CHAR(FILE, VALUE) \( fprintf (FILE, "\t.byte\t"),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))/* This is how to output an assembler line defining a `short' constant.  */#define ASM_OUTPUT_SHORT(FILE, VALUE) \( fprintf (FILE, "\t.hword\t"),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))/* This is how to output an assembler line defining an `int' constant.   We also handle symbol output here.  Code addresses must be right shifted   by 2 because that's how the jump instruction wants them.  */#define ASM_OUTPUT_INT(FILE, VALUE) \do {									\  fprintf (FILE, "\t.word\t");						\  if ((GET_CODE (VALUE) == SYMBOL_REF && SYMBOL_REF_FLAG (VALUE))	\      || GET_CODE (VALUE) == LABEL_REF)					\    {									\      fprintf (FILE, "%%st(");						\      output_addr_const (FILE, (VALUE));				\      fprintf (FILE, ")");						\    }									\  else									\    output_addr_const (FILE, (VALUE));					\  fprintf (FILE, "\n");							\} while (0)/* This is how to output an assembler line defining a `float' constant.  */#define ASM_OUTPUT_FLOAT(FILE, VALUE) \

⌨️ 快捷键说明

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