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

📄 arc.h

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 H
📖 第 1 页 / 共 4 页
字号:
    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 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.  *//* Output at beginning of assembler file.  */#undef ASM_FILE_START#define ASM_FILE_START(FILE) arc_asm_file_start (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 ""/* Globalizing directive for a label.  */#define GLOBAL_ASM_OP "\t.global\t"/* A C statement (sans semicolon) to output on FILE an assembler pseudo-op to   declare a library function name external.  The name of the library function   is given by SYMREF, which has type RTX and is a SYMBOL_REF.  */#if 0/* On the ARC we want to have libgcc's for multiple cpus in one binary.   We can't use `assemble_name' here as that will call ASM_OUTPUT_LABELREF   and we'll get another suffix added on if -mmangle-cpu.  */extern const char *arc_mangle_cpu;#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, SYMREF) \do {							\  if (TARGET_MANGLE_CPU_LIBGCC)				\    {							\      fprintf (FILE, "\t.rename\t_%s, _%s%s\n",		\	       XSTR (SYMREF, 0), XSTR (SYMREF, 0),	\	       arc_mangle_suffix);			\    }							\} while (0)#endif/* 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 ASM_OUTPUT_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)/* This is how to output a definition of an internal numbered label where   PREFIX is the class of label and NUM is the number within the class.  */#undef ASM_OUTPUT_INTERNAL_LABEL#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \do {						\  arc_ccfsm_at_label (PREFIX, NUM);		\  fprintf (FILE, ".%s%d:\n", PREFIX, NUM);	\} while (0)/* Store in OUTPUT a string (made with alloca) containing   an assembler-name for a local static variable named NAME.   LABELNO is an integer which is different for each call.  */#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\  sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))/* 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#define DWARF_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 as C expression which evaluates to nonzero if the tablejump   instruction expects the table to contain offsets from the address of the   table.   Do not define this if the table should contain absolute addresses.  *//* It's not clear what PIC will look like or whether we want to use -fpic   for the embedded form currently being talked about.  For now require -fpic   to get pc relative switch tables.  *//*#define CASE_VECTOR_PC_RELATIVE 1 *//* 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, NIL 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/* We assume that the store-condition-codes instructions store 0 for false   and some other value for true.  This is the value stored for true.  */#define STORE_FLAG_VALUE 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)/* Implement `va_arg'.  */#define EXPAND_BUILTIN_VA_ARG(valist, type) \  arc_va_arg (valist, type)

⌨️ 快捷键说明

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