📄 mips.h
字号:
#error "Define MACHINE_TYPE in the appropriate tm.h file"#endif#endif/* Tell collect what flags to pass to nm. */#ifndef NM_FLAGS#define NM_FLAGS "-Bp"#endif/* Names to predefine in the preprocessor for this target machine. */#ifndef CPP_PREDEFINES#define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43 \-D_mips -D_unix -D_host_mips -D_MIPSEB -D_R3000 -D_SYSTYPE_BSD43"#endif/* Extra switches sometimes passed to the assembler. */#ifndef ASM_SPEC#define ASM_SPEC "\%{!mgas: \ %{!mrnames: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}}} \ %{pipe: %e-pipe is not supported.} \ %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K}} \%{G*}"#endif /* ASM_SPEC *//* Specify to run a post-processor, mips-tfile after the assembler has run to stuff the mips debug information into the object file. This is needed because the $#!%^ MIPS assembler provides no way of specifying such information in the assembly file. If we are cross compiling, disable mips-tfile unless the user specifies -mmips-tfile. */#ifndef ASM_FINAL_SPEC#ifndef CROSS_COMPILE#define ASM_FINAL_SPEC "\%{!mgas: %{!mno-mips-tfile: \ \n mips-tfile %{v*: -v} \ %{K: -I %b.o~} \ %{!K: %{save-temps: -I %b.o~}} \ %{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \ %{.s:%i} %{!.s:%g.s}}}"#else /* CROSS_COMPILE */#define ASM_FINAL_SPEC "\%{!mgas: %{mmips-tfile: \ \n mips-tfile %{v*: -v} \ %{K: -I %b.o~} \ %{!K: %{save-temps: -I %b.o~}} \ %{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \ %{.s:%i} %{!.s:%g.s}}}"#endif /* CROSS_COMPILE */#endif /* ASM_FINAL_SPEC *//* Redefinition of libraries used. Mips doesn't support normal UNIX style profiling via calling _mcount. It does offer profiling that samples the PC, so do what we can... */#ifndef LIB_SPEC#define LIB_SPEC "%{pg:-lprof1} %{p:-lprof1} -lc"#endif/* Extra switches sometimes passed to the linker. */#ifndef LINK_SPEC#define LINK_SPEC "\%{G*} \%{!mgas: \ %{pipe: %e-pipe is not supported.} \ %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} \ %{bestGnum} %{shared} %{non_shared}}"#endif /* LINK_SPEC defined *//* Specs for the compiler proper */#ifndef CC1_SPEC#define CC1_SPEC "\%{O*: %{!mno-gpOPT:%{!mno-gpopt: -mgpopt}}} \%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \%{G*} \%{pic-none: -mno-half-pic} \%{pic-lib: -mhalf-pic} \%{pic-extern: -mhalf-pic} \%{pic-calls: -mhalf-pic} \%{save-temps: }"#endif/* Preprocessor specs */#ifndef CPP_SPEC#define CPP_SPEC "\%{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \%{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \%{.C: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \%{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C} \%{.S: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \%{!.S: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"#endif/* If defined, this macro is an additional prefix to try after `STANDARD_EXEC_PREFIX'. */#ifndef MD_EXEC_PREFIX#define MD_EXEC_PREFIX "/usr/lib/cmplrs/cc/"#endif#ifndef MD_STARTFILE_PREFIX#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/"#endif/* Print subsidiary information on the compiler version in use. */#define MIPS_VERSION "[AL 1.1, MM 33]"#ifndef MACHINE_TYPE#define MACHINE_TYPE "BSD Mips"#endif#ifndef TARGET_VERSION_INTERNAL#define TARGET_VERSION_INTERNAL(STREAM) \ fprintf (STREAM, " %s %s", MIPS_VERSION, MACHINE_TYPE)#endif#ifndef TARGET_VERSION#define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr)#endif#define SDB_DEBUGGING_INFO /* generate info for mips-tfile */#define DBX_DEBUGGING_INFO /* generate stabs (OSF/rose) */#define MIPS_DEBUGGING_INFO /* MIPS specific debugging info */#ifndef PREFERRED_DEBUGGING_TYPE /* assume SDB_DEBUGGING_INFO */#define PREFERRED_DEBUGGING_TYPE ((len > 1 && !strncmp (str, "ggdb", len)) ? DBX_DEBUG : SDB_DEBUG)#endif/* By default, turn on GDB extensions. */#define DEFAULT_GDB_EXTENSIONS 1/* If we are passing smuggling stabs through the MIPS ECOFF object format, put a comment in front of the .stab<x> operation so that the MIPS assembler does not choke. The mips-tfile program will correctly put the stab into the object file. */#define ASM_STABS_OP ((TARGET_GAS) ? ".stabs" : " #.stabs")#define ASM_STABN_OP ((TARGET_GAS) ? ".stabn" : " #.stabn")#define ASM_STABD_OP ((TARGET_GAS) ? ".stabd" : " #.stabd")/* Forward references to tags are allowed. */#define SDB_ALLOW_FORWARD_REFERENCES/* Unknown tags are also allowed. */#define SDB_ALLOW_UNKNOWN_REFERENCES/* On Sun 4, this limit is 2048. We use 1500 to be safe, since the length can run past this up to a continuation point. */#define DBX_CONTIN_LENGTH 1500/* How to renumber registers for dbx and gdb. */#define DBX_REGISTER_NUMBER(REGNO) mips_dbx_regno[ (REGNO) ]/* Overrides for the COFF debug format. */#define PUT_SDB_SCL(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.scl\t%d;", (a)); \} while (0)#define PUT_SDB_INT_VAL(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.val\t%d;", (a)); \} while (0)#define PUT_SDB_VAL(a) \do { \ extern FILE *asm_out_text_file; \ fputs ("\t.val\t", asm_out_text_file); \ output_addr_const (asm_out_text_file, (a)); \ fputc (';', asm_out_text_file); \} while (0)#define PUT_SDB_DEF(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t#.def\t"); \ ASM_OUTPUT_LABELREF (asm_out_text_file, a); \ fputc (';', asm_out_text_file); \} while (0)#define PUT_SDB_PLAIN_DEF(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t#.def\t.%s;", (a)); \} while (0)#define PUT_SDB_ENDEF \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.endef\n"); \} while (0)#define PUT_SDB_TYPE(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.type\t0x%x;", (a)); \} while (0)#define PUT_SDB_SIZE(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.size\t%d;", (a)); \} while (0)#define PUT_SDB_DIM(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.dim\t%d;", (a)); \} while (0)#ifndef PUT_SDB_START_DIM#define PUT_SDB_START_DIM \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.dim\t"); \} while (0)#endif#ifndef PUT_SDB_NEXT_DIM#define PUT_SDB_NEXT_DIM(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "%d,", a); \} while (0)#endif#ifndef PUT_SDB_LAST_DIM#define PUT_SDB_LAST_DIM(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "%d;", a); \} while (0)#endif#define PUT_SDB_TAG(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.tag\t"); \ ASM_OUTPUT_LABELREF (asm_out_text_file, a); \ fputc (';', asm_out_text_file); \} while (0)/* For block start and end, we create labels, so that later we can figure out where the correct offset is. The normal .ent/.end serve well enough for functions, so those are just commented out. */#define PUT_SDB_BLOCK_START(LINE) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, \ "$Lb%d:\n\t#.begin\t$Lb%d\t%d\n", \ sdb_label_count, \ sdb_label_count, \ (LINE)); \ sdb_label_count++; \} while (0)#define PUT_SDB_BLOCK_END(LINE) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, \ "$Le%d:\n\t#.bend\t$Le%d\t%d\n", \ sdb_label_count, \ sdb_label_count, \ (LINE)); \ sdb_label_count++; \} while (0)#define PUT_SDB_FUNCTION_START(LINE)#define PUT_SDB_FUNCTION_END(LINE)#define PUT_SDB_EPILOGUE_END(NAME)#define SDB_GENERATE_FAKE(BUFFER, NUMBER) \ sprintf ((BUFFER), ".%dfake", (NUMBER));/* Correct the offset of automatic variables and arguments. Note that the MIPS debug format wants all automatic variables and arguments to be in terms of the virtual frame pointer (stack pointer before any adjustment in the function), while the MIPS 3.0 linker wants the frame pointer to be the stack pointer after the initial adjustment. */#define DEBUGGER_AUTO_OFFSET(X) mips_debugger_offset (X, 0)#define DEBUGGER_ARG_OFFSET(OFFSET, X) mips_debugger_offset (X, OFFSET)/* Tell collect that the object format is ECOFF */#ifndef OBJECT_FORMAT_ROSE#define OBJECT_FORMAT_COFF /* Object file looks like COFF */#define EXTENDED_COFF /* ECOFF, not normal coff */#endif/* Don't use the default definitions, because we don't have gld. Also, we don't want stabs when generating ECOFF output. Instead we depend on collect to handle these. */#define ASM_OUTPUT_CONSTRUCTOR(file, name)#define ASM_OUTPUT_DESTRUCTOR(file, name)/* Run-time compilation parameters selecting different hardware subsets. *//* Macros used in the machine description to test the flags. */ /* Bits for real switches */#define MASK_INT64 0x00000001 /* ints are 64 bits */#define MASK_LONG64 0x00000002 /* longs are 64 bits */#define MASK_LLONG128 0x00000004 /* long longs are 128 bits */#define MASK_GPOPT 0x00000008 /* Optimize for global pointer */#define MASK_GAS 0x00000010 /* Gas used instead of MIPS as */#define MASK_NAME_REGS 0x00000020 /* Use MIPS s/w reg name convention */#define MASK_STATS 0x00000040 /* print statistics to stderr */#define MASK_MEMCPY 0x00000080 /* call memcpy instead of inline code*/#define MASK_SOFT_FLOAT 0x00000100 /* software floating point */#define MASK_FLOAT64 0x00000200 /* fp registers are 64 bits */#define MASK_ABICALLS 0x00000400 /* emit .abicalls/.cprestore/.cpload */#define MASK_HALF_PIC 0x00000800 /* Emit OSF-style pic refs to externs*/#define MASK_UNUSED1 0x00001000#define MASK_UNUSED2 0x00002000#define MASK_UNUSED3 0x00004000#define MASK_UNUSED4 0x00008000#define MASK_UNUSED5 0x00010000#define MASK_UNUSED6 0x00020000#define MASK_UNUSED7 0x00040000#define MASK_UNUSED8 0x00080000 /* Dummy switches used only in spec's*/#define MASK_MIPS_TFILE 0x00000000 /* flag for mips-tfile usage */ /* switches not used yet */#define MASK_WC8 0x00000000 /* wchar's are 8 bits, not 32 */#define MASK_WC16 0x00000000 /* wchar's are 16 bits, not 32 */#define MASK_WC32 0x00000000 /* dummy for consistency */ /* Debug switches, not documented */#define MASK_DEBUG 0x40000000 /* Eliminate version # in .s file */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -