📄 mips.h
字号:
#define MASK_DEBUG_A 0x20000000 /* don't allow <label>($reg) addrs */#define MASK_DEBUG_B 0x10000000 /* GO_IF_LEGITIMATE_ADDRESS debug */#define MASK_DEBUG_C 0x08000000 /* don't expand seq, etc. */#define MASK_DEBUG_D 0x04000000 /* don't do define_split's */#define MASK_DEBUG_E 0x02000000 /* function_arg debug */#define MASK_DEBUG_F 0x01000000 /* don't try to suppress load nop's */#define MASK_DEBUG_G 0x00800000 /* don't support 64 bit arithmetic */#define MASK_DEBUG_H 0x00400000 /* allow ints in FP registers */#define MASK_DEBUG_I 0x00200000 /* unused */#define MASK_DEBUG_J 0x00100000 /* unused */ /* r4000 64 bit sizes */#define TARGET_INT64 (target_flags & MASK_INT64)#define TARGET_LONG64 (target_flags & MASK_LONG64)#define TARGET_LLONG128 (target_flags & MASK_LLONG128)#define TARGET_FLOAT64 (target_flags & MASK_FLOAT64) /* Mips vs. GNU assembler */#define TARGET_GAS (target_flags & MASK_GAS)#define TARGET_UNIX_ASM (!TARGET_GAS)#define TARGET_MIPS_AS TARGET_UNIX_ASM /* Debug Mode */#define TARGET_DEBUG_MODE (target_flags & MASK_DEBUG)#define TARGET_DEBUG_A_MODE (target_flags & MASK_DEBUG_A)#define TARGET_DEBUG_B_MODE (target_flags & MASK_DEBUG_B)#define TARGET_DEBUG_C_MODE (target_flags & MASK_DEBUG_C)#define TARGET_DEBUG_D_MODE (target_flags & MASK_DEBUG_D)#define TARGET_DEBUG_E_MODE (target_flags & MASK_DEBUG_E)#define TARGET_DEBUG_F_MODE (target_flags & MASK_DEBUG_F)#define TARGET_DEBUG_G_MODE (target_flags & MASK_DEBUG_G)#define TARGET_DEBUG_H_MODE (target_flags & MASK_DEBUG_H)#define TARGET_DEBUG_I_MODE (target_flags & MASK_DEBUG_I)#define TARGET_DEBUG_J_MODE (target_flags & MASK_DEBUG_J) /* Reg. Naming in .s ($21 vs. $a0) */#define TARGET_NAME_REGS (target_flags & MASK_NAME_REGS) /* Optimize for Sdata/Sbss */#define TARGET_GP_OPT (target_flags & MASK_GPOPT) /* print program statistics */#define TARGET_STATS (target_flags & MASK_STATS) /* call memcpy instead of inline code */#define TARGET_MEMCPY (target_flags & MASK_MEMCPY) /* .abicalls, etc from Pyramid V.4 */#define TARGET_ABICALLS (target_flags & MASK_ABICALLS) /* OSF pic references to externs */#define TARGET_HALF_PIC (target_flags & MASK_HALF_PIC) /* wchar size */#define TARGET_WC8 (target_flags & MASK_WC8)#define TARGET_WC16 (target_flags & MASK_WC16)#define TARGET_WC32 ((target_flags & (MASK_WC8 | MASK_WC16)) == 0) /* software floating point */#define TARGET_SOFT_FLOAT (target_flags & MASK_SOFT_FLOAT)#define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT)/* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, each pair being { "NAME", VALUE } where VALUE is the bits to set or minus the bits to clear. An empty string NAME is used to identify the default VALUE. */#define TARGET_SWITCHES \{ \ {"int64", MASK_INT64 | MASK_LONG64}, \ {"long64", MASK_LONG64}, \ {"longlong128", MASK_INT64 | MASK_LONG64 | MASK_LLONG128}, \ {"mips-as", -MASK_GAS}, \ {"gas", MASK_GAS}, \ {"rnames", MASK_NAME_REGS}, \ {"no-rnames", -MASK_NAME_REGS}, \ {"gpOPT", MASK_GPOPT}, \ {"gpopt", MASK_GPOPT}, \ {"no-gpOPT", -MASK_GPOPT}, \ {"no-gpopt", -MASK_GPOPT}, \ {"stats", MASK_STATS}, \ {"no-stats", -MASK_STATS}, \ {"memcpy", MASK_MEMCPY}, \ {"no-memcpy", -MASK_MEMCPY}, \ {"wc8", MASK_WC8}, \ {"wc16", MASK_WC16}, \ {"wc32", MASK_WC32}, \ {"mips-tfile", MASK_MIPS_TFILE}, \ {"no-mips-tfile", -MASK_MIPS_TFILE}, \ {"soft-float", MASK_SOFT_FLOAT}, \ {"hard-float", -MASK_SOFT_FLOAT}, \ {"fp64", MASK_FLOAT64}, \ {"fp32", -MASK_FLOAT64}, \ {"abicalls", MASK_ABICALLS}, \ {"no-abicalls", -MASK_ABICALLS}, \ {"half-pic", MASK_HALF_PIC}, \ {"no-half-pic", -MASK_HALF_PIC}, \ {"debug", MASK_DEBUG}, \ {"debuga", MASK_DEBUG_A}, \ {"debugb", MASK_DEBUG_B}, \ {"debugc", MASK_DEBUG_C}, \ {"debugd", MASK_DEBUG_D}, \ {"debuge", MASK_DEBUG_E}, \ {"debugf", MASK_DEBUG_F}, \ {"debugg", MASK_DEBUG_G}, \ {"debugh", MASK_DEBUG_H}, \ {"debugi", MASK_DEBUG_I}, \ {"debugj", MASK_DEBUG_J}, \ {"", TARGET_DEFAULT} \}/* Default target_flags if no switches are specified */#ifndef TARGET_DEFAULT#define TARGET_DEFAULT 0#endif/* This macro is similar to `TARGET_SWITCHES' but defines names of command options that have values. Its definition is an initializer with a subgrouping for each command option. Each subgrouping contains a string constant, that defines the fixed part of the option name, and the address of a variable. The variable, type `char *', is set to the variable part of the given option if the fixed part matches. The actual option name is made by appending `-m' to the specified name. Here is an example which defines `-mshort-data-NUMBER'. If the given option is `-mshort-data-512', the variable `m88k_short_data' will be set to the string `"512"'. extern char *m88k_short_data; #define TARGET_OPTIONS { { "short-data-", &m88k_short_data } } */#define TARGET_OPTIONS \{ \ { "cpu=", &mips_cpu_string }, \ { "ips", &mips_isa_string } \}/* Macros to decide whether certain features are available or not, depending on the instruction set architecture level. */#define BRANCH_LIKELY_P() (mips_isa >= 2)#define HAVE_64BIT_P() (mips_isa >= 3)#define HAVE_SQRT_P() (mips_isa >= 2)/* Target machine storage layout *//* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields.*//* #define BITS_BIG_ENDIAN *//* Define this if most significant byte of a word is the lowest numbered. */#ifndef BYTES_BIG_ENDIAN#ifndef DECSTATION#define BYTES_BIG_ENDIAN 1#else#define BYTES_BIG_ENDIAN 0#endif#endif/* Define this if most significant word of a multiword number is the lowest. */#ifndef WORDS_BIG_ENDIAN#ifndef DECSTATION#define WORDS_BIG_ENDIAN 1#else#define WORDS_BIG_ENDIAN 0#endif#endif/* Define macros to easily access the most and least significant words without a lot of #ifdef's. */#if WORDS_BIG_ENDIAN#define MOST_SIGNIFICANT_WORD 0#define LEAST_SIGNIFICANT_WORD 1#else#define MOST_SIGNIFICANT_WORD 1#define LEAST_SIGNIFICANT_WORD 0#endif/* Number of bits in an addressable storage unit */#define BITS_PER_UNIT 8/* Width in bits of a "word", which is the contents of a machine register. Note that this is not necessarily the width of data type `int'; if using 16-bit ints on a 68000, this would still be 32. But on a machine with 16-bit registers, this would be 16. */#define BITS_PER_WORD 32/* Width of a word, in units (bytes). */#define UNITS_PER_WORD 4/* A C expression for the size in bits of the type `int' on the target machine. If you don't define this, the default is one word. */#define INT_TYPE_SIZE 32/* A C expression for the size in bits of the type `short' on the target machine. If you don't define this, the default is half a word. (If this would be less than one storage unit, it is rounded up to one unit.) */#define SHORT_TYPE_SIZE 16/* A C expression for the size in bits of the type `long' on the target machine. If you don't define this, the default is one word. */#define LONG_TYPE_SIZE 32/* A C expression for the size in bits of the type `long long' on the target machine. If you don't define this, the default is two words. */#define LONG_LONG_TYPE_SIZE 64/* A C expression for the size in bits of the type `char' on the target machine. If you don't define this, the default is one quarter of a word. (If this would be less than one storage unit, it is rounded up to one unit.) */#define CHAR_TYPE_SIZE BITS_PER_UNIT/* A C expression for the size in bits of the type `float' on the target machine. If you don't define this, the default is one word. */#define FLOAT_TYPE_SIZE 32/* A C expression for the size in bits of the type `double' on the target machine. If you don't define this, the default is two words. */#define DOUBLE_TYPE_SIZE 64/* A C expression for the size in bits of the type `long double' on the target machine. If you don't define this, the default is two words. */#define LONG_DOUBLE_TYPE_SIZE 64/* Width in bits of a pointer. See also the macro `Pmode' defined below. */#define POINTER_SIZE 32/* Allocation boundary (in *bits*) for storing pointers in memory. */#define POINTER_BOUNDARY 32/* Allocation boundary (in *bits*) for storing arguments in argument list. */#define PARM_BOUNDARY 32/* 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. */#define BIGGEST_ALIGNMENT 64/* Biggest alignment any structure field can require in bits. */#define BIGGEST_FIELD_ALIGNMENT 64/* Set this nonzero if move instructions will actually fail to work when given unaligned data. */#define STRICT_ALIGNMENT 1/* Define this if you wish to imitate the way many other C compilers handle alignment of bitfields and the structures that contain them. The behavior is that the type written for a bitfield (`int', `short', or other integer type) imposes an alignment for the entire structure, as if the structure really did contain an ordinary field of that type. In addition, the bitfield is placed within the structure so that it would fit within such a field, not crossing a boundary for it. Thus, on most machines, a bitfield whose type is written as `int' would not cross a four-byte boundary, and would force four-byte alignment for the whole structure. (The alignment used may not be four bytes; it is controlled by the other alignment parameters.) If the macro is defined, its definition should be a C expression; a nonzero value for the expression enables this behavior. */#define PCC_BITFIELD_TYPE_MATTERS 1/* If defined, a C expression to compute the alignment given to a constant that is being placed in memory. CONSTANT is the constant and ALIGN is the alignment that the object would ordinarily have. The value of this macro is used instead of that alignment to align the object. If this macro is not defined, then ALIGN is used. The typical use of this macro is to increase alignment for string constants to be word aligned so that `strcpy' calls that copy constants can be done inline. */#define CONSTANT_ALIGNMENT(EXP, ALIGN) \ ((TREE_CODE (EXP) == STRING_CST || TREE_CODE (EXP) == CONSTRUCTOR) \ && (ALIGN) < BITS_PER_WORD \ ? BITS_PER_WORD \ : (ALIGN))/* If defined, a C expression to compute the alignment for a static variable. TYPE is the data type, and ALIGN is the alignment that the object would ordinarily have. The value of this macro is used instead of that alignment to align the object. If this macro is not defined, then ALIGN is used. One use of this macro is to increase alignment of medium-size data to make it all fit in fewer cache lines. Another is to cause character arrays to be word-aligned so that `strcpy' calls that copy constants to character arrays can be done inline. */#undef DATA_ALIGNMENT#define DATA_ALIGNMENT(TYPE, ALIGN) \ ((((ALIGN) < BITS_PER_WORD) \ && (TREE_CODE (TYPE) == ARRAY_TYPE \ || TREE_CODE (TYPE) == UNION_TYPE \ || TREE_CODE (TYPE) == RECORD_TYPE)) ? BITS_PER_WORD : (ALIGN))/* Define this macro if an argument declared as `char' or `short' in a prototype should actually be passed as an `int'. In addition to avoiding errors in certain cases of mismatch, it also makes for better code on certain machines. */#define PROMOTE_PROTOTYPES/* Define this macro if an instruction to load a value narrower than a word from memory into a register also zero-extends the value to the whole register. */#define BYTE_LOADS_ZERO_EXTEND/* Standard register usage. *//* Number of actual hardware registers. The hardware registers are assigned numbers for the compiler from 0 to just below FIRST_PSEUDO_REGISTER. All registers that the compiler knows about must be given numbers, even those that are not normally considered general registers. On the Mips, we have 32 integer registers, 32 floating point registers and the special registers hi, lo, and fp status. */#define FIRST_PSEUDO_REGISTER 67/* 1 for registers that have pervasive standard uses and are not available for the register allocator. On the MIPS, see conventions, page D-2 */#define FIXED_REGISTERS \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -