📄 mips.h.svn-base
字号:
{"no-fp-exceptions", -MASK_FP_EXCEPTIONS, \ N_("FP exceptions are not enabled") }, \ {"sym32", MASK_SYM32, \ N_("Assume all symbols have 32-bit values") }, \ {"no-sym32", -MASK_SYM32, \ N_("Don't assume all symbols have 32-bit values") }, \ {"debug", MASK_DEBUG, \ NULL}, \ {"debugd", MASK_DEBUG_D, \ NULL}, \ {"", (TARGET_DEFAULT \ | TARGET_CPU_DEFAULT \ | TARGET_ENDIAN_DEFAULT \ | TARGET_FP_EXCEPTIONS_DEFAULT), \ NULL}, \}/* Default target_flags if no switches are specified */#ifndef TARGET_DEFAULT#define TARGET_DEFAULT 0#endif#ifndef TARGET_CPU_DEFAULT#define TARGET_CPU_DEFAULT 0#endif#ifndef TARGET_ENDIAN_DEFAULT#define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN#endif#ifndef TARGET_FP_EXCEPTIONS_DEFAULT#define TARGET_FP_EXCEPTIONS_DEFAULT MASK_FP_EXCEPTIONS#endif/* 'from-abi' makes a good default: you get whatever the ABI requires. */#ifndef MIPS_ISA_DEFAULT#ifndef MIPS_CPU_STRING_DEFAULT#define MIPS_CPU_STRING_DEFAULT "from-abi"#endif#endif#ifdef IN_LIBGCC2#undef TARGET_64BIT/* Make this compile time constant for libgcc2 */#ifdef __mips64#define TARGET_64BIT 1#else#define TARGET_64BIT 0#endif#endif /* IN_LIBGCC2 */#ifndef MULTILIB_ENDIAN_DEFAULT#if TARGET_ENDIAN_DEFAULT == 0#define MULTILIB_ENDIAN_DEFAULT "EL"#else#define MULTILIB_ENDIAN_DEFAULT "EB"#endif#endif#ifndef MULTILIB_ISA_DEFAULT# if MIPS_ISA_DEFAULT == 1# define MULTILIB_ISA_DEFAULT "mips1"# else# if MIPS_ISA_DEFAULT == 2# define MULTILIB_ISA_DEFAULT "mips2"# else# if MIPS_ISA_DEFAULT == 3# define MULTILIB_ISA_DEFAULT "mips3"# else# if MIPS_ISA_DEFAULT == 4# define MULTILIB_ISA_DEFAULT "mips4"# else# if MIPS_ISA_DEFAULT == 32# define MULTILIB_ISA_DEFAULT "mips32"# else# if MIPS_ISA_DEFAULT == 33# define MULTILIB_ISA_DEFAULT "mips32r2"# else# if MIPS_ISA_DEFAULT == 64# define MULTILIB_ISA_DEFAULT "mips64"# else# define MULTILIB_ISA_DEFAULT "mips1"# endif# endif# endif# endif# endif# endif# endif#endif#ifndef MULTILIB_DEFAULTS#define MULTILIB_DEFAULTS \ { MULTILIB_ENDIAN_DEFAULT, MULTILIB_ISA_DEFAULT, MULTILIB_ABI_DEFAULT }#endif/* We must pass -EL to the linker by default for little endian embedded targets using linker scripts with a OUTPUT_FORMAT line. Otherwise, the linker will default to using big-endian output files. The OUTPUT_FORMAT line must be in the linker script, otherwise -EB/-EL will not work. */#ifndef ENDIAN_SPEC#if TARGET_ENDIAN_DEFAULT == 0#define ENDIAN_SPEC "%{!EB:%{!meb:-EL}} %{EB|meb:-EB}"#else#define ENDIAN_SPEC "%{!EL:%{!mel:-EB}} %{EL|mel:-EL}"#endif#endif#define TARGET_OPTIONS \{ \ SUBTARGET_TARGET_OPTIONS \ { "tune=", &mips_tune_string, \ N_("Specify CPU for scheduling purposes"), 0}, \ { "arch=", &mips_arch_string, \ N_("Specify CPU for code generation purposes"), 0}, \ { "abi=", &mips_abi_string, \ N_("Specify an ABI"), 0}, \ { "ips", &mips_isa_string, \ N_("Specify a Standard MIPS ISA"), 0}, \ { "no-flush-func", &mips_cache_flush_func, \ N_("Don't call any cache flush functions"), 0}, \ { "flush-func=", &mips_cache_flush_func, \ N_("Specify cache flush function"), 0}, \ { "fix-vr4130", &mips_fix_vr4130_string, \ N_("Work around VR4130 mflo/mfhi errata"), 0}, \}/* This is meant to be redefined in the host dependent files. */#define SUBTARGET_TARGET_OPTIONS/* Support for a compile-time default CPU, et cetera. The rules are: --with-arch is ignored if -march is specified or a -mips is specified (other than -mips16). --with-tune is ignored if -mtune is specified. --with-abi is ignored if -mabi is specified. --with-float is ignored if -mhard-float or -msoft-float are specified. --with-divide is ignored if -mdivide-traps or -mdivide-breaks are specified. */#define OPTION_DEFAULT_SPECS \ {"arch", "%{!march=*:%{mips16:-march=%(VALUE)}%{!mips*:-march=%(VALUE)}}" }, \ {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \ {"abi", "%{!mabi=*:-mabi=%(VALUE)}" }, \ {"float", "%{!msoft-float:%{!mhard-float:-m%(VALUE)-float}}" }, \ {"divide", "%{!mdivide-traps:%{!mdivide-breaks:-mdivide-%(VALUE)}}" }#define GENERATE_DIVIDE_TRAPS (TARGET_DIVIDE_TRAPS \ && ISA_HAS_COND_TRAP)#define GENERATE_BRANCHLIKELY (TARGET_BRANCHLIKELY \ && !TARGET_SR71K \ && !TARGET_MIPS16)/* Generate three-operand multiply instructions for SImode. */#define GENERATE_MULT3_SI ((TARGET_MIPS3900 \ || TARGET_MIPS5400 \ || TARGET_MIPS5500 \ || TARGET_MIPS7000 \ || TARGET_MIPS9000 \ || TARGET_MAD \ || ISA_MIPS32 \ || ISA_MIPS32R2 \ || ISA_MIPS64) \ && !TARGET_MIPS16)/* Generate three-operand multiply instructions for DImode. */#define GENERATE_MULT3_DI ((TARGET_MIPS3900) \ && !TARGET_MIPS16)/* True if the ABI can only work with 64-bit integer registers. We generally allow ad-hoc variations for TARGET_SINGLE_FLOAT, but otherwise floating-point registers must also be 64-bit. */#define ABI_NEEDS_64BIT_REGS (TARGET_NEWABI || mips_abi == ABI_O64)/* Likewise for 32-bit regs. */#define ABI_NEEDS_32BIT_REGS (mips_abi == ABI_32)/* True if symbols are 64 bits wide. At present, n64 is the only ABI for which this is true. */#define ABI_HAS_64BIT_SYMBOLS (mips_abi == ABI_64 && !TARGET_SYM32)/* ISA has instructions for managing 64 bit fp and gp regs (e.g. mips3). */#define ISA_HAS_64BIT_REGS (ISA_MIPS3 \ || ISA_MIPS4 \ || ISA_MIPS64)/* ISA has branch likely instructions (e.g. mips2). *//* Disable branchlikely for tx39 until compare rewrite. They haven't been generated up to this point. */#define ISA_HAS_BRANCHLIKELY (!ISA_MIPS1)/* ISA has the conditional move instructions introduced in mips4. */#define ISA_HAS_CONDMOVE ((ISA_MIPS4 \ || ISA_MIPS32 \ || ISA_MIPS32R2 \ || ISA_MIPS64) \ && !TARGET_MIPS5500 \ && !TARGET_MIPS16)/* ISA has just the integer condition move instructions (movn,movz) */#define ISA_HAS_INT_CONDMOVE (TARGET_ALLEGREX)/* ISA has the mips4 FP condition code instructions: FP-compare to CC, branch on CC, and move (both FP and non-FP) on CC. */#define ISA_HAS_8CC (ISA_MIPS4 \ || ISA_MIPS32 \ || ISA_MIPS32R2 \ || ISA_MIPS64)/* This is a catch all for other mips4 instructions: indexed load, the FP madd and msub instructions, and the FP recip and recip sqrt instructions. */#define ISA_HAS_FP4 ((ISA_MIPS4 \ || ISA_MIPS64) \ && !TARGET_MIPS16)/* ISA has conditional trap instructions. */#define ISA_HAS_COND_TRAP (!ISA_MIPS1 \ && !TARGET_MIPS16 \ && !TARGET_ALLEGREX) /* ISA has integer multiply-accumulate instructions, madd and msub. */#define ISA_HAS_MADD_MSUB ((ISA_MIPS32 \ || ISA_MIPS32R2 \ || ISA_MIPS64 \ ) && !TARGET_MIPS16)/* ISA has floating-point nmadd and nmsub instructions. */#define ISA_HAS_NMADD_NMSUB ((ISA_MIPS4 \ || ISA_MIPS64) \ && (!TARGET_MIPS5400 || TARGET_MAD) \ && ! TARGET_MIPS16)/* ISA has count leading zeroes/ones instruction (not implemented). */#define ISA_HAS_CLZ_CLO ((ISA_MIPS32 \ || ISA_MIPS32R2 \ || ISA_MIPS64 \ || TARGET_ALLEGREX \ ) && !TARGET_MIPS16)/* ISA has double-word count leading zeroes/ones instruction (not implemented). */#define ISA_HAS_DCLZ_DCLO (ISA_MIPS64 \ && !TARGET_MIPS16)/* ISA has three operand multiply instructions that put the high part in an accumulator: mulhi or mulhiu. */#define ISA_HAS_MULHI (TARGET_MIPS5400 \ || TARGET_MIPS5500 \ || TARGET_SR71K \ )/* ISA has three operand multiply instructions that negates the result and puts the result in an accumulator. */#define ISA_HAS_MULS (TARGET_MIPS5400 \ || TARGET_MIPS5500 \ || TARGET_SR71K \ )/* ISA has three operand multiply instructions that subtracts the result from a 4th operand and puts the result in an accumulator. */#define ISA_HAS_MSAC (TARGET_MIPS5400 \ || TARGET_MIPS5500 \ || TARGET_SR71K \ )/* ISA has three operand multiply instructions that the result from a 4th operand and puts the result in an accumulator. */#define ISA_HAS_MACC ((TARGET_MIPS4120 && !TARGET_MIPS16) \ || (TARGET_MIPS4130 && !TARGET_MIPS16) \ || TARGET_MIPS5400 \ || TARGET_MIPS5500 \ || TARGET_SR71K \ )/* ISA has NEC VR-style MACC, MACCHI, DMACC and DMACCHI instructions. */#define ISA_HAS_MACCHI (!TARGET_MIPS16 \ && (TARGET_MIPS4120 \ || TARGET_MIPS4130))/* ISA has 32-bit rotate right instruction. */#define ISA_HAS_ROTR_SI (!TARGET_MIPS16 \ && (ISA_MIPS32R2 \ || TARGET_MIPS5400 \ || TARGET_MIPS5500 \ || TARGET_SR71K \ || TARGET_ALLEGREX \ ))/* ISA has 64-bit rotate right instruction. */#define ISA_HAS_ROTR_DI (TARGET_64BIT \ && !TARGET_MIPS16 \ && (TARGET_MIPS5400 \ || TARGET_MIPS5500 \ || TARGET_SR71K \ ))/* ISA has data prefetch instructions. This controls use of 'pref'. */#define ISA_HAS_PREFETCH ((ISA_MIPS4 \ || ISA_MIPS32 \ || ISA_MIPS32R2 \ || ISA_MIPS64) \ && !TARGET_MIPS16)/* ISA has data indexed prefetch instructions. This controls use of 'prefx', along with TARGET_HARD_FLOAT and TARGET_DOUBLE_FLOAT. (prefx is a cop1x instruction, so can only be used if FP is enabled.) */#define ISA_HAS_PREFETCHX ((ISA_MIPS4 \ || ISA_MIPS64) \ && !TARGET_MIPS16)/* True if trunc.w.s and trunc.w.d are real (not synthetic) instructions. Both require TARGET_HARD_FLOAT, and trunc.w.d also requires TARGET_DOUBLE_FLOAT. */#define ISA_HAS_TRUNC_W (!ISA_MIPS1)/* ISA includes the MIPS32r2 seb and seh instructions. */#define ISA_HAS_SEB_SEH (!TARGET_MIPS16 \ && (ISA_MIPS32R2 \ || TARGET_ALLEGREX \ ))/* ISA includes the MIPS32/64 rev 2 ext and ins instructions. */#define ISA_HAS_EXT_INS (!TARGET_MIPS16 \ && (ISA_MIPS32R2 \ || TARGET_ALLEGREX \ ))/* True if the result of a load is not available to the next instruction. A nop will then be needed between instructions like "lw $4,..." and "addiu $4,$4,1". */#define ISA_HAS_LOAD_DELAY (mips_isa == 1 \ && !TARGET_MIPS3900 \ && !TARGET_MIPS16)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -