convex.h
来自「gcc3.2.1源代码」· C头文件 代码 · 共 1,365 行 · 第 1/4 页
H
1,365 行
also convert validly to an unsigned one. */#define FIXUNS_TRUNC_LIKE_FIX_TRUNC/* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */#define MOVE_MAX 8/* Nonzero if access to memory by bytes is slow and undesirable. */#define SLOW_BYTE_ACCESS (! TARGET_C2)/* Define if shifts truncate the shift count which implies one can omit a sign-extension or zero-extension of a shift count. *//* #define SHIFT_COUNT_TRUNCATED *//* 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/* On Convex, it is as good to call a constant function address as to call an address kept in a register. */#define NO_FUNCTION_CSE/* When a prototype says `char' or `short', really pass an `int'. */#define PROMOTE_PROTOTYPES 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. */#define Pmode SImode/* A function address in a call instruction is a byte address (for indexing purposes) so give the MEM rtx a byte's mode. */#define FUNCTION_MODE QImode/* 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. */#define CONST_COSTS(RTX,CODE,OUTER_CODE) \ case CONST: \ case LABEL_REF: \ case SYMBOL_REF: \ case CONST_INT: \ case CONST_DOUBLE: \ return 0;/* Provide the costs of a rtl expression. This is in the body of a switch on CODE. */#define RTX_COSTS(RTX,CODE,OUTER_CODE) \ case PLUS: \ if (GET_CODE (XEXP (RTX, 0)) == REG \ && REG_POINTER (XEXP (RTX, 0)) \ && GET_CODE (XEXP (RTX, 1)) == CONST_INT) \ return 0; \ else break; \ case MULT: \ return 4 * (char) (0x03060403 >> target_cpu * 8); \ case ASHIFT: \ case LSHIFTRT: \ case ASHIFTRT: \ return 4 * (char) (0x03010403 >> target_cpu * 8); \ case MEM: \ return 5;/* Compute the cost of an address. This is meant to approximate the size and/or execution delay of an insn using that address. If the cost is approximated by the RTL complexity, including CONST_COSTS above, as is usually the case for CISC machines, this macro should not be defined. For aggressively RISCy machines, only one insn format is allowed, so this macro should be a constant. The value of this macro only matters for valid addresses. */#define ADDRESS_COST(RTX) 0/* Specify the cost of a branch insn; roughly the number of extra insns that should be added to avoid a branch. */#define BRANCH_COST 0/* Convex uses VAX or IEEE floats. Follow the host format. */#define TARGET_FLOAT_FORMAT HOST_FLOAT_FORMAT/* But must prevent real.c from constructing VAX dfloats */#define REAL_VALUE_ATOF(X,S) atof (X)/* Check a `double' value for validity for a particular machine mode. */#define CHECK_FLOAT_VALUE(MODE, D, OVERFLOW) \ (OVERFLOW = check_float_value (MODE, &D, OVERFLOW))/* Tell final.c how to eliminate redundant test instructions. *//* Here we define machine-dependent flags and fields in cc_status (see `conditions.h'). No extra ones are needed for convex. *//* Store in cc_status the expressions that the condition codes will describe after execution of an instruction whose pattern is EXP. Do not alter them if the instruction would not alter the cc's. */#define NOTICE_UPDATE_CC(EXP,INSN) {}/* Control the assembler format that we output. *//* Output at beginning of assembler file. */#if _IEEE_FLOAT_#define ASM_FILE_START(FILE) fprintf (FILE, ";NO_APP\n.fpmode ieee\n")#else#define ASM_FILE_START(FILE) fprintf (FILE, ";NO_APP\n.fpmode native\n")#endif/* Output to assembler file text saying following lines may contain character constants, extra white space, comments, etc. */#define ASM_APP_ON ";APP\n"/* Output to assembler file text saying following lines no longer contain unusual constructs. */#define ASM_APP_OFF ";NO_APP\n"/* Alignment with Convex's assembler goes like this: .text can be .aligned up to a halfword. .data and .bss can be .aligned up to a longword. .lcomm is not supported, explicit declarations in .bss must be used instead. We get alignment for word and longword .text data by conventionally using .text 2 for word-aligned data and .text 3 for longword-aligned data. This requires that the data's size be a multiple of its alignment, which seems to be always true. *//* Output before read-only data. */#define TEXT_SECTION_ASM_OP (current_section_is_text = 1, "\t.text")/* Output before writable data. */#define DATA_SECTION_ASM_OP (current_section_is_text = 0, "\t.data") /* Output before uninitialized data. */#define BSS_SECTION_ASM_OP (current_section_is_text = 0, "\t.bss") /* 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 (current_section_is_text && (LOG) > 1) \ fprintf (FILE, ".text %d\n", LOG); \ else if (current_section_is_text) \ fprintf (FILE, ".text\n.align %d\n", 1 << (LOG)); \ else \ fprintf (FILE, ".align %d\n", 1 << (LOG)); } while (0)/* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number (see above). */#define REGISTER_NAMES \{ \ "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", \ "sp", "a1", "a2", "a3", "a4", "a5", "ap", "fp", \}/* This is BSD, so it wants DBX format. */#define DBX_DEBUGGING_INFO/* Do not break .stabs pseudos into continuations. */#define DBX_CONTIN_LENGTH 0/* This is the char to use for continuation (in case we need to turn continuation back on). */#define DBX_CONTIN_CHAR '?'/* Don't use stab extensions until GDB v4 port is available for convex. */#define DEFAULT_GDB_EXTENSIONS 0#define DBX_NO_XREFS/* This is how to output the definition of a user-level label named NAME, such as the label on a static function or variable NAME. */#define ASM_OUTPUT_LABEL(FILE,NAME) \ do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)/* This is how to output a command to make the user-level label named NAME defined for reference from other files. */#define ASM_GLOBALIZE_LABEL(FILE,NAME) \ do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)/* The prefix to add to user-visible assembler symbols. */#define USER_LABEL_PREFIX "_"/* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ fprintf (FILE, "%s%d:\n", PREFIX, NUM)/* Put case tables in .text 2, where they will be word-aligned */#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \ ASM_OUTPUT_ALIGN (FILE, 2); \ ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM)#define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \ ASM_OUTPUT_ALIGN (FILE, 1)/* This is how to store into the string LABEL the symbol_ref name of an internal numbered label where PREFIX is the class of label and NUM is the number within the class. This is suitable for output with `assemble_name'. */#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ sprintf (LABEL, "*%s%d", PREFIX, NUM)/* This is how to output a string */#define ASM_OUTPUT_ASCII(FILE,STR,SIZE) do { \ size_t i, limit = (SIZE); \ fprintf ((FILE), "\tds.b \""); \ for (i = 0; i < limit; i++) { \ register int c = (STR)[i] & 0377; \ if (c >= ' ' && c < 0177 && c != '\\' && c != '"') \ putc (c, (FILE)); \ else \ fprintf ((FILE), "\\%03o", c);} \ fprintf ((FILE), "\"\n");} while (0)/* This is how to output an insn to push a register on the stack. It need not be very fast code. */#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ fprintf (FILE, "\tpsh.%c %s\n", \ S_REGNO_P (REGNO) ? 'l' : 'w', \ reg_names[REGNO])/* This is how to output an insn to pop a register from the stack. It need not be very fast code. */#define ASM_OUTPUT_REG_POP(FILE,REGNO) \ fprintf (FILE, "\tpop.%c %s\n", \ S_REGNO_P (REGNO) ? 'l' : 'w', \ reg_names[REGNO])/* This is how to output an element of a case-vector that is absolute. */#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ fprintf (FILE, "\tds.w L%d\n", VALUE)/* This is how to output an element of a case-vector that is relative. (not used on Convex) */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ fprintf (FILE, "\tds.w L%d-L%d\n", VALUE, REL)/* This is how to output an assembler line that says to advance the location counter by SIZE bytes. */#define ASM_OUTPUT_SKIP(FILE,SIZE) \ fprintf (FILE, "\tds.b %u(0)\n", (SIZE))/* This says how to output an assembler line to define a global common symbol. */#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \( fputs (".comm ", (FILE)), \ assemble_name ((FILE), (NAME)), \ fprintf ((FILE), ",%u\n", (ROUNDED)))/* This says how to output an assembler line to define a local common symbol. */#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \( bss_section (), \ assemble_name ((FILE), (NAME)), \ fprintf ((FILE), ":\tbs.b %u\n", (ROUNDED)))/* 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)))/* Output an arg count before function entries. */#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ asm_declare_function_name (FILE, NAME, DECL)/* Print an instruction operand X on file FILE. CODE is the code from the %-spec that requested printing this operand; if `%z3' was used to print operand 3, then CODE is 'z'. */#define PRINT_OPERAND(FILE, X, CODE) \ print_operand (FILE, X, CODE)/* Print a memory operand whose address is X, on file FILE. */#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ print_operand_address (FILE, ADDR)/* Do not put out GNU stabs for constructors and destructors. ld bounces them. */#define FASCIST_ASSEMBLER/* __gcc_cleanup is loader-aliased to __ap$do_registered_functions if we are linking against standard libc, 0 if old (-traditional) libc. */#define EXIT_BODY \{ \ extern void __gcc_cleanup (); \ if (__gcc_cleanup != _cleanup) \ __gcc_cleanup (); \ _cleanup (); \}/* Header for convex.c. Here at the end so we can use types defined above. */extern int target_cpu;extern int current_section_is_text;extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];extern enum reg_class reg_class_from_letter[256];extern char regno_ok_for_index_p_base[];#define regno_ok_for_index_p (regno_ok_for_index_p_base + 1)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?