📄 mips.h
字号:
#if MIPS_ISA_DEFAULT != 3 && MIPS_ISA_DEFAULT != 4 && MIPS_ISA_DEFAULT != 5 && MIPS_ISA_DEFAULT != 64/* 32-bit cases first. */#if MIPS_ABI_DEFAULT == ABI_EABI#define SUBTARGET_CPP_SIZE_SPEC "\%{mabi=eabi|!mabi=*:\ %{mips1|mips2|mips32|mlong32|mgp32:%{!mips3:%{!mips4:%{!mips5:%{!mips64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}} \ %{mlong64:\ %{mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}\ %{mips3|mips4|mips5|mips64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}} \ %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}}\%{mabi=o64:\ %{mlong64:\ %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \"#endif#if MIPS_ABI_DEFAULT == ABI_O64#define SUBTARGET_CPP_SIZE_SPEC "\%{mabi=eabi:\ %{mips1|mips2|mips32|mlong32|mgp32:%{!mips3:%{!mips4:%{!mips5:%{!mips64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}} \ %{mlong64:\ %{mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}\ %{mips3|mips4|mips5|mips64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}} \ %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}}\%{mabi=o64|!mabi=*:\ %{mlong64:\ %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\"#endif#if MIPS_ABI_DEFAULT == ABI_32#define SUBTARGET_CPP_SIZE_SPEC "\%{mabi=eabi:\ %{mips1|mips2|mips32|mlong32|mgp32:%{!mips3:%{!mips4:%{!mips5:%{!mips64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}} \ %{mlong64:\ %{mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}\ %{mips3|mips4|mips5|mips64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}} \ %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}}\%{mabi=o64:\ %{mlong64:\ %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \%{mabi=32|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\"#endif#if MIPS_ABI_DEFAULT == ABI_MEABI#define SUBTARGET_CPP_SIZE_SPEC "\%{mabi=eabi:\ %{mips1|mips2|mips32|mlong32|mgp32:%{!mips3:%{!mips4:%{!mips5:%{!mips64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}} \ %{mlong64:\ %{mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}\ %{mips3|mips4|mips5|mips64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}} \ %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}}}}}}}}}}}\%{mabi=o64:\ %{mlong64:\ %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\%{mabi=meabi|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \"#endif#else/* 64-bit default ISA. */#if MIPS_ABI_DEFAULT == ABI_EABI#define SUBTARGET_CPP_SIZE_SPEC "\%{mabi=eabi|!mabi=*: \ %{mips1|mips2|mips32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mlong32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mips3|mips4|mips5|mips64:%{!mips1:%{!mips2:%{!mips32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}\ %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}}}}}}}\ %{mgp64:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}\%{mabi=o64:\ %{mlong64:\ %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \"#endif#if MIPS_ABI_DEFAULT == ABI_O64#define SUBTARGET_CPP_SIZE_SPEC "\%{mabi=eabi: \ %{mips1|mips2|mips32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mlong32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mips3|mips4|mips5|mips64:%{!mips1:%{!mips2:%{!mips32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}\ %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}}}}}}}\ %{mgp64:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}\%{mabi=o64|!mabi=*:\ %{mlong64:\ %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\"#endif#if MIPS_ABI_DEFAULT == ABI_32#define SUBTARGET_CPP_SIZE_SPEC "\%{mabi=eabi:\ %{mips1|mips2|mips32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mlong32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mips3|mips4|mips5|mips64:%{!mips1:%{!mips2:%{!mips32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}\ %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}}}}}}}\ %{mgp64:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}\%{mabi=o64:\ %{mlong64:\ %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \%{mabi=32|!mabi=*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\"#endif#if MIPS_ABI_DEFAULT == ABI_MEABI#define SUBTARGET_CPP_SIZE_SPEC "\%{mabi=eabi:\ %{mips1|mips2|mips32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mlong32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ %{mips3|mips4|mips5|mips64:%{!mips1:%{!mips2:%{!mips32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}\ %{!mips1:%{!mips2:%{!mips3:%{!mips4:%{!mips5:%{!mips32:%{!mips64:%{!mlong32:%{!mlong64:%{!mgp32:%{!mgp64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}}}}}}}}}\ %{mgp64:%{!mlong32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int}}}\%{mabi=o64:\ %{mlong64:\ %{!mgp32:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ %{mgp32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \ %{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}} \%{mabi=32:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}\%{mabi=meabi|!mabi=*:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \"#endif#endif#endif/* SUBTARGET_CPP_SPEC is passed to the preprocessor. It may be overridden by subtargets. */#ifndef SUBTARGET_CPP_SPEC#define SUBTARGET_CPP_SPEC ""#endif/* If we're using 64bit longs, then we have to define __LONG_MAX__ correctly. Similarly for 64bit ints and __INT_MAX__. */#ifndef LONG_MAX_SPEC#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_LONG64)#define LONG_MAX_SPEC "%{!mlong32:-D__LONG_MAX__=9223372036854775807L}"#else#define LONG_MAX_SPEC "%{mlong64:-D__LONG_MAX__=9223372036854775807L}"#endif#endif/* Define appropriate macros for fpr register size. */#ifndef CPP_FPR_SPEC#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_FLOAT64)#define CPP_FPR_SPEC "-D__mips_fpr=64"#else#define CPP_FPR_SPEC "-D__mips_fpr=32"#endif#endif/* For C++ we need to ensure that _LANGUAGE_C_PLUS_PLUS is defined independent of the source file extension. */#undef CPLUSPLUS_CPP_SPEC#define CPLUSPLUS_CPP_SPEC "\-D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS \%(cpp) \"/* CPP_SPEC is the set of arguments to pass to the preprocessor. */#ifndef CPP_SPEC#define CPP_SPEC "\%{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C -D__LANGUAGE_C -D_LANGUAGE_C} \%{.S|.s: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \%{!.S: %{!.s: %{!.cc: %{!.cxx: %{!.cpp: %{!.cp: %{!.c++: %{!.C: %{!.m: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}}}}}}}}} \%(subtarget_cpp_size_spec) \%{mips3:-U__mips -D__mips=3 -D__mips64} \%{mips4:-U__mips -D__mips=4 -D__mips64} \%{mips32:-U__mips -D__mips=32} \%{mips64:-U__mips -D__mips=64 -D__mips64} \%{mgp32:-U__mips64} %{mgp64:-D__mips64} \%{mfp32:-D__mips_fpr=32} %{mfp64:-D__mips_fpr=64} %{!mfp32: %{!mfp64: %{mgp32:-D__mips_fpr=32} %{!mgp32: %(cpp_fpr_spec)}}} \%{msingle-float:%{!msoft-float:-D__mips_single_float}} \%{m4650:%{!msoft-float:-D__mips_single_float}} \%{msoft-float:-D__mips_soft_float} \%{mabi=eabi:-D__mips_eabi} \%{mips16:%{!mno-mips16:-D__mips16}} \%{EB:-UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__ -D_MIPSEB -D__MIPSEB -D__MIPSEB__ %{!ansi:-DMIPSEB}} \%{EL:-UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ %{!ansi:-DMIPSEL}} \%(long_max_spec) \%(subtarget_cpp_spec) "#endif/* This macro defines names of additional specifications to put in the specs that can be used in various specifications like CC1_SPEC. Its definition is an initializer with a subgrouping for each command option. Each subgrouping contains a string constant, that defines the specification name, and a string constant that used by the GNU CC driver program. Do not define this macro if it does not need to do anything. */#define EXTRA_SPECS \ { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ { "cc1_cpu_spec", CC1_CPU_SPEC}, \ { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ { "subtarget_cpp_size_spec", SUBTARGET_CPP_SIZE_SPEC }, \ { "long_max_spec", LONG_MAX_SPEC }, \ { "cpp_fpr_spec", CPP_FPR_SPEC }, \ { "mips_as_asm_spec", MIPS_AS_ASM_SPEC }, \ { "gas_asm_spec", GAS_ASM_SPEC }, \ { "abi_gas_asm_spec", ABI_GAS_ASM_SPEC }, \ { "target_asm_spec", TARGET_ASM_SPEC }, \ { "subtarget_mips_as_asm_spec", SUBTARGET_MIPS_AS_ASM_SPEC }, \ { "subtarget_asm_optimizing_spec", SUBTARGET_ASM_OPTIMIZING_SPEC }, \ { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC }, \ { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \ { "endian_spec", ENDIAN_SPEC }, \ SUBTARGET_EXTRA_SPECS#ifndef SUBTARGET_EXTRA_SPECS#define SUBTARGET_EXTRA_SPECS#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 40]"#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 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) ? "\t.stabs\t" : " #.stabs\t")#define ASM_STABN_OP ((TARGET_GAS) ? "\t.stabn\t" : " #.stabn\t")#define ASM_STABD_OP ((TARGET_GAS) ? "\t.stabd\t" : " #.stabd\t")/* Local compiler-generated symbols must have a prefix that the assembler understands. By default, this is $, although some targets (e.g., NetBSD-ELF) need to override this. */#ifndef LOCAL_LABEL_PREFIX#define LOCAL_LABEL_PREFIX "$"#endif/* By default on the mips, external symbols do not have an underscore prepended, but some targets (e.g., NetBSD) require this. */#ifndef USER_LABEL_PREFIX#define USER_LABEL_PREFIX ""#endif/* 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. */#undef DBX_CONTIN_LENGTH#define DBX_CONTIN_LENGTH 1500/* How to renumber registers for dbx and gdb. */#define DBX_REGISTER_NUMBER(REGNO) mips_dbx_regno[ (REGNO) ]/* The mapping from gcc register number to DWARF 2 CFA column number. This mapping does not allow for tracking register 0, since SGI's broken dwarf reader thinks column 0 is used for the frame address, but since register 0 is fixed this is not a problem. */#define DWARF_FRAME_REGNUM(REG) \ (REG == GP_REG_FIRST + 31 ? DWARF_FRAME_RETURN_COLUMN : REG)/* The DWARF 2 CFA column which tracks the return address. */#define DWARF_FRAME_RETURN_COLUMN (FP_REG_LAST + 1)/* Before the prologue, RA lives in r31. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -