📄 mips.h
字号:
so those are just commented out. */#define PUT_SDB_BLOCK_START(LINE) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, \ "%sLb%d:\n\t%s.begin\t%sLb%d\t%d\n", \ LOCAL_LABEL_PREFIX, \ sdb_label_count, \ (TARGET_GAS) ? "" : "#", \ LOCAL_LABEL_PREFIX, \ 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, \ "%sLe%d:\n\t%s.bend\t%sLe%d\t%d\n", \ LOCAL_LABEL_PREFIX, \ sdb_label_count, \ (TARGET_GAS) ? "" : "#", \ LOCAL_LABEL_PREFIX, \ sdb_label_count, \ (LINE)); \ sdb_label_count++; \} while (0)#define PUT_SDB_FUNCTION_START(LINE)#define PUT_SDB_FUNCTION_END(LINE) \do { \ extern FILE *asm_out_text_file; \ ASM_OUTPUT_SOURCE_LINE (asm_out_text_file, LINE + sdb_begin_function_line); \} while (0)#define PUT_SDB_EPILOGUE_END(NAME)#define PUT_SDB_SRC_FILE(FILENAME) \do { \ extern FILE *asm_out_text_file; \ output_file_directive (asm_out_text_file, (FILENAME)); \} while (0)#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#if 0 /* These definitions normally have no effect because MIPS systems define USE_COLLECT2, so assemble_constructor does nothing anyway. *//* 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)#endif /* 0 *//* Target machine storage layout *//* Define in order to support both big and little endian float formats in the same gcc binary. */#define REAL_ARITHMETIC/* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields.*/#define BITS_BIG_ENDIAN 0/* Define this if most significant byte of a word is the lowest numbered. */#define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0)/* Define this if most significant word of a multiword number is the lowest. */#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/* 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 (TARGET_64BIT ? 64 : 32)#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)/* 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 (TARGET_INT64 ? 64 : 32)#define MAX_INT_TYPE_SIZE 64/* Tell the preprocessor the maximum size of wchar_t. */#ifndef MAX_WCHAR_TYPE_SIZE#ifndef WCHAR_TYPE_SIZE#define MAX_WCHAR_TYPE_SIZE MAX_INT_TYPE_SIZE#endif#endif/* 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 (TARGET_LONG64 ? 64 : 32)#define MAX_LONG_TYPE_SIZE 64/* 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 (TARGET_LONG64 ? 64 : 32)/* Allocation boundary (in *bits*) for storing pointers in memory. */#define POINTER_BOUNDARY (TARGET_LONG64 ? 64 : 32)/* Allocation boundary (in *bits*) for storing arguments in argument list. */#define PARM_BOUNDARY (TARGET_64BIT ? 64 : 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/* 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 if operations between registers always perform the operation on the full register even if a narrower mode is specified. */#define WORD_REGISTER_OPERATIONS/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD will either zero-extend or sign-extend. The value of this macro should be the code that says which one of the two operations is implicitly done, NIL if none. */#define LOAD_EXTEND_OP(MODE) 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, 8 condition code registers, and the special registers hi, lo, hilo, and rap. The 8 condition code registers are only used if mips_isa >= 4. The hilo register is only used in 64 bit mode. It represents a 64 bit value stored as two 32 bit values in the hi and lo registers; this is the result of the mult instruction. rap is a pointer to the stack where the return address reg ($31) was stored. This is needed for C++ exception handling. */#define FIRST_PSEUDO_REGISTER 76/* 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 \{ \ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 \}/* 1 for registers not available across function calls. These must include the FIXED_REGISTERS and also any registers that can be used without being saved. The latter must include the registers where values are returned and the register where structure-value addresses are passed. Aside from that, you can include as many other registers as you like. */#define CALL_USED_REGISTERS \{ \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 \}/* Internal macros to classify a register number as to whether it's a general purpose register, a floating point register, a multiply/divide register, or a status register. */#define GP_REG_FIRST 0#define GP_REG_LAST 31#define GP_REG_NUM (GP_REG_LAST - GP_REG_FIRST + 1)#define GP_DBX_FIRST 0#define FP_REG_FIRST 32#define FP_REG_LAST 63#define FP_REG_NUM (FP_REG_LAST - FP_REG_FIRST + 1)#define FP_DBX_FIRST ((write_symbols == DBX_DEBUG) ? 38 : 32)#define MD_REG_FIRST 64#define MD_REG_LAST 66#define MD_REG_NUM (MD_REG_LAST - MD_REG_FIRST + 1)#define ST_REG_FIRST 67#define ST_REG_LAST 74#define ST_REG_NUM (ST_REG_LAST - ST_REG_FIRST + 1)#define RAP_REG_NUM 75#define AT_REGNUM (GP_REG_FIRST + 1)#define HI_REGNUM (MD_REG_FIRST + 0)#define LO_REGNUM (MD_REG_FIRST + 1)#define HILO_REGNUM (MD_REG_FIRST + 2)/* FPSW_REGNUM is the single condition code used if mips_isa < 4. If mips_isa >= 4, it should not be used, and an arbitrary ST_REG should be used instead. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -