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

📄 rs6000.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
   'Q' means that is a memory operand that is just an offset from a reg.   'R' is for AIX TOC entries.   'S' is a constant that can be placed into a 64-bit mask operand   'T' is a constant that can be placed into a 32-bit mask operand   'U' is for V.4 small data references.   'W' is a vector constant that can be easily generated (no mem refs).   'Y' is a indexed or word-aligned displacement memory operand.   't' is for AND masks that can be performed by two rldic{l,r} insns.  */#define EXTRA_CONSTRAINT(OP, C)						\  ((C) == 'Q' ? GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == REG	\   : (C) == 'R' ? legitimate_constant_pool_address_p (OP)		\   : (C) == 'S' ? mask64_operand (OP, DImode)				\   : (C) == 'T' ? mask_operand (OP, SImode)				\   : (C) == 'U' ? (DEFAULT_ABI == ABI_V4				\		   && small_data_operand (OP, GET_MODE (OP)))		\   : (C) == 't' ? (mask64_2_operand (OP, DImode)			\		   && (fixed_regs[CR0_REGNO]				\		       || !logical_operand (OP, DImode))		\		   && !mask64_operand (OP, DImode))			\   : (C) == 'W' ? (easy_vector_constant (OP, GET_MODE (OP)))		\   : (C) == 'Y' ? (word_offset_memref_operand (OP, GET_MODE (OP)))      \   : 0)/* Define which constraints are memory constraints.  Tell reload   that any memory address can be reloaded by copying the   memory address into a base register if required.  */#define EXTRA_MEMORY_CONSTRAINT(C, STR)				\  ((C) == 'Q' || (C) == 'Y')/* Given an rtx X being reloaded into a reg required to be   in class CLASS, return the class of reg to actually use.   In general this is just CLASS; but on some machines   in some cases it is preferable to use a more restrictive class.   On the RS/6000, we have to return NO_REGS when we want to reload a   floating-point CONST_DOUBLE to force it to be copied to memory.   We also don't want to reload integer values into floating-point   registers if we can at all help it.  In fact, this can   cause reload to abort, if it tries to generate a reload of CTR   into a FP register and discovers it doesn't have the memory location   required.   ??? Would it be a good idea to have reload do the converse, that is   try to reload floating modes into FP registers if possible? */#define PREFERRED_RELOAD_CLASS(X,CLASS)			\  ((CONSTANT_P (X)					\    && reg_classes_intersect_p ((CLASS), FLOAT_REGS))	\   ? NO_REGS 						\   : (GET_MODE_CLASS (GET_MODE (X)) == MODE_INT 	\      && (CLASS) == NON_SPECIAL_REGS)			\   ? GENERAL_REGS					\   : (CLASS))/* Return the register class of a scratch register needed to copy IN into   or out of a register in CLASS in MODE.  If it can be done directly,   NO_REGS is returned.  */#define SECONDARY_RELOAD_CLASS(CLASS,MODE,IN) \  secondary_reload_class (CLASS, MODE, IN)/* If we are copying between FP or AltiVec registers and anything   else, we need a memory location.  */#define SECONDARY_MEMORY_NEEDED(CLASS1,CLASS2,MODE) 		\ ((CLASS1) != (CLASS2) && ((CLASS1) == FLOAT_REGS		\			   || (CLASS2) == FLOAT_REGS		\			   || (CLASS1) == ALTIVEC_REGS		\			   || (CLASS2) == ALTIVEC_REGS))/* Return the maximum number of consecutive registers   needed to represent mode MODE in a register of class CLASS.   On RS/6000, this is the size of MODE in words,   except in the FP regs, where a single reg is enough for two words.  */#define CLASS_MAX_NREGS(CLASS, MODE)					\ (((CLASS) == FLOAT_REGS) 						\  ? ((GET_MODE_SIZE (MODE) + UNITS_PER_FP_WORD - 1) / UNITS_PER_FP_WORD) \  : (TARGET_E500_DOUBLE && (CLASS) == GENERAL_REGS && (MODE) == DFmode) \  ? 1                                                                   \  : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))/* Return a class of registers that cannot change FROM mode to TO mode.  */#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS)			  \  (((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN)		  \    && GET_MODE_SIZE (FROM) >= 8 && GET_MODE_SIZE (TO) >= 8)		  \   ? 0									  \   : GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)				  \   ? reg_classes_intersect_p (FLOAT_REGS, CLASS)			  \   : (TARGET_E500_DOUBLE && (((TO) == DFmode) + ((FROM) == DFmode)) == 1) \   ? reg_classes_intersect_p (GENERAL_REGS, CLASS)			  \   : (TARGET_E500_DOUBLE && (((TO) == DImode) + ((FROM) == DImode)) == 1) \   ? reg_classes_intersect_p (GENERAL_REGS, CLASS)			  \   : (TARGET_SPE && (SPE_VECTOR_MODE (FROM) + SPE_VECTOR_MODE (TO)) == 1) \   ? reg_classes_intersect_p (GENERAL_REGS, CLASS)			  \   : 0)/* Stack layout; function entry, exit and calling.  *//* Enumeration to give which calling sequence to use.  */enum rs6000_abi {  ABI_NONE,  ABI_AIX,			/* IBM's AIX */  ABI_V4,			/* System V.4/eabi */  ABI_DARWIN			/* Apple's Darwin (OS X kernel) */};extern enum rs6000_abi rs6000_current_abi;	/* available for use by subtarget *//* Define this if pushing a word on the stack   makes the stack pointer a smaller address.  */#define STACK_GROWS_DOWNWARD/* Offsets recorded in opcodes are a multiple of this alignment factor.  */#define DWARF_CIE_DATA_ALIGNMENT (-((int) (TARGET_32BIT ? 4 : 8)))/* Define this if the nominal address of the stack frame   is at the high-address end of the local variables;   that is, each additional local variable allocated   goes at a more negative offset in the frame.   On the RS/6000, we grow upwards, from the area after the outgoing   arguments.  *//* #define FRAME_GROWS_DOWNWARD *//* Size of the outgoing register save area */#define RS6000_REG_SAVE ((DEFAULT_ABI == ABI_AIX			\			  || DEFAULT_ABI == ABI_DARWIN)			\			 ? (TARGET_64BIT ? 64 : 32)			\			 : 0)/* Size of the fixed area on the stack */#define RS6000_SAVE_AREA \  (((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_DARWIN) ? 24 : 8)	\   << (TARGET_64BIT ? 1 : 0))/* MEM representing address to save the TOC register */#define RS6000_SAVE_TOC gen_rtx_MEM (Pmode, \				     plus_constant (stack_pointer_rtx, \						    (TARGET_32BIT ? 20 : 40)))/* Size of the V.4 varargs area if needed */#define RS6000_VARARGS_AREA 0/* Align an address */#define RS6000_ALIGN(n,a) (((n) + (a) - 1) & ~((a) - 1))/* Size of V.4 varargs area in bytes */#define RS6000_VARARGS_SIZE \  ((GP_ARG_NUM_REG * (TARGET_32BIT ? 4 : 8)) + (FP_ARG_NUM_REG * 8) + 8)/* Offset within stack frame to start allocating local variables at.   If FRAME_GROWS_DOWNWARD, this is the offset to the END of the   first local allocated.  Otherwise, it is the offset to the BEGINNING   of the first local allocated.   On the RS/6000, the frame pointer is the same as the stack pointer,   except for dynamic allocations.  So we start after the fixed area and   outgoing parameter area.  */#define STARTING_FRAME_OFFSET						\  (RS6000_ALIGN (current_function_outgoing_args_size,			\		 TARGET_ALTIVEC ? 16 : 8)				\   + RS6000_VARARGS_AREA						\   + RS6000_SAVE_AREA)/* Offset from the stack pointer register to an item dynamically   allocated on the stack, e.g., by `alloca'.   The default value for this macro is `STACK_POINTER_OFFSET' plus the   length of the outgoing arguments.  The default is correct for most   machines.  See `function.c' for details.  */#define STACK_DYNAMIC_OFFSET(FUNDECL)					\  (RS6000_ALIGN (current_function_outgoing_args_size,			\		 TARGET_ALTIVEC ? 16 : 8)				\   + (STACK_POINTER_OFFSET))/* If we generate an insn to push BYTES bytes,   this says how many the stack pointer really advances by.   On RS/6000, don't define this because there are no push insns.  *//*  #define PUSH_ROUNDING(BYTES) *//* Offset of first parameter from the argument pointer register value.   On the RS/6000, we define the argument pointer to the start of the fixed   area.  */#define FIRST_PARM_OFFSET(FNDECL) RS6000_SAVE_AREA/* Offset from the argument pointer register value to the top of   stack.  This is different from FIRST_PARM_OFFSET because of the   register save area.  */#define ARG_POINTER_CFA_OFFSET(FNDECL) 0/* Define this if stack space is still allocated for a parameter passed   in a register.  The value is the number of bytes allocated to this   area.  */#define REG_PARM_STACK_SPACE(FNDECL)	RS6000_REG_SAVE/* Define this if the above stack space is to be considered part of the   space allocated by the caller.  */#define OUTGOING_REG_PARM_STACK_SPACE/* This is the difference between the logical top of stack and the actual sp.   For the RS/6000, sp points past the fixed area.  */#define STACK_POINTER_OFFSET RS6000_SAVE_AREA/* Define this if the maximum size of all the outgoing args is to be   accumulated and pushed during the prologue.  The amount can be   found in the variable current_function_outgoing_args_size.  */#define ACCUMULATE_OUTGOING_ARGS 1/* Value is the number of bytes of arguments automatically   popped when returning from a subroutine call.   FUNDECL is the declaration node of the function (as a tree),   FUNTYPE is the data type of the function (as a tree),   or for a library call it is an identifier node for the subroutine name.   SIZE is the number of bytes of arguments passed on the stack.  */#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0/* Define how to find the value returned by a function.   VALTYPE is the data type of the value (as a tree).   If the precise function being called is known, FUNC is its FUNCTION_DECL;   otherwise, FUNC is 0.  */#define FUNCTION_VALUE(VALTYPE, FUNC) rs6000_function_value ((VALTYPE), (FUNC))/* Define how to find the value returned by a library function   assuming the value has mode MODE.  */#define LIBCALL_VALUE(MODE) rs6000_libcall_value ((MODE))/* DRAFT_V4_STRUCT_RET defaults off.  */#define DRAFT_V4_STRUCT_RET 0/* Let TARGET_RETURN_IN_MEMORY control what happens.  */#define DEFAULT_PCC_STRUCT_RETURN 0/* Mode of stack savearea.   FUNCTION is VOIDmode because calling convention maintains SP.   BLOCK needs Pmode for SP.   NONLOCAL needs twice Pmode to maintain both backchain and SP.  */#define STACK_SAVEAREA_MODE(LEVEL)	\  (LEVEL == SAVE_FUNCTION ? VOIDmode	\  : LEVEL == SAVE_NONLOCAL ? (TARGET_32BIT ? DImode : TImode) : Pmode)/* Minimum and maximum general purpose registers used to hold arguments.  */#define GP_ARG_MIN_REG 3#define GP_ARG_MAX_REG 10#define GP_ARG_NUM_REG (GP_ARG_MAX_REG - GP_ARG_MIN_REG + 1)/* Minimum and maximum floating point registers used to hold arguments.  */#define FP_ARG_MIN_REG 33#define	FP_ARG_AIX_MAX_REG 45#define	FP_ARG_V4_MAX_REG  40#define	FP_ARG_MAX_REG ((DEFAULT_ABI == ABI_AIX				\			 || DEFAULT_ABI == ABI_DARWIN)			\			? FP_ARG_AIX_MAX_REG : FP_ARG_V4_MAX_REG)#define FP_ARG_NUM_REG (FP_ARG_MAX_REG - FP_ARG_MIN_REG + 1)/* Minimum and maximum AltiVec registers used to hold arguments.  */#define ALTIVEC_ARG_MIN_REG (FIRST_ALTIVEC_REGNO + 2)#define ALTIVEC_ARG_MAX_REG (ALTIVEC_ARG_MIN_REG + 11)#define ALTIVEC_ARG_NUM_REG (ALTIVEC_ARG_MAX_REG - ALTIVEC_ARG_MIN_REG + 1)/* Return registers */#define GP_ARG_RETURN GP_ARG_MIN_REG#define FP_ARG_RETURN FP_ARG_MIN_REG#define ALTIVEC_ARG_RETURN (FIRST_ALTIVEC_REGNO + 2)/* Flags for the call/call_value rtl operations set up by function_arg */#define CALL_NORMAL		0x00000000	/* no special processing *//* Bits in 0x00000001 are unused.  */#define CALL_V4_CLEAR_FP_ARGS	0x00000002	/* V.4, no FP args passed */#define CALL_V4_SET_FP_ARGS	0x00000004	/* V.4, FP args were passed */#define CALL_LONG		0x00000008	/* always call indirect */#define CALL_LIBCALL		0x00000010	/* libcall *//* We don't have prologue and epilogue functions to save/restore   everything for most ABIs.  */#define WORLD_SAVE_P(INFO) 0/* 1 if N is a possible register number for a function value   as seen by the caller.   On RS/6000, this is r3, fp1, and v2 (for AltiVec).  */#define FUNCTION_VALUE_REGNO_P(N)					\  ((N) == GP_ARG_RETURN							\   || ((N) == FP_ARG_RETURN && TARGET_HARD_FLOAT && TARGET_FPRS)	\   || ((N) == ALTIVEC_ARG_RETURN && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI))/* 1 if N is a possible register number for function argument passing.   On RS/6000, these are r3-r10 and fp1-fp13.   On AltiVec, v2 - v13 are used for passing vectors.  */#define FUNCTION_ARG_REGNO_P(N)						\  ((unsigned) (N) - GP_ARG_MIN_REG < GP_ARG_NUM_REG			\   || ((unsigned) (N) - ALTIVEC_ARG_MIN_REG < ALTIVEC_ARG_NUM_REG	\       && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI)				\   || ((unsigned) (N) - FP_ARG_MIN_REG < FP_ARG_NUM_REG			\       && TARGET_HARD_FLOAT && TARGET_FPRS))/* A C structure for machine-specific, per-function data.   This is added to the cfun structure.  */typedef struct machine_function GTY(()){  /* Flags if __builtin_return_address (n) with n >= 1 was used.  */  int ra_needs_full_frame;  /* APPLE LOCAL begin volatile pic base reg in leaves */  /* Substitute PIC register in leaf functions */  unsigned int substitute_pic_base_reg;  /* APPLE LOCAL end volatile pic base reg in leaves */  /* Some local-dynamic symbol.  */  const char *some_ld_name;  /* Whether the instruction chain has been scanned already.  */  int insn_chain_scanned_p;  /* Flags if __builtin_return_address (0) was used.  */  int ra_need_lr;} machine_function;/* Define a data type for recording info about an argument list   during the scan of that argument list.  This data type should   hold all necessary information about the function itself   and about the args processed so far, enough to enable macros   such as FUNCTION_ARG to determine where the next arg should go.   On the RS/6000, this is a structure.  The first element is the number of   total argument words, the second is used to store the next   floating-point register number, and the third says how many more args we   have prototype types for.   For ABI_V4, we treat these slightly differently -- `sysv_gregno' is   the next available GP register, `fregno' is the next available FP   register, and `words' is the number of words used on the stack.   The varargs/stdarg support requires that this structure's size   be a multiple of sizeof(int).  */typede

⌨️ 快捷键说明

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