📄 mips.h
字号:
#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) ? ".stabs" : " #.stabs")#define ASM_STABN_OP ((TARGET_GAS) ? ".stabn" : " #.stabn")#define ASM_STABD_OP ((TARGET_GAS) ? ".stabd" : " #.stabd")/* 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. */#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. */#define INCOMING_RETURN_ADDR_RTX gen_rtx (REG, VOIDmode, GP_REG_FIRST + 31)/* Overrides for the COFF debug format. */#define PUT_SDB_SCL(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.scl\t%d;", (a)); \} while (0)#define PUT_SDB_INT_VAL(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.val\t%d;", (a)); \} while (0)#define PUT_SDB_VAL(a) \do { \ extern FILE *asm_out_text_file; \ fputs ("\t.val\t", asm_out_text_file); \ output_addr_const (asm_out_text_file, (a)); \ fputc (';', asm_out_text_file); \} while (0)#define PUT_SDB_DEF(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t%s.def\t", \ (TARGET_GAS) ? "" : "#"); \ ASM_OUTPUT_LABELREF (asm_out_text_file, a); \ fputc (';', asm_out_text_file); \} while (0)#define PUT_SDB_PLAIN_DEF(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t%s.def\t.%s;", \ (TARGET_GAS) ? "" : "#", (a)); \} while (0)#define PUT_SDB_ENDEF \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.endef\n"); \} while (0)#define PUT_SDB_TYPE(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.type\t0x%x;", (a)); \} while (0)#define PUT_SDB_SIZE(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.size\t%d;", (a)); \} while (0)#define PUT_SDB_DIM(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.dim\t%d;", (a)); \} while (0)#ifndef PUT_SDB_START_DIM#define PUT_SDB_START_DIM \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.dim\t"); \} while (0)#endif#ifndef PUT_SDB_NEXT_DIM#define PUT_SDB_NEXT_DIM(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "%d,", a); \} while (0)#endif#ifndef PUT_SDB_LAST_DIM#define PUT_SDB_LAST_DIM(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "%d;", a); \} while (0)#endif#define PUT_SDB_TAG(a) \do { \ extern FILE *asm_out_text_file; \ fprintf (asm_out_text_file, "\t.tag\t"); \ ASM_OUTPUT_LABELREF (asm_out_text_file, a); \ fputc (';', asm_out_text_file); \} while (0)/* For block start and end, we create labels, so that later we can figure out where the correct offset is. The normal .ent/.end serve well enough for functions, 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, (HOST_WIDE_INT) 0)#define DEBUGGER_ARG_OFFSET(OFFSET, X) \ mips_debugger_offset (X, (HOST_WIDE_INT) 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. */#ifndef POINTER_SIZE#define POINTER_SIZE (Pmode == DImode ? 64 : 32)#endif/* Allocation boundary (in *bits*) for storing pointers in memory. */#define POINTER_BOUNDARY (Pmode == DImode ? 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. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -