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

📄 arc.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
   and check its validity for a certain class.   We have two alternate definitions for each of them.   The usual definition accepts all pseudo regs; the other rejects   them unless they have been allocated suitable hard regs.   The symbol REG_OK_STRICT causes the latter definition to be used.   Most source files want to accept pseudo regs in the hope that   they will get allocated to the class that the insn wants them to be in.   Source files for reload pass need to be strict.   After reload, it makes no difference, since pseudo regs have   been eliminated by then.  */#ifndef REG_OK_STRICT/* Nonzero if X is a hard reg that can be used as an index   or if it is a pseudo reg.  */#define REG_OK_FOR_INDEX_P(X) \((unsigned) REGNO (X) - 32 >= FIRST_PSEUDO_REGISTER - 32)/* Nonzero if X is a hard reg that can be used as a base reg   or if it is a pseudo reg.  */#define REG_OK_FOR_BASE_P(X) \((unsigned) REGNO (X) - 32 >= FIRST_PSEUDO_REGISTER - 32)#else/* Nonzero if X is a hard reg that can be used as an index.  */#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))/* Nonzero if X is a hard reg that can be used as a base reg.  */#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))#endif/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression   that is a valid memory address for an instruction.   The MODE argument is the machine mode for the MEM expression   that wants to use this address.  *//* The `ld' insn allows [reg],[reg+shimm],[reg+limm],[reg+reg],[limm]   but the `st' insn only allows [reg],[reg+shimm],[limm].   The only thing we can do is only allow the most strict case `st' and hope   other parts optimize out the restrictions for `ld'.  *//* local to this file */#define RTX_OK_FOR_BASE_P(X) \(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;						\}/* 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;				\}/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,   return the mode to be used for the comparison.  */#define SELECT_CC_MODE(OP, X, Y) \arc_select_cc_mode (OP, X, Y)/* Return nonzero if SELECT_CC_MODE will never return MODE for a   floating point inequality comparison.  */#define REVERSIBLE_CC_MODE(MODE) 1 /*???*//* Costs.  *//* Compute extra cost of moving data between one register class   and another.  */#define REGISTER_MOVE_COST(MODE, 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/* 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/* 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 const 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#endif#define DATA_SECTION_ASM_OP	arc_data_section#undef  READONLY_DATA_SECTION_ASM_OP#define READONLY_DATA_SECTION_ASM_OP	arc_rodata_section#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*//* For DWARF.  Marginally different than default so output is "prettier"   (and consistent with above).  */#define PUSHSECTION_ASM_OP "\t.section "/* 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  (flag_pic ? 26 : INVALID_REGNUM)/* 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.  *//* 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 ""/* Globalizing directive for a label.  */#define GLOBAL_ASM_OP "\t.global\t"/* This is how to output a reference to a user-level label named NAME.   `assemble_name' uses this.  *//* We mangle all user labels to provide protection from linking code   compiled for different cpus.  *//* We work around a dwarfout.c deficiency by watching for labels from it and   not adding the '_' prefix nor the cpu suffix.  There is a comment in   dwarfout.c that says it should be using (*targetm.asm_out.internal_label).  */extern const char *arc_mangle_cpu;#define ASM_OUTPUT_LABELREF(FILE, NAME) \do {							\  if ((NAME)[0] == '.' && (NAME)[1] == 'L')		\    fprintf (FILE, "%s", NAME);				\  else							\    {							\      fputc ('_', FILE);				\      if (TARGET_MANGLE_CPU && arc_mangle_cpu != NULL)	\	fprintf (FILE, "%s_", arc_mangle_cpu);		\      fprintf (FILE, "%s", NAME);			\    }							\} while (0)/* Assembler pseudo-op to equate one value with another.  *//* ??? This is needed because dwarfout.c provides a default definition too   late for defaults.h (which contains the default definition of ASM_OUTPUT_DEF   that we use).  */#define SET_ASM_OP "\t.set\t"/* How to refer to registers in assembler output.   This sequence is indexed by compiler's hard-register-number (see above).  */#define REGISTER_NAMES \{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",		\ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",		\ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",	\ "r24", "r25", "r26", "fp", "sp", "ilink1", "ilink2", "blink",	\ "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39",	\ "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47",	\ "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55",	\ "r56", "r57", "r58", "r59", "lp_count", "cc"}/* Entry to the insn conditionalizer.  */#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \arc_final_prescan_insn (INSN, OPVEC, NOPERANDS)/* A C expression which evaluates to true if CODE is a valid   punctuation character for use in the `PRINT_OPERAND' macro.  */extern char arc_punct_chars[256];#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \arc_punct_chars[(unsigned char) (CHAR)]/* Print operand X (an rtx) in assembler syntax to file FILE.   CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.   For `%' followed by punctuation, CODE is the punctuation and X is null.  */#define PRINT_OPERAND(FILE, X, CODE) \arc_print_operand (FILE, X, CODE)/* A C compound statement to output to stdio stream STREAM the   assembler syntax for an instruction operand that is a memory   reference whose address is ADDR.  ADDR is an RTL expression.  */#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \arc_print_operand_address (FILE, ADDR)/* This is how to output an element of a case-vector that is absolute.  */#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \do {							\  char label[30];					\  ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE);	\  fprintf (FILE, "\t.word %%st(");			\  assemble_name (FILE, label);				\  fprintf (FILE, ")\n");				\} while (0)/* This is how to output an element of a case-vector that is relative.  */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \do {							\  char label[30];					\  ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE);	\  fprintf (FILE, "\t.word %%st(");			\  assemble_name (FILE, label);				\  fprintf (FILE, "-");					\  ASM_GENERATE_INTERNAL_LABEL (label, "L", REL);	\  assemble_name (FILE, label);				\  fprintf (FILE, ")\n");				\} while (0)/* The desired alignment for the location counter at the beginning   of a loop.  *//* On the ARC, align loops to 32 byte boundaries (cache line size)   if -malign-loops.  */#define LOOP_ALIGN(LABEL) (TARGET_ALIGN_LOOPS ? 5 : 0)/* This is how to output an assembler line   that says to advance the location counter   to a multiple of 2**LOG bytes.  */#define ASM_OUTPUT_ALIGN(FILE,LOG) \do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", 1 << (LOG)); } while (0)/* Debugging information.  *//* Generate DBX and DWARF debugging information.  */#define DBX_DEBUGGING_INFO 1/* Prefer STABS (for now).  */#undef PREFERRED_DEBUGGING_TYPE#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG/* Turn off splitting of long stabs.  */#define DBX_CONTIN_LENGTH 0/* Miscellaneous.  *//* Specify the machine mode that this machine uses   for the index in the tablejump instruction.  */#define CASE_VECTOR_MODE Pmode/* Define if operations between registers always perform the operation   on the full register even if a narrower mode is specified.  */#define WORD_REGISTER_OPERATIONS/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD   will either zero-extend or sign-extend.  The value of this macro should   be the code that says which one of the two operations is implicitly   done, UNKNOWN if none.  */#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND/* Max number of bytes we can move from memory to memory   in one reasonably fast instruction.  */#define MOVE_MAX 4/* Define this to be nonzero if shift instructions ignore all but the low-order   few bits.  */#define SHIFT_COUNT_TRUNCATED 1/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits   is done just by pretending it is already truncated.  */#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1/* Specify the machine mode that pointers have.   After generation of rtl, the compiler makes no further distinction   between pointers and any other objects of this machine mode.  *//* ??? The arc doesn't have full 32 bit pointers, but making this PSImode has   its own problems (you have to add extendpsisi2 and trucnsipsi2 but how does   one do it without getting excess code?).  Try to avoid it.  */#define Pmode SImode/* A function address in a call instruction.  */#define FUNCTION_MODE SImode/* alloca should avoid clobbering the old register save area.  *//* ??? Not defined in tm.texi.  */#define SETJMP_VIA_SAVE_AREA/* Define the information needed to generate branch and scc insns.  This is   stored from the compare operation.  Note that we can't use "rtx" here   since it hasn't been defined!  */extern struct rtx_def *arc_compare_op0, *arc_compare_op1;/* ARC function types.  */enum arc_function_type {  ARC_FUNCTION_UNKNOWN, ARC_FUNCTION_NORMAL,  /* These are interrupt handlers.  The name corresponds to the register     name that contains the return address.  */  ARC_FUNCTION_ILINK1, ARC_FUNCTION_ILINK2};#define ARC_INTERRUPT_P(TYPE) \((TYPE) == ARC_FUNCTION_ILINK1 || (TYPE) == ARC_FUNCTION_ILINK2)/* Compute the type of a function from its DECL.  *//* Implement `va_start' for varargs and stdarg.  */#define EXPAND_BUILTIN_VA_START(valist, nextarg) \  arc_va_start (valist, nextarg)

⌨️ 快捷键说明

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