⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tm-mips.h

📁 这是完整的gcc源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
#define MACHINE_TYPE "Sgi Mips"#else#if defined(MIPS_SYSV) || defined(MIPS_BSD43)				/* MIPS RISC-OS environments */#ifdef MIPS_SYSV#define MACHINE_TYPE "RISC-OS System V Mips"#else /* not MIPS_SYSV */#define MACHINE_TYPE "RISC-OS BSD Mips"#endif /* not MIPS_SYSV */#else /* not MIPS_SYSV and not MIPS_BSD43 */				/* default MIPS Bsd environment */#define MACHINE_TYPE "BSD Mips"#endif /* not SGI iris */#endif /* not MIPS_SYSV and not MIPS_BSD43 */#endif /* not DECSTATION */#define TARGET_VERSION							\{									\  fprintf (stderr, " %s %s %s", MIPS_VERSION, MACHINE_TYPE, __DATE__);	\}#define SDB_DEBUGGING_INFO	/* generate debug info inside of comments */#define MIPS_DEBUGGING_INFO	/* MIPS specific debugging info *//* 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.   MIPS needs no change in the numeration.  */#define DBX_REGISTER_NUMBER(REGNO) (REGNO)/* Overides 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#.def\t");		\  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#.def\t.%s;", (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,				\	   "$Lb%d:\n\t#.begin\t$Lb%d\t%d\n",		\	   sdb_label_count,				\	   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,				\	   "$Le%d:\n\t#.bend\t$Le%d\t%d\n",		\	   sdb_label_count,				\	   sdb_label_count,				\	   (LINE));					\  sdb_label_count++;					\} while (0)#define PUT_SDB_FUNCTION_START(LINE)#define PUT_SDB_FUNCTION_END(LINE)#define PUT_SDB_EPILOGUE_END(NAME)#define SDB_GENERATE_FAKE(BUFFER, NUMBER) \  sprintf ((BUFFER), ".%dfake", (NUMBER));/* Run-time compilation parameters selecting different hardware subsets.  */extern int target_flags;/* Macros used in the machine description to test the flags.  */					/* Mips vs. GNU assembler */#define TARGET_UNIX_ASM		(target_flags & 0x00000001)#define TARGET_MIPS_AS		TARGET_UNIX_ASM#define TARGET_GAS		(TARGET_UNIX_ASM == 0)					/* Debug Mode */#define TARGET_DEBUG_MODE	(target_flags & 0x00000002)#define TARGET_DEBUGA_MODE	(target_flags & 0x00000004)#define TARGET_DEBUGB_MODE	(target_flags & 0x00000010)#define TARGET_DEBUGC_MODE	(target_flags & 0x00000020)#define TARGET_DEBUGD_MODE	(target_flags & 0x00000040)#define TARGET_DEBUGE_MODE	(target_flags & 0x00008000)					/* Reg. Naming in .s ($21 vs. $a0) */#define TARGET_NAME_REGS	(target_flags & 0x00000008)					/* addu/subbu vs. add/sub */#define TARGET_NOFIXED_OVFL	(target_flags & 0x00000080)					/* Optimize for Sdata/Sbss */#define TARGET_GP_OPT		(target_flags & 0x00001000)#define TARGET_GVALUE_MASK	(target_flags & 0x00000f00)#define TARGET_GVALUE		(TARGET_GVALUE_MASK >> 8)					/* Position independent code */#define TARGET_PIC		(target_flags & 0x00002000)#define TARGET_PIC_LARGE_OBJECT (target_flags & 0x00004000)/* 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							\{ {"mips-as",		  0x00000001},	/* MIPS assembler */		\  {"gas",		 -0x00000001},	/* GNU  assembler */		\  {"debug",		  0x00000002},	/* Eliminate version in output*/ \  {"nodebug",		 -0x00000002},					\  {"debuga",		  0x00000004},	/* don't fold SP pushes into frame */ \  {"nodebuga",		 -0x00000004},					\  {"debugb",		  0x00000010},	/* GO_IF_LEGITIMATE_ADDRESS debug */ \  {"nodebugb",		 -0x00000010},					\  {"debugc",		  0x00000020},	/* fix frame ptr debug */	\  {"nodebugc",		 -0x00000020},					\  {"debugd",		  0x00000040},	/* branch/cc0 debug */		\  {"nodebugd",		 -0x00000040},					\  {"rnames",		  0x00000008},	/* Register names like $a0 */	\  {"nornames",		 -0x00000008},	/* Register names like $21 */	\  {"nofixed-ovfl",	  0x00000080},	/* Use addu and subu */		\  {"fixed-ovfl",	 -0x00000080},	/* Use add  and sub */		\  {"G0",		  0x00000100},	/* Bit 1 of sdata size */	\  {"nG0",		 -0x00000100},					\  {"noG0",		 -0x00000100},					\  {"G1",		  0x00000200},	/* Bit 2 of sdata size */	\  {"nG1",		 -0x00000200},					\  {"noG1",		 -0x00000200},					\  {"G2",		  0x00000400},	/* Bit 3 of sdata size */	\  {"nG2",		 -0x00000400},					\  {"noG2",		 -0x00000400},					\  {"gpOPT",		  0x00001000},	/* Optimize for global ptr */	\  {"ngpOPT",		 -0x00001000},					\  {"nogpOPT",		 -0x00001000},					\  {"pic",		  0x00002000},	/* Position independent code */	\  {"npic",		 -0x00002000},					\  {"nopic",		 -0x00002000},					\  {"pic-large-object",	  0x00004000},	/* Don't opt pic local funcs */	\  {"nopic-large-object", -0x00004000},					\  {"debuge",		  0x00008000},	/* FUNCTION_ARG debug */	\  {"nodebuge",		 -0x00008000},					\  {"",			 TARGET_DEFAULT}}/* Default target_flags if no switches specified (-mmips-as, -mnofixed-ovfl,   -G0, -G1 [same as -G 8]).  OSF/1 does not set -mmips-as, and sets -G 0. */#ifndef OSF_OS#define TARGET_DEFAULT 0x00000381#else#define TARGET_DEFAULT 0x00000080#endif/* Default GVALUE  (data item size threshold for selection of Sdata/data)   is computed : GVALUE ==  ( ((i=G0+2*G1+4*G2) < 6)				        ? 1<<i					: 1<< (i+3))*//* 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 DECSTATION#define BYTES_BIG_ENDIAN#endif/* Define this if most significant word of a multiword number is numbered. */#ifndef DECSTATION#define WORDS_BIG_ENDIAN#endif/* Define macros to easily access the most and least significant words   without a lot of #ifdef's.  */#ifdef 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 addressible 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/* 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/* Give parms extra alignment, up to this much, if their types want it.  */#define MAX_PARM_BOUNDARY 64/* 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.  */#define STRUCTURE_SIZE_BOUNDARY 8/* There is no point aligning anything to a rounder boundary than this.  */#define BIGGEST_ALIGNMENT 64/* Define this if move instructions will actually fail to work   when given unaligned data.  */#define STRICT_ALIGNMENT/* 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/* 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.  */#define FIRST_PSEUDO_REGISTER 64/* 1 for registers that have pervasive standard uses   and are not available for the register allocator.   On the MIPS, see conventions, page D-2   I have chosen not to  take Multiply/Divide HI,LO or PC into   account.  */#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	\}/* 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\}/* Internal macros to classify a register number as to whether it's a   general purpose register or a floating point register.  The macro   FP_CALL_REG_P also allows registers $4 and $6 as floating point   registers to pass floating point as per MIPS spec. */#define GP_REG_FIRST 0#define GP_REG_LAST  31#define GP_REG_NUM   (GP_REG_LAST - GP_REG_FIRST + 1)#define FP_REG_FIRST 32#define FP_REG_LAST  63#define FP_REG_NUM   (FP_REG_LAST - FP_REG_FIRST + 1)#define GP_REG_P(REGNO) ((unsigned) ((REGNO) - GP_REG_FIRST) < GP_REG_NUM)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -