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

📄 rs6000.h

📁 gcc3.2.1源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
   register for AP that will later be eliminated in favor of SP or FP.   This is a normal register, but it is fixed.   We also create a pseudo register for float/int conversions, that will   really represent the memory location used.  It is represented here as   a register, in order to work around problems in allocating stack storage   in inline functions.  */#define FIRST_PSEUDO_REGISTER 110/* This must be included for pre gcc 3.0 glibc compatibility.  */#define PRE_GCC3_DWARF_FRAME_REGISTERS 77/* 1 for registers that have pervasive standard uses   and are not available for the register allocator.   On RS/6000, r1 is used for the stack.  On Darwin, r2 is available   as a local register; for all other OS's r2 is the TOC pointer.   cr5 is not supposed to be used.   On System V implementations, r13 is fixed and not available for use.  */#define FIXED_REGISTERS  \  {0, 1, FIXED_R2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, FIXED_R13, 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, 0, 0, 0, 0, 0, 0, 0, \   0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1,	   \   /* AltiVec registers.  */			   \   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, FIXED_R13, 0, 0, \   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \   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, 0, 0, 0, 0, 0, 0, \   1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1,	   \   /* AltiVec registers.  */			   \   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						   \}/* Like `CALL_USED_REGISTERS' except this macro doesn't require that   the entire set of `FIXED_REGISTERS' be included.   (`CALL_USED_REGISTERS' must be a superset of `FIXED_REGISTERS').   This macro is optional.  If not specified, it defaults to the value   of `CALL_USED_REGISTERS'.  */		       #define CALL_REALLY_USED_REGISTERS  \  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, FIXED_R13, 0, 0, \   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \   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, 0, 0, 0, 0, 0, 0, \   1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1,	   \   /* AltiVec registers.  */			   \   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						   \}#define MQ_REGNO     64#define CR0_REGNO    68#define CR1_REGNO    69#define CR2_REGNO    70#define CR3_REGNO    71#define CR4_REGNO    72#define MAX_CR_REGNO 75#define XER_REGNO    76#define FIRST_ALTIVEC_REGNO	77#define LAST_ALTIVEC_REGNO	108#define TOTAL_ALTIVEC_REGS	(LAST_ALTIVEC_REGNO - FIRST_ALTIVEC_REGNO + 1)#define VRSAVE_REGNO		109/* List the order in which to allocate registers.  Each register must be   listed once, even those in FIXED_REGISTERS.   We allocate in the following order:	fp0		(not saved or used for anything)	fp13 - fp2	(not saved; incoming fp arg registers)	fp1		(not saved; return value) 	fp31 - fp14	(saved; order given to save least number)	cr7, cr6	(not saved or special)	cr1		(not saved, but used for FP operations)	cr0		(not saved, but used for arithmetic operations)	cr4, cr3, cr2	(saved)        r0		(not saved; cannot be base reg)	r9		(not saved; best for TImode)	r11, r10, r8-r4	(not saved; highest used first to make less conflict)	r3     		(not saved; return value register)	r31 - r13	(saved; order given to save least number)	r12		(not saved; if used for DImode or DFmode would use r13)	mq		(not saved; best to use it if we can)	ctr		(not saved; when we have the choice ctr is better)	lr		(saved)        cr5, r1, r2, ap, xer, vrsave (fixed)	AltiVec registers:	v0 - v1         (not saved or used for anything)	v13 - v3        (not saved; incoming vector arg registers)	v2              (not saved; incoming vector arg reg; return value)	v19 - v14       (not saved or used for anything)	v31 - v20       (saved; order given to save least number)*/						#define REG_ALLOC_ORDER					\  {32, 							\   45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34,	\   33,							\   63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51,	\   50, 49, 48, 47, 46, 					\   75, 74, 69, 68, 72, 71, 70,				\   0,							\   9, 11, 10, 8, 7, 6, 5, 4,				\   3,							\   31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19,	\   18, 17, 16, 15, 14, 13, 12,				\   64, 66, 65, 						\   73, 1, 2, 67, 76,					\   /* AltiVec registers.  */				\   77, 78,						\   90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80,		\   79,							\   96, 95, 94, 93, 92, 91,				\   108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98,	\   97, 109						\}/* True if register is floating-point.  */#define FP_REGNO_P(N) ((N) >= 32 && (N) <= 63)/* True if register is a condition register.  */#define CR_REGNO_P(N) ((N) >= 68 && (N) <= 75)/* True if register is a condition register, but not cr0.  */#define CR_REGNO_NOT_CR0_P(N) ((N) >= 69 && (N) <= 75)/* True if register is an integer register.  */#define INT_REGNO_P(N) ((N) <= 31 || (N) == ARG_POINTER_REGNUM)/* True if register is the XER register.  */#define XER_REGNO_P(N) ((N) == XER_REGNO)/* True if register is an AltiVec register.  */#define ALTIVEC_REGNO_P(N) ((N) >= FIRST_ALTIVEC_REGNO && (N) <= LAST_ALTIVEC_REGNO)/* Return number of consecutive hard regs needed starting at reg REGNO   to hold something of mode MODE.   This is ordinarily the length in words of a value of mode MODE   but can be less for certain modes in special long registers.   POWER and PowerPC GPRs hold 32 bits worth;   PowerPC64 GPRs and FPRs point register holds 64 bits worth.  */#define HARD_REGNO_NREGS(REGNO, MODE)					\  (FP_REGNO_P (REGNO)							\   ? ((GET_MODE_SIZE (MODE) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD) \   : ALTIVEC_REGNO_P (REGNO)						\   ? ((GET_MODE_SIZE (MODE) + UNITS_PER_ALTIVEC_WORD - 1) / UNITS_PER_ALTIVEC_WORD) \   : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))#define ALTIVEC_VECTOR_MODE(MODE)	\	((MODE) == V16QImode		\	 || (MODE) == V8HImode		\	 || (MODE) == V4SFmode		\	 || (MODE) == V4SImode)/* Define this macro to be nonzero if the port is prepared to handle   insns involving vector mode MODE.  At the very least, it must have   move patterns for this mode.  */#define VECTOR_MODE_SUPPORTED_P(MODE)	\	(TARGET_ALTIVEC && ALTIVEC_VECTOR_MODE (MODE))/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.   For POWER and PowerPC, the GPRs can hold any mode, but the float   registers only can hold floating modes and DImode, and CR register only   can hold CC modes.  We cannot put TImode anywhere except general   register and it must be able to fit within the register set.  */#define HARD_REGNO_MODE_OK(REGNO, MODE)					\  (FP_REGNO_P (REGNO) ?							\   (GET_MODE_CLASS (MODE) == MODE_FLOAT					\    || (GET_MODE_CLASS (MODE) == MODE_INT				\	&& GET_MODE_SIZE (MODE) == UNITS_PER_FP_WORD))			\   : ALTIVEC_REGNO_P (REGNO) ? ALTIVEC_VECTOR_MODE (MODE)		\   : CR_REGNO_P (REGNO) ? GET_MODE_CLASS (MODE) == MODE_CC		\   : XER_REGNO_P (REGNO) ? (MODE) == PSImode				\   : ! INT_REGNO_P (REGNO) ? (GET_MODE_CLASS (MODE) == MODE_INT		\			      && GET_MODE_SIZE (MODE) <= UNITS_PER_WORD) \   : 1)/* Value is 1 if it is a good idea to tie two pseudo registers   when one has mode MODE1 and one has mode MODE2.   If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,   for any hard reg, then this must be 0 for correct output.  */#define MODES_TIEABLE_P(MODE1, MODE2) \  (GET_MODE_CLASS (MODE1) == MODE_FLOAT		\   ? GET_MODE_CLASS (MODE2) == MODE_FLOAT	\   : GET_MODE_CLASS (MODE2) == MODE_FLOAT	\   ? GET_MODE_CLASS (MODE1) == MODE_FLOAT	\   : GET_MODE_CLASS (MODE1) == MODE_CC		\   ? GET_MODE_CLASS (MODE2) == MODE_CC		\   : GET_MODE_CLASS (MODE2) == MODE_CC		\   ? GET_MODE_CLASS (MODE1) == MODE_CC		\   : ALTIVEC_VECTOR_MODE (MODE1)		\   ? ALTIVEC_VECTOR_MODE (MODE2)		\   : ALTIVEC_VECTOR_MODE (MODE2)		\   ? ALTIVEC_VECTOR_MODE (MODE1)		\   : 1)/* A C expression returning the cost of moving data from a register of class   CLASS1 to one of CLASS2.   On the RS/6000, copying between floating-point and fixed-point   registers is expensive.  */#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)		\   ((CLASS1) == FLOAT_REGS && (CLASS2) == FLOAT_REGS ? 2	\   : (CLASS1) == FLOAT_REGS && (CLASS2) != FLOAT_REGS ? 10	\   : (CLASS1) != FLOAT_REGS && (CLASS2) == FLOAT_REGS ? 10	\   : (CLASS1) == ALTIVEC_REGS && (CLASS2) != ALTIVEC_REGS ? 20	\   : (CLASS1) != ALTIVEC_REGS && (CLASS2) == ALTIVEC_REGS ? 20	\   : (((CLASS1) == SPECIAL_REGS || (CLASS1) == MQ_REGS		\       || (CLASS1) == LINK_REGS || (CLASS1) == CTR_REGS		\       || (CLASS1) == LINK_OR_CTR_REGS)				\      && ((CLASS2) == SPECIAL_REGS || (CLASS2) == MQ_REGS	\	  || (CLASS2) == LINK_REGS || (CLASS2) == CTR_REGS	\	  || (CLASS2) == LINK_OR_CTR_REGS)) ? 10		\   : 2)/* A C expressions returning the cost of moving data of MODE from a register to   or from memory.   On the RS/6000, bump this up a bit.  */#define MEMORY_MOVE_COST(MODE, CLASS, IN)	\  ((GET_MODE_CLASS (MODE) == MODE_FLOAT		\    && (rs6000_cpu == PROCESSOR_RIOS1 || rs6000_cpu == PROCESSOR_PPC601) \    ? 3 : 2) \   + 4)/* Specify the cost of a branch insn; roughly the number of extra insns that   should be added to avoid a branch.   Set this to 3 on the RS/6000 since that is roughly the average cost of an   unscheduled conditional branch.  */#define BRANCH_COST 3/* Define this macro to change register usage conditional on target flags.   Set MQ register fixed (already call_used) if not POWER architecture   (RIOS1, RIOS2, RSC, and PPC601) so that it will not be allocated.   64-bit AIX reserves GPR13 for thread-private data.   Conditionally disable FPRs.  */#define CONDITIONAL_REGISTER_USAGE					\{									\  int i;								\  if (! TARGET_POWER)							\    fixed_regs[64] = 1;							\  if (TARGET_64BIT)							\    fixed_regs[13] = call_used_regs[13]					\      = call_really_used_regs[13] = 1; 					\  if (TARGET_SOFT_FLOAT)						\    for (i = 32; i < 64; i++)						\      fixed_regs[i] = call_used_regs[i]					\        = call_really_used_regs[i] = 1;					\  if (DEFAULT_ABI == ABI_V4						\      && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM			\      && flag_pic == 1)							\    fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]				\      = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]			\      = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1;	\  if (DEFAULT_ABI == ABI_DARWIN						\      && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)			\    global_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]				\      = fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]			\      = call_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]			\      = call_really_used_regs[RS6000_PIC_OFFSET_TABLE_REGNUM] = 1;	\  if (! TARGET_ALTIVEC)							\    {									\      for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i)	\	fixed_regs[i] = call_used_regs[i] = call_really_used_regs[i] = 1; \      call_really_used_regs[VRSAVE_REGNO] = 1;				\    }									\  if (TARGET_ALTIVEC_ABI)						\    for (i = FIRST_ALTIVEC_REGNO; i < FIRST_ALTIVEC_REGNO + 20; ++i)	\      call_used_regs[i] = call_really_used_regs[i] = 1;			\}/* Specify the registers used for certain standard purposes.   The values of these macros are register numbers.  *//* RS/6000 pc isn't overloaded on a register that the compiler knows about.  *//* #define PC_REGNUM  *//* Register to use for pushing function arguments.  */#define STACK_POINTER_REGNUM 1/* Base register for access to local variables of the function.  */#define FRAME_POINTER_REGNUM 31/* Value should be nonzero if functions must have frame pointers.   Zero means the frame pointer need not be set up (and parms   may be accessed via the stack pointer) in functions that seem suitable.   This is computed in `reload', in reload1.c.  */#define FRAME_POINTER_REQUIRED 0/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM 67/* Place to put static chain when calling a function that requires it.  */#define STATIC_CHAIN_REGNUM 11/* Link register number.  */#define LINK_REGISTER_REGNUM 65/* Count register number.  */#define COUNT_REGISTER_REGNUM 66/* Place that structure value return address is placed.   On the RS/6000, it is passed as an extra parameter.  */#define STRUCT_VALUE 0/* Define the classes of registers for register constraints in the   machine description.  Also define ranges of constants.

⌨️ 快捷键说明

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