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

📄 rs6000.h

📁 gcc编译工具没有什么特别
💻 H
📖 第 1 页 / 共 5 页
字号:
#define FIRST_PSEUDO_REGISTER 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 and r2 is used as the TOC pointer.   cr5 is not supposed to be used.   On System V implementations, r13 is fixed and not available for use.  */#ifndef FIXED_R13#define FIXED_R13 0#endif#define FIXED_REGISTERS  \  {0, 1, 1, 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}/* 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}/* 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, fpmem (fixed)  */#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}/* 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 condition register 0.  */#define CR0_REGNO_P(N) ((N) == 68)/* 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) == 67)/* True if register is the temporary memory location used for int/float   conversion.  */#define FPMEM_REGNO_P(N) ((N) == FPMEM_REGNUM)/* 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) || FPMEM_REGNO_P (REGNO)				\   ? ((GET_MODE_SIZE (MODE) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD) \   : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))/* 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))			\   : CR_REGNO_P (REGNO) ? GET_MODE_CLASS (MODE) == MODE_CC		\   : FPMEM_REGNO_P (REGNO) ? ((MODE) == DImode || (MODE) == DFmode)	\   : ! 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		\   : 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(CLASS1, CLASS2)			\  ((CLASS1) == FLOAT_REGS && (CLASS2) == FLOAT_REGS ? 2		\   : (CLASS1) == FLOAT_REGS && (CLASS2) != FLOAT_REGS ? 10	\   : (CLASS1) != FLOAT_REGS && (CLASS2) == FLOAT_REGS ? 10	\   : (((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/* A C statement (sans semicolon) to update the integer variable COST   based on the relationship between INSN that is dependent on   DEP_INSN through the dependence LINK.  The default is to make no   adjustment to COST.  On the RS/6000, ignore the cost of anti- and   output-dependencies.  In fact, output dependencies on the CR do have   a cost, but it is probably not worthwhile to track it.  */#define ADJUST_COST(INSN,LINK,DEP_INSN,COST)				\  (COST) = rs6000_adjust_cost (INSN,LINK,DEP_INSN,COST)/* A C statement (sans semicolon) to update the integer scheduling priority   INSN_PRIORITY (INSN).  Reduce the priority to execute the INSN earlier,   increase the priority to execute INSN later.  Do not define this macro if   you do not need to adjust the scheduling priorities of insns.  */#define ADJUST_PRIORITY(INSN)						\  INSN_PRIORITY (INSN) = rs6000_adjust_priority (INSN, INSN_PRIORITY (INSN))/* 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					\{									\  if (! TARGET_POWER)							\    fixed_regs[64] = 1;							\  if (TARGET_64BIT)							\    fixed_regs[13] = call_used_regs[13] = 1; 				\  if (TARGET_SOFT_FLOAT)						\    for (i = 32; i < 64; i++)						\      fixed_regs[i] = call_used_regs[i] = 1; 				\  if ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)		\      && flag_pic == 1)							\    fixed_regs[PIC_OFFSET_TABLE_REGNUM]					\      = call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 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/* count register number for special purposes */#define COUNT_REGISTER_REGNUM 66/* Special register that represents memory, used for float/int conversions.  */#define FPMEM_REGNUM 76/* 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.   One of the classes must always be named ALL_REGS and include all hard regs.   If there is more than one class, another class must be named NO_REGS   and contain no registers.   The name GENERAL_REGS must be the name of a class (or an alias for   another name such as ALL_REGS).  This is the class of registers   that is allowed by "g" or "r" in a register constraint.   Also, registers outside this class are allocated only when   instructions express preferences for them.   The classes must be numbered in nondecreasing order; that is,   a larger-numbered class must never be contained completely   in a smaller-numbered class.   For any two classes, it is very desirable that there be another   class that represents their union.  *//* The RS/6000 has three types of registers, fixed-point, floating-point,   and condition registers, plus three special registers, MQ, CTR, and the   link register.   However, r0 is special in that it cannot be used as a base register.   So make a class for registers valid as base registers.   Also, cr0 is the only condition code register that can be used in   arithmetic insns, so make a separate class for it.   There is a special 'register' (76), which is not a register, but a   placeholder for memory allocated to convert between floating point and   integral types.  This works around a problem where if we allocate memory   with allocate_stack_{local,temp} and the function is an inline function, the   memory allocated will clobber memory in the caller.  So we use a special   register, and if that is used, we allocate stack space for it.  */enum reg_class{  NO_REGS,  BASE_REGS,  GENERAL_REGS,  FLOAT_REGS,  NON_SPECIAL_REGS,  MQ_REGS,  LINK_REGS,  CTR_REGS,  LINK_OR_CTR_REGS,  SPECIAL_REGS,  SPEC_OR_GEN_REGS,  CR0_REGS,  CR_REGS,  NON_FLOAT_REGS,  FPMEM_REGS,  FLOAT_OR_FPMEM_REGS,  ALL_REGS,  LIM_REG_CLASSES};#define N_REG_CLASSES (int) LIM_REG_CLASSES/* Give names of register classes as strings for dump file.   */#define REG_CLASS_NAMES							\{									\  "NO_REGS",								\  "BASE_REGS",								\  "GENERAL_REGS",							\  "FLOAT_REGS",								\  "NON_SPECIAL_REGS",							\  "MQ_REGS",								\  "LINK_REGS",								\  "CTR_REGS",								\  "LINK_OR_CTR_REGS",							\  "SPECIAL_REGS",							\  "SPEC_OR_GEN_REGS",							\  "CR0_REGS",								\  "CR_REGS",								\  "NON_FLOAT_REGS",							\  "FPMEM_REGS",								\  "FLOAT_OR_FPMEM_REGS",						\  "ALL_REGS"								\}/* Define which registers fit in which classes.   This is an initializer for a vector of HARD_REG_SET   of length N_REG_CLASSES.  */#define REG_CLASS_CONTENTS						\{									\  { 0x00000000, 0x00000000, 0x00000000 },	/* NO_REGS */		\  { 0xfffffffe, 0x00000000, 0x00000008 },	/* BASE_REGS */		\  { 0xffffffff, 0x00000000, 0x00000008 },	/* GENERAL_REGS */	\

⌨️ 快捷键说明

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