📄 mips.h.svn-base
字号:
/* Likewise mtc1 and mfc1. */#define ISA_HAS_XFER_DELAY (mips_isa <= 3)/* Likewise floating-point comparisons. */#define ISA_HAS_FCMP_DELAY (mips_isa <= 3)/* True if mflo and mfhi can be immediately followed by instructions which write to the HI and LO registers. According to MIPS specifications, MIPS ISAs I, II, and III need (at least) two instructions between the reads of HI/LO and instructions which write them, and later ISAs do not. Contradicting the MIPS specifications, some MIPS IV processor user manuals (e.g. the UM for the NEC Vr5000) document needing the instructions between HI/LO reads and writes, as well. Therefore, we declare only MIPS32, MIPS64 and later ISAs to have the interlocks, plus any specific earlier-ISA CPUs for which CPU documentation declares that the instructions are really interlocked. */#define ISA_HAS_HILO_INTERLOCKS (ISA_MIPS32 \ || ISA_MIPS32R2 \ || ISA_MIPS64 \ || TARGET_MIPS5500 \ || TARGET_ALLEGREX)/* Add -G xx support. */#undef SWITCH_TAKES_ARG#define SWITCH_TAKES_ARG(CHAR) \ (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')#define OVERRIDE_OPTIONS override_options ()#define CONDITIONAL_REGISTER_USAGE mips_conditional_register_usage ()/* Show we can debug even without a frame pointer. */#define CAN_DEBUG_WITHOUT_FP/* Tell collect what flags to pass to nm. */#ifndef NM_FLAGS#define NM_FLAGS "-Bn"#endif#define SUBTARGET_TARGET_SWITCHES#ifndef MIPS_ABI_DEFAULT#define MIPS_ABI_DEFAULT ABI_32#endif/* Use the most portable ABI flag for the ASM specs. */#if MIPS_ABI_DEFAULT == ABI_32#define MULTILIB_ABI_DEFAULT "mabi=32"#endif#if MIPS_ABI_DEFAULT == ABI_O64#define MULTILIB_ABI_DEFAULT "mabi=o64"#endif#if MIPS_ABI_DEFAULT == ABI_N32#define MULTILIB_ABI_DEFAULT "mabi=n32"#endif#if MIPS_ABI_DEFAULT == ABI_64#define MULTILIB_ABI_DEFAULT "mabi=64"#endif#if MIPS_ABI_DEFAULT == ABI_EABI#define MULTILIB_ABI_DEFAULT "mabi=eabi"#endif/* SUBTARGET_ASM_OPTIMIZING_SPEC handles passing optimization options to the assembler. It may be overridden by subtargets. */#ifndef SUBTARGET_ASM_OPTIMIZING_SPEC#define SUBTARGET_ASM_OPTIMIZING_SPEC "\%{noasmopt:-O0} \%{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}}"#endif/* SUBTARGET_ASM_DEBUGGING_SPEC handles passing debugging options to the assembler. It may be overridden by subtargets. Beginning with gas 2.13, -mdebug must be passed to correctly handle COFF debugging info. */#ifndef SUBTARGET_ASM_DEBUGGING_SPEC#define SUBTARGET_ASM_DEBUGGING_SPEC "\%{g} %{g0} %{g1} %{g2} %{g3} \%{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} \%{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} \%{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \%{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3} \%{gcoff*:-mdebug} %{!gcoff*:-no-mdebug}"#endif/* SUBTARGET_ASM_SPEC is always passed to the assembler. It may be overridden by subtargets. */#ifndef SUBTARGET_ASM_SPEC#define SUBTARGET_ASM_SPEC ""#endif#undef ASM_SPEC#define ASM_SPEC "\%{G*} %(endian_spec) %{mips1} %{mips2} %{mips3} %{mips4} \%{mips32} %{mips32r2} %{mips64} \%{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} \%{mips3d:-mips3d} \%{mfix-vr4120} %{mfix-vr4130} \%(subtarget_asm_optimizing_spec) \%(subtarget_asm_debugging_spec) \%{mabi=*} %{!mabi*: %(asm_abi_default_spec)} \%{mgp32} %{mgp64} %{march=*} %{mxgot:-xgot} \%{msym32} %{mno-sym32} \%{mtune=*} %{v} \%(subtarget_asm_spec)"/* Extra switches sometimes passed to the linker. *//* ??? The bestGnum will never be passed to the linker, because the gcc driver will interpret it as a -b option. */#ifndef LINK_SPEC#define LINK_SPEC "\%(endian_spec) \%{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips32r2} %{mips64} \%{bestGnum} %{shared} %{non_shared}"#endif /* LINK_SPEC defined *//* Specs for the compiler proper *//* SUBTARGET_CC1_SPEC is passed to the compiler proper. It may be overridden by subtargets. */#ifndef SUBTARGET_CC1_SPEC#define SUBTARGET_CC1_SPEC ""#endif/* CC1_SPEC is the set of arguments to pass to the compiler proper. */#ifndef CC1_SPEC#define CC1_SPEC "\%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \%{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \%{save-temps: } \%(subtarget_cc1_spec)"#endif/* Preprocessor specs. *//* SUBTARGET_CPP_SPEC is passed to the preprocessor. It may be overridden by subtargets. */#ifndef SUBTARGET_CPP_SPEC#define SUBTARGET_CPP_SPEC ""#endif#define CPP_SPEC "%(subtarget_cpp_spec)"/* 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 GCC driver program. Do not define this macro if it does not need to do anything. */#define EXTRA_SPECS \ { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ { "subtarget_asm_optimizing_spec", SUBTARGET_ASM_OPTIMIZING_SPEC }, \ { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC }, \ { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \ { "asm_abi_default_spec", "-" MULTILIB_ABI_DEFAULT }, \ { "endian_spec", ENDIAN_SPEC }, \ SUBTARGET_EXTRA_SPECS#ifndef SUBTARGET_EXTRA_SPECS#define SUBTARGET_EXTRA_SPECS#endif#define DBX_DEBUGGING_INFO 1 /* generate stabs (OSF/rose) */#define MIPS_DEBUGGING_INFO 1 /* MIPS specific debugging info */#define DWARF2_DEBUGGING_INFO 1 /* dwarf2 debugging info */#ifndef PREFERRED_DEBUGGING_TYPE#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG#endif#define DWARF2_ADDR_SIZE (ABI_HAS_64BIT_SYMBOLS ? 8 : 4)/* By default, turn on GDB extensions. */#define DEFAULT_GDB_EXTENSIONS 1/* 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/* 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. */#define DWARF_FRAME_REGNUM(REG) (REG)/* The DWARF 2 CFA column which tracks the return address. */#define DWARF_FRAME_RETURN_COLUMN (GP_REG_FIRST + 31)/* The DWARF 2 CFA column which tracks the return address from a signal handler context. */#define SIGNAL_UNWIND_RETURN_COLUMN (FP_REG_LAST + 1)/* Before the prologue, RA lives in r31. */#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, GP_REG_FIRST + 31)/* Describe how we implement __builtin_eh_return. */#define EH_RETURN_DATA_REGNO(N) \ ((N) < (TARGET_MIPS16 ? 2 : 4) ? (N) + GP_ARG_FIRST : INVALID_REGNUM)#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, GP_REG_FIRST + 3)/* Offsets recorded in opcodes are a multiple of this alignment factor. The default for this in 64-bit mode is 8, which causes problems with SFmode register saves. */#define DWARF_CIE_DATA_ALIGNMENT -4/* 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, (HOST_WIDE_INT) 0)#define DEBUGGER_ARG_OFFSET(OFFSET, X) \ mips_debugger_offset (X, (HOST_WIDE_INT) OFFSET)/* Target machine storage layout */#define BITS_BIG_ENDIAN 0#define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0)#define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0)/* Define this to set the endianness to use in libgcc2.c, which can not depend on target_flags. */#if !defined(MIPSEL) && !defined(__MIPSEL__)#define LIBGCC2_WORDS_BIG_ENDIAN 1#else#define LIBGCC2_WORDS_BIG_ENDIAN 0#endif#define MAX_BITS_PER_WORD 64/* Width of a word, in units (bytes). */#define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)#define MIN_UNITS_PER_WORD 4/* For MIPS, width of a floating point register. */#define UNITS_PER_FPREG (TARGET_FLOAT64 ? 8 : 4)/* If register $f0 holds a floating-point value, $f(0 + FP_INC) is the next available register. */#define FP_INC (TARGET_FLOAT64 || TARGET_SINGLE_FLOAT ? 1 : 2)/* The largest size of value that can be held in floating-point registers and moved with a single instruction. */#define UNITS_PER_HWFPVALUE (TARGET_SOFT_FLOAT ? 0 : FP_INC * UNITS_PER_FPREG)/* The largest size of value that can be held in floating-point registers. */#define UNITS_PER_FPVALUE \ (TARGET_SOFT_FLOAT ? 0 \ : TARGET_SINGLE_FLOAT ? UNITS_PER_FPREG \ : LONG_DOUBLE_TYPE_SIZE / BITS_PER_UNIT)/* The number of bytes in a double. */#define UNITS_PER_DOUBLE (TYPE_PRECISION (double_type_node) / BITS_PER_UNIT)#define UNITS_PER_SIMD_WORD (TARGET_PAIRED_SINGLE_FLOAT ? 8 : 0)/* Set the sizes of the core types. */#define SHORT_TYPE_SIZE 16#define INT_TYPE_SIZE (TARGET_INT64 ? 64 : 32)#define LONG_TYPE_SIZE (TARGET_LONG64 ? 64 : 32)#define LONG_LONG_TYPE_SIZE 64#define FLOAT_TYPE_SIZE 32#define DOUBLE_TYPE_SIZE 64#define LONG_DOUBLE_TYPE_SIZE (TARGET_NEWABI ? 128 : 64)/* long double is not a fixed mode, but the idea is that, if we support long double, we also want a 128-bit integer type. */#define MAX_FIXED_MODE_SIZE LONG_DOUBLE_TYPE_SIZE#ifdef IN_LIBGCC2#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) \ || (defined _ABI64 && _MIPS_SIM == _ABI64)# define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128# else# define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64# endif#endif/* Width in bits of a pointer. */#ifndef POINTER_SIZE#define POINTER_SIZE ((TARGET_LONG64 && TARGET_64BIT) ? 64 : 32)#endif/* Allocation boundary (in *bits*) for storing arguments in argument list. */#define PARM_BOUNDARY BITS_PER_WORD/* Allocation boundary (in *bits*) for the code of a function. */#define FUNCTION_BOUNDARY 32/* Alignment of field after `int : 0' in a structure. */#define EMPTY_FIELD_BOUNDARY 32/* Every structure's size must be a multiple of this. *//* 8 is observed right on a DECstation and on riscos 4.02. */#define STRUCTURE_SIZE_BOUNDARY 8/* There is no point aligning anything to a rounder boundary than this. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -