?? tm-mips.h
字號:
case CONST_DOUBLE: \ return 5;/* Used in by the peephole code. */#define additive_op(op,mode) (GET_CODE (op) == PLUS || GET_CODE (op) == MINUS)/* 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 the vax. *//* Tell final.c how to eliminate redundant test instructions. *//* 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 the vax. *//* 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) \ CC_STATUS_INIT;/* Here we define machine-dependent flags and fields in cc_status (see `conditions.h'). *//* Control the assembler format that we output. *//* Output at beginning of assembler file. If we are optimizing to use the global pointer, create a temporary file to hold all of the text stuff, and write it out to the end. This is needed because the MIPS assembler is evidently one pass, and if it hasn't seen the relevant .comm/.lcomm/.extern/.sdata declaration when the code is processed, it generates a two instruction sequence. */extern void mips_asm_file_start ();#define ASM_FILE_START(STREAM) mips_asm_file_start (STREAM)/* 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"/* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number (see above). */#define REGISTER_NAMES \{"$0", "at", "v0", "v1", "a0", "a1", "a2", "a3", "t0", \ "t1", "t2", "t3", "t4", "t5", "t6", "t7","s0", \ "s1","s2","s3","s4","s5","s6","s7","t8","t9", \ "k0","k1","gp","sp","fp","ra", \ "$f0","$f1","$f2","$f3","$f4","$f5","$f6","$f7","$f8","$f9", \"$f10","$f11","$f12","$f13","$f14","$f15","$f16","$f17","$f18","$f19", \"$f20","$f21","$f22","$f23","$f24","$f25","$f26","$f27","$f28","$f29", \"$f30","$f31" \}#define REGISTER_NUMCHAR \{ \"$0","$1","$2","$3","$4","$5","$6","$7","$8","$9", \"$10","$11","$12","$13","$14","$15","$16","$17","$18","$19", \"$20","$21","$22","$23","$24","$25","$26","$27","$28","$sp", \"$fp","$31", \"$f0","$f1","$f2","$f3","$f4","$f5","$f6","$f7","$f8","$f9", \"$f10","$f11","$f12","$f13","$f14","$f15","$f16","$f17","$f18","$f19", \"$f20","$f21","$f22","$f23","$f24","$f25","$f26","$f27","$f28","$f29", \"$f30","$f31" \}#define REG_NAME(reg) (TARGET_NAME_REGS ? reg_names[reg] : reg_numchar[reg])/* Define results of standard character escape sequences. */#define TARGET_BELL 007#define TARGET_BS 010#define TARGET_TAB 011#define TARGET_NEWLINE 012#define TARGET_VT 013#define TARGET_FF 014#define TARGET_CR 015/* 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'. CODE is used as follows: LIST OF PRINT OPERAND CODES: 'x' X is CONST_INT, prints 16 bits in hex format. 'd' output integer constant in decimal, ':' Prints an 'u' if flag -mnofixed-ovfl (for addu vs. add) */#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ ((CODE) == ':')#define PRINT_OPERAND(FILE, X, CODE) \{ \ if ((CODE) == ':') \ { \ if (TARGET_NOFIXED_OVFL) \ fprintf(FILE,"u"); \ } \ \ else if (GET_CODE (X) == REG) \ { \ int regnum = REGNO (X); \ \ if (CODE == 'M') \ regnum += MOST_SIGNIFICANT_WORD; \ else if (CODE == 'L') \ regnum += LEAST_SIGNIFICANT_WORD; \ else if (CODE == 'D') \ regnum++; \ \ fprintf (FILE, "%s", \ ((TARGET_NAME_REGS) ? reg_names : reg_numchar)[regnum]); \ } \ \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ \ else if (GET_CODE (X) == CONST_DOUBLE) \ { \ union { double d; int i[2]; } u; \ u.i[0] = CONST_DOUBLE_LOW (X); \ u.i[1] = CONST_DOUBLE_HIGH (X); \ if (GET_MODE (X) == SFmode) \ { \ float f; \ f = u.d; \ u.d = f; \ } \ fprintf (FILE, "%.20e", u.d); \ } \ \ else if ((CODE == 'x') && (GET_CODE(X) == CONST_INT)) \ fprintf(FILE,"0x%x", 0xffff & (INTVAL(X))); \ \ else if ((CODE == 'd') && (GET_CODE(X) == CONST_INT)) \ fprintf(FILE,"%d", (INTVAL(X))); \ \ else if ((CODE) == 'd') \ fatal ("Code d was found & insn was not CONST_INT"); \ \ else \ output_addr_const (FILE, X); \}/* Print a memory operand whose address is X, on file FILE. */#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \{ \ register rtx addr = ADDR; \ register char **reg_ptr = (TARGET_NAME_REGS) ? reg_names : reg_numchar; \ \ switch (GET_CODE (addr)) \ { \ default: \ abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, illegal insn #1"); \ break; \ \ case REG: \ fprintf (FILE, "0(%s)", reg_ptr [REGNO (addr)]); \ break; \ \ case PLUS: \ { \ register rtx reg = (rtx)0; \ register rtx offset = (rtx)0; \ register rtx arg0 = XEXP (addr, 0); \ register rtx arg1 = XEXP (addr, 1); \ \ if (GET_CODE (arg0) == REG) \ { \ reg = arg0; \ offset = arg1; \ if (GET_CODE (offset) == REG) \ abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, 2 regs"); \ } \ else if (GET_CODE (arg1) == REG) \ { \ reg = arg1; \ offset = arg0; \ } \ else if (CONSTANT_P (arg0) && CONSTANT_P (arg1)) \ { \ output_addr_const (FILE, addr); \ break; \ } \ else \ abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, no regs"); \ \ if (!CONSTANT_P (offset)) \ abort_with_insn (addr, "PRINT_OPERAND_ADDRESS, illegal insn #2"); \ \ output_addr_const (FILE, offset); \ fprintf (FILE, "(%s)", reg_ptr [REGNO (reg)]); \ } \ break; \ \ case LABEL_REF: \ case SYMBOL_REF: \ case CONST_INT: \ case CONST: \ output_addr_const (FILE, addr); \ break; \ } \}/* How to tell the debugger about changes of source files. Note, the mips ECOFF format cannot deal with changes of files inside of functions, which means the output of parser generators like bison is generally not debuggable without using the -l switch. Lose, lose, lose. Silicon graphics seems to want all .file's hardwired to 1. */#ifndef SET_FILE_NUMBER#define SET_FILE_NUMBER() ++num_source_filenames#endif#define ASM_OUTPUT_SOURCE_FILENAME(STREAM, NAME) \{ \ SET_FILE_NUMBER (); \ fprintf (STREAM, "\t%s.file\t%d \"%s\"\n", \ (TARGET_GAS || !inside_function) ? "" : "#", \ num_source_filenames, NAME); \}/* This is how to output a note the debugger telling it the line number to which the following sequence of instructions corresponds. Silicon graphics puts a label after each .loc. */#ifndef LABEL_AFTER_LOC#define LABEL_AFTER_LOC(STREAM)#endif#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) \{ \ fprintf (STREAM, "\n\t.loc\t%d %d\n", num_source_filenames, LINE); \ LABEL_AFTER_LOC (STREAM); \}/* The MIPS implementation uses some labels for it's own purposed. The following lists what labels are created, and are all formed by the pattern $L[a-z].*. The machine independent portion of GCC creates labels matching: $L[A-Z][0-9]+ and $L[0-9]+. LM[0-9]+ Sillicon graphics label before each stmt. $Lb[0-9]+ Begin blocks for MIPS debug support $Ldtable Beginning of the PIC data table $Le[0-9]+ End blocks for MIPS debug support $Ls[0-9]+ FP-SP difference if -fomit-frame-pointer *//* 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. If we are optimizing the gp, remember that this label has been put out, so we know not to emit an .extern for it in mips_asm_file_end. We use one of the common bits in the IDENTIFIER tree node for this, since those bits seem to be unused, and we don't have any method of getting the decl nodes from the name. */#ifndef COLLECT#define ASM_OUTPUT_LABEL(STREAM,NAME) \do { \ assemble_name (STREAM, NAME); \ fputs (":\n", STREAM); \ \ if (TARGET_GP_OPT && mips_section_threshold != 0) \ { \ tree name_tree = get_identifier (NAME); \ TREE_ADDRESSABLE (name_tree) = 1; \ } \} while (0)#else#define ASM_OUTPUT_LABEL(STREAM,NAME) \do { \ assemble_name (STREAM, NAME); \ fputs (":\n", STREAM); \} while (0)#endif/* 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(STREAM,NAME) \ do { \ fputs ("\t.globl\t", STREAM); \ assemble_name (STREAM, NAME); \ fputs ("\n", STREAM); \ } while (0)/* This says how to output an assembler line to define a global common symbol. */#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \do { \ fputs ("\n\t.comm\t", (STREAM)); \ assemble_name ((STREAM), (NAME)); \ fprintf ((STREAM), ",%u\n", (ROUNDED)); \ \ if (TARGET_GP_OPT && mips_section_threshold != 0) \ { \ tree name_tree = get_identifier (NAME); \ TREE_ADDRESSABLE (name_tree) = 1; \ } \} while (0)/* This says how to output an assembler line to define a local common symbol. */#define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \do { \ fputs ("\n\t.lcomm\t", (STREAM)); \ assemble_name ((STREAM), (NAME)); \ fprintf ((STREAM), ",%u\n", (ROUNDED)); \ \ if (TARGET_GP_OPT && mips_section_threshold != 0) \ { \ tree name_tree = get_identifier (NAME); \ TREE_ADDRESSABLE (name_tree) = 1; \ } \} while (0)/* This says how to output an external. It would be possible not to output anything and let undefined symbol become external. However the assembler uses length information on externals to allocate in data/sdata bss/sbss, thereby saving exec time. */#define ASM_OUTPUT_EXTERNAL(STREAM,DECL,NAME) \ mips_output_external(STREAM,DECL,NAME)/* This says what to print at the end of the assembly file */#define ASM_FILE_END(STREAM) mips_asm_file_end(STREAM)/* This is how to declare a function name. The actual work of emitting the label is moved to function_prologue, so that we can get the line number correctly emitted before the .ent directive, and after any .file directives. Also, switch files if we are optimizing the global pointer. */#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \{ \ extern FILE *asm_out_text_file; \ if (TARGET_GP_OPT) \ STREAM = asm_out_text_file; \ \ current_function_name = NAME; \}/* This is how to output a reference to a user-level label named NAME. `assemble_name' uses this. */#define ASM_OUTPUT_LABELREF(STREAM,NAME) \ fprintf (STREAM, "%s", NAME)/* 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(STREAM,PREFIX,NUM) \ fprintf (STREAM, "$%s%d:\n", PREFIX, NUM)/* 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 an assembler line defining a `double' constant. */#define ASM_OUTPUT_DOUBLE(STR
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -