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

📄 rs6000.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
#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)/* SPE SIMD registers are just the GPRs.  */#define SPE_SIMD_REGNO_P(N) ((N) <= 31)/* 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.  */#define HARD_REGNO_NREGS(REGNO, MODE) rs6000_hard_regno_nregs ((REGNO), (MODE))#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE)	\  ((TARGET_32BIT && TARGET_POWERPC64			\    && (GET_MODE_SIZE (MODE) > 4)  \    && INT_REGNO_P (REGNO)) ? 1 : 0)#define ALTIVEC_VECTOR_MODE(MODE)	\	 ((MODE) == V16QImode		\	  || (MODE) == V8HImode		\	  || (MODE) == V4SFmode		\	  || (MODE) == V4SImode)#define SPE_VECTOR_MODE(MODE)		\	((MODE) == V4HImode          	\         || (MODE) == V2SFmode          \         || (MODE) == V1DImode          \         || (MODE) == V2SImode)#define UNITS_PER_SIMD_WORD     \        (TARGET_ALTIVEC ? 16 : (TARGET_SPE ? 8 : 0) )/* Value is TRUE if hard register REGNO can hold a value of   machine-mode MODE.  */#define HARD_REGNO_MODE_OK(REGNO, MODE) \  rs6000_hard_regno_mode_ok_p[(int)(MODE)][REGNO]/* 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		\   : SPE_VECTOR_MODE (MODE1)			\   ? SPE_VECTOR_MODE (MODE2)			\   : SPE_VECTOR_MODE (MODE2)			\   ? SPE_VECTOR_MODE (MODE1)			\   : ALTIVEC_VECTOR_MODE (MODE1)		\   ? ALTIVEC_VECTOR_MODE (MODE2)		\   : ALTIVEC_VECTOR_MODE (MODE2)		\   ? ALTIVEC_VECTOR_MODE (MODE1)		\   : 1)/* Post-reload, we can't use any new AltiVec registers, as we already   emitted the vrsave mask.  */#define HARD_REGNO_RENAME_OK(SRC, DST) \  (! ALTIVEC_REGNO_P (DST) || regs_ever_live[DST])/* A C expression returning the cost of moving data from a register of class   CLASS1 to one of CLASS2.  */#define REGISTER_MOVE_COST rs6000_register_move_cost/* A C expressions returning the cost of moving data of MODE from a register to   or from memory.  */#define MEMORY_MOVE_COST rs6000_memory_move_cost/* 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/* Override BRANCH_COST heuristic which empirically produces worse   performance for removing short circuiting from the logical ops.  */#define LOGICAL_OP_NON_SHORT_CIRCUIT 0/* A fixed register used at prologue and epilogue generation to fix   addressing modes.  The SPE needs heavy addressing fixes at the last   minute, and it's best to save a register for it.   AltiVec also needs fixes, but we've gotten around using r11, which   is actually wrong because when use_backchain_to_restore_sp is true,   we end up clobbering r11.   The AltiVec case needs to be fixed.  Dunno if we should break ABI   compatibility and reserve a register for it as well..  */#define FIXED_SCRATCH (TARGET_SPE ? 14 : 11)/* Define this macro to change register usage conditional on target   flags.  */#define CONDITIONAL_REGISTER_USAGE rs6000_conditional_register_usage ()/* 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/* 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.  AltiVec adds a vector register class.   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.  */enum reg_class{  NO_REGS,  BASE_REGS,  GENERAL_REGS,  FLOAT_REGS,  ALTIVEC_REGS,  VRSAVE_REGS,  VSCR_REGS,  SPE_ACC_REGS,  SPEFSCR_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,  XER_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",								\  "ALTIVEC_REGS",							\  "VRSAVE_REGS",							\  "VSCR_REGS",								\  "SPE_ACC_REGS",                                                       \  "SPEFSCR_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",							\  "XER_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, 0x00000000 }, /* NO_REGS */	     \  { 0xfffffffe, 0x00000000, 0x00000008, 0x00000000 }, /* BASE_REGS */	     \  { 0xffffffff, 0x00000000, 0x00000008, 0x00000000 }, /* GENERAL_REGS */     \  { 0x00000000, 0xffffffff, 0x00000000, 0x00000000 }, /* FLOAT_REGS */       \  { 0x00000000, 0x00000000, 0xffffe000, 0x00001fff }, /* ALTIVEC_REGS */     \  { 0x00000000, 0x00000000, 0x00000000, 0x00002000 }, /* VRSAVE_REGS */	     \  { 0x00000000, 0x00000000, 0x00000000, 0x00004000 }, /* VSCR_REGS */	     \  { 0x00000000, 0x00000000, 0x00000000, 0x00008000 }, /* SPE_ACC_REGS */     \  { 0x00000000, 0x00000000, 0x00000000, 0x00010000 }, /* SPEFSCR_REGS */     \  { 0xffffffff, 0xffffffff, 0x00000008, 0x00000000 }, /* NON_SPECIAL_REGS */ \  { 0x00000000, 0x00000000, 0x00000001, 0x00000000 }, /* MQ_REGS */	     \  { 0x00000000, 0x00000000, 0x00000002, 0x00000000 }, /* LINK_REGS */	     \  { 0x00000000, 0x00000000, 0x00000004, 0x00000000 }, /* CTR_REGS */	     \  { 0x00000000, 0x00000000, 0x00000006, 0x00000000 }, /* LINK_OR_CTR_REGS */ \  { 0x00000000, 0x00000000, 0x00000007, 0x00002000 }, /* SPECIAL_REGS */     \  { 0xffffffff, 0x00000000, 0x0000000f, 0x00000000 }, /* SPEC_OR_GEN_REGS */ \  { 0x00000000, 0x00000000, 0x00000010, 0x00000000 }, /* CR0_REGS */	     \  { 0x00000000, 0x00000000, 0x00000ff0, 0x00000000 }, /* CR_REGS */	     \  { 0xffffffff, 0x00000000, 0x0000efff, 0x00000000 }, /* NON_FLOAT_REGS */   \  { 0x00000000, 0x00000000, 0x00001000, 0x00000000 }, /* XER_REGS */	     \  { 0xffffffff, 0xffffffff, 0xffffffff, 0x00003fff }  /* ALL_REGS */	     \}/* The same information, inverted:   Return the class number of the smallest class containing   reg number REGNO.  This could be a conditional expression   or could index an array.  */#define REGNO_REG_CLASS(REGNO)			\ ((REGNO) == 0 ? GENERAL_REGS			\  : (REGNO) < 32 ? BASE_REGS			\  : FP_REGNO_P (REGNO) ? FLOAT_REGS		\  : ALTIVEC_REGNO_P (REGNO) ? ALTIVEC_REGS	\  : (REGNO) == CR0_REGNO ? CR0_REGS		\  : CR_REGNO_P (REGNO) ? CR_REGS		\  : (REGNO) == MQ_REGNO ? MQ_REGS		\  : (REGNO) == LINK_REGISTER_REGNUM ? LINK_REGS	\  : (REGNO) == COUNT_REGISTER_REGNUM ? CTR_REGS	\  : (REGNO) == ARG_POINTER_REGNUM ? BASE_REGS	\  : (REGNO) == XER_REGNO ? XER_REGS		\  : (REGNO) == VRSAVE_REGNO ? VRSAVE_REGS	\  : (REGNO) == VSCR_REGNO ? VRSAVE_REGS	\  : (REGNO) == SPE_ACC_REGNO ? SPE_ACC_REGS	\  : (REGNO) == SPEFSCR_REGNO ? SPEFSCR_REGS	\  : NO_REGS)/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS GENERAL_REGS#define BASE_REG_CLASS BASE_REGS/* Get reg_class from a letter such as appears in the machine description.  */#define REG_CLASS_FROM_LETTER(C) \  ((C) == 'f' ? ((TARGET_HARD_FLOAT && TARGET_FPRS) ? FLOAT_REGS : NO_REGS) \   : (C) == 'b' ? BASE_REGS	\   : (C) == 'h' ? SPECIAL_REGS	\   : (C) == 'q' ? MQ_REGS	\   : (C) == 'c' ? CTR_REGS	\   : (C) == 'l' ? LINK_REGS	\   : (C) == 'v' ? ALTIVEC_REGS	\   : (C) == 'x' ? CR0_REGS	\   : (C) == 'y' ? CR_REGS	\   : (C) == 'z' ? XER_REGS	\   : NO_REGS)/* The letters I, J, K, L, M, N, and P in a register constraint string   can be used to stand for particular ranges of immediate operands.   This macro defines what the ranges are.   C is the letter, and VALUE is a constant value.   Return 1 if VALUE is in the range specified by C.   `I' is a signed 16-bit constant   `J' is a constant with only the high-order 16 bits nonzero   `K' is a constant with only the low-order 16 bits nonzero   `L' is a signed 16-bit constant shifted left 16 bits   `M' is a constant that is greater than 31   `N' is a positive constant that is an exact power of two   `O' is the constant zero   `P' is a constant whose negation is a signed 16-bit constant */#define CONST_OK_FOR_LETTER_P(VALUE, C)					\   ( (C) == 'I' ? (unsigned HOST_WIDE_INT) ((VALUE) + 0x8000) < 0x10000	\   : (C) == 'J' ? ((VALUE) & (~ (unsigned HOST_WIDE_INT) 0xffff0000)) == 0 \   : (C) == 'K' ? ((VALUE) & (~ (HOST_WIDE_INT) 0xffff)) == 0		\   : (C) == 'L' ? (((VALUE) & 0xffff) == 0				\		   && ((VALUE) >> 31 == -1 || (VALUE) >> 31 == 0))	\   : (C) == 'M' ? (VALUE) > 31						\   : (C) == 'N' ? (VALUE) > 0 && exact_log2 (VALUE) >= 0		\   : (C) == 'O' ? (VALUE) == 0						\   : (C) == 'P' ? (unsigned HOST_WIDE_INT) ((- (VALUE)) + 0x8000) < 0x10000 \   : 0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.   We flag for special constants when we can copy the constant into   a general register in two insns for DF/DI and one insn for SF.   'H' is used for DI/DF constants that take 3 insns.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)				\  (  (C) == 'G' ? (num_insns_constant (VALUE, GET_MODE (VALUE))		\		   == ((GET_MODE (VALUE) == SFmode) ? 1 : 2))		\   : (C) == 'H' ? (num_insns_constant (VALUE, GET_MODE (VALUE)) == 3)	\   : 0)/* Optional extra constraints for this machine.

⌨️ 快捷键说明

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