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

📄 arm.h

📁 linux下编程用 编译软件
💻 H
📖 第 1 页 / 共 5 页
字号:
  if (TARGET_REALLY_IWMMXT)					\    {								\      regno = FIRST_IWMMXT_GR_REGNUM;				\      /* The 2002/10/09 revision of the XScale ABI has wCG0     \         and wCG1 as call-preserved registers.  The 2002/11/21  \         revision changed this so that all wCG registers are    \         scratch registers.  */					\      for (regno = FIRST_IWMMXT_GR_REGNUM;			\	   regno <= LAST_IWMMXT_GR_REGNUM; ++ regno)		\	fixed_regs[regno] = 0;					\      /* The XScale ABI has wR0 - wR9 as scratch registers,     \	 the rest as call-preserved registers.  */		\      for (regno = FIRST_IWMMXT_REGNUM;				\	   regno <= LAST_IWMMXT_REGNUM; ++ regno)		\	{							\	  fixed_regs[regno] = 0;				\	  call_used_regs[regno] = regno < FIRST_IWMMXT_REGNUM + 10; \	}							\    }								\								\  if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)	\    {								\      fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;			\      call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;		\    }								\  else if (TARGET_APCS_STACK)					\    {								\      fixed_regs[10]     = 1;					\      call_used_regs[10] = 1;					\    }								\  /* -mcaller-super-interworking reserves r11 for calls to	\     _interwork_r11_call_via_rN().  Making the register global	\     is an easy way of ensuring that it remains valid for all	\     calls.  */							\  if (TARGET_APCS_FRAME || TARGET_CALLER_INTERWORKING		\      || TARGET_TPCS_FRAME || TARGET_TPCS_LEAF_FRAME)		\    {								\      fixed_regs[ARM_HARD_FRAME_POINTER_REGNUM] = 1;		\      call_used_regs[ARM_HARD_FRAME_POINTER_REGNUM] = 1;	\      if (TARGET_CALLER_INTERWORKING)				\	global_regs[ARM_HARD_FRAME_POINTER_REGNUM] = 1;		\    }								\  SUBTARGET_CONDITIONAL_REGISTER_USAGE				\}/* These are a couple of extensions to the formats accepted   by asm_fprintf:     %@ prints out ASM_COMMENT_START     %r prints out REGISTER_PREFIX reg_names[arg]  */#define ASM_FPRINTF_EXTENSIONS(FILE, ARGS, P)		\  case '@':						\    fputs (ASM_COMMENT_START, FILE);			\    break;						\							\  case 'r':						\    fputs (REGISTER_PREFIX, FILE);			\    fputs (reg_names [va_arg (ARGS, int)], FILE);	\    break;/* Round X up to the nearest word.  */#define ROUND_UP_WORD(X) (((X) + 3) & ~3)/* Convert fron bytes to ints.  */#define ARM_NUM_INTS(X) (((X) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* The number of (integer) registers required to hold a quantity of type MODE.   Also used for VFP registers.  */#define ARM_NUM_REGS(MODE)				\  ARM_NUM_INTS (GET_MODE_SIZE (MODE))/* The number of (integer) registers required to hold a quantity of TYPE MODE.  */#define ARM_NUM_REGS2(MODE, TYPE)                   \  ARM_NUM_INTS ((MODE) == BLKmode ? 		\  int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE))/* The number of (integer) argument register available.  */#define NUM_ARG_REGS		4/* Return the register number of the N'th (integer) argument.  */#define ARG_REGISTER(N) 	(N - 1)/* Specify the registers used for certain standard purposes.   The values of these macros are register numbers.  *//* The number of the last argument register.  */#define LAST_ARG_REGNUM 	ARG_REGISTER (NUM_ARG_REGS)/* The numbers of the Thumb register ranges.  */#define FIRST_LO_REGNUM  	0#define LAST_LO_REGNUM  	7#define FIRST_HI_REGNUM		8#define LAST_HI_REGNUM		11#ifndef TARGET_UNWIND_INFO/* We use sjlj exceptions for backwards compatibility.  */#define MUST_USE_SJLJ_EXCEPTIONS 1#endif/* We can generate DWARF2 Unwind info, even though we don't use it.  */#define DWARF2_UNWIND_INFO 1/* Use r0 and r1 to pass exception handling information.  */#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? N : INVALID_REGNUM)/* The register that holds the return address in exception handlers.  */#define ARM_EH_STACKADJ_REGNUM	2#define EH_RETURN_STACKADJ_RTX	gen_rtx_REG (SImode, ARM_EH_STACKADJ_REGNUM)/* The native (Norcroft) Pascal compiler for the ARM passes the static chain   as an invisible last argument (possible since varargs don't exist in   Pascal), so the following is not true.  */#define STATIC_CHAIN_REGNUM	(TARGET_ARM ? 12 : 9)/* Define this to be where the real frame pointer is if it is not possible to   work out the offset between the frame pointer and the automatic variables   until after register allocation has taken place.  FRAME_POINTER_REGNUM   should point to a special register that we will make sure is eliminated.   For the Thumb we have another problem.  The TPCS defines the frame pointer   as r11, and GCC believes that it is always possible to use the frame pointer   as base register for addressing purposes.  (See comments in   find_reloads_address()).  But - the Thumb does not allow high registers,   including r11, to be used as base address registers.  Hence our problem.   The solution used here, and in the old thumb port is to use r7 instead of   r11 as the hard frame pointer and to have special code to generate   backtrace structures on the stack (if required to do so via a command line   option) using r11.  This is the only 'user visible' use of r11 as a frame   pointer.  */#define ARM_HARD_FRAME_POINTER_REGNUM	11#define THUMB_HARD_FRAME_POINTER_REGNUM	 7#define HARD_FRAME_POINTER_REGNUM		\  (TARGET_ARM					\   ? ARM_HARD_FRAME_POINTER_REGNUM		\   : THUMB_HARD_FRAME_POINTER_REGNUM)#define FP_REGNUM	                HARD_FRAME_POINTER_REGNUM/* Register to use for pushing function arguments.  */#define STACK_POINTER_REGNUM	SP_REGNUM/* ARM floating pointer registers.  */#define FIRST_FPA_REGNUM 	16#define LAST_FPA_REGNUM  	23#define IS_FPA_REGNUM(REGNUM) \  (((REGNUM) >= FIRST_FPA_REGNUM) && ((REGNUM) <= LAST_FPA_REGNUM))#define FIRST_IWMMXT_GR_REGNUM	43#define LAST_IWMMXT_GR_REGNUM	46#define FIRST_IWMMXT_REGNUM	47#define LAST_IWMMXT_REGNUM	62#define IS_IWMMXT_REGNUM(REGNUM) \  (((REGNUM) >= FIRST_IWMMXT_REGNUM) && ((REGNUM) <= LAST_IWMMXT_REGNUM))#define IS_IWMMXT_GR_REGNUM(REGNUM) \  (((REGNUM) >= FIRST_IWMMXT_GR_REGNUM) && ((REGNUM) <= LAST_IWMMXT_GR_REGNUM))/* Base register for access to local variables of the function.  */#define FRAME_POINTER_REGNUM	25/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM	26#define FIRST_CIRRUS_FP_REGNUM	27#define LAST_CIRRUS_FP_REGNUM	42#define IS_CIRRUS_REGNUM(REGNUM) \  (((REGNUM) >= FIRST_CIRRUS_FP_REGNUM) && ((REGNUM) <= LAST_CIRRUS_FP_REGNUM))#define FIRST_VFP_REGNUM	63#define LAST_VFP_REGNUM		94#define IS_VFP_REGNUM(REGNUM) \  (((REGNUM) >= FIRST_VFP_REGNUM) && ((REGNUM) <= LAST_VFP_REGNUM))/* The number of hard registers is 16 ARM + 8 FPA + 1 CC + 1 SFP + 1 AFP.  *//* + 16 Cirrus registers take us up to 43.  *//* Intel Wireless MMX Technology registers add 16 + 4 more.  *//* VFP adds 32 + 1 more.  */#define FIRST_PSEUDO_REGISTER   96#define DBX_REGISTER_NUMBER(REGNO) arm_dbx_register_number (REGNO)/* 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.   If we have to have a frame pointer we might as well make use of it.   APCS says that the frame pointer does not need to be pushed in leaf   functions, or simple tail call functions.  */#ifndef SUBTARGET_FRAME_POINTER_REQUIRED#define SUBTARGET_FRAME_POINTER_REQUIRED 0#endif#define FRAME_POINTER_REQUIRED					\  (current_function_has_nonlocal_label				\   || SUBTARGET_FRAME_POINTER_REQUIRED				\   || (TARGET_ARM && TARGET_APCS_FRAME && ! leaf_function_p ()))/* 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.   On the ARM regs are UNITS_PER_WORD bits wide; FPA regs can hold any FP   mode.  */#define HARD_REGNO_NREGS(REGNO, MODE)  	\  ((TARGET_ARM 				\    && REGNO >= FIRST_FPA_REGNUM	\    && REGNO != FRAME_POINTER_REGNUM	\    && REGNO != ARG_POINTER_REGNUM)	\    && !IS_VFP_REGNUM (REGNO)		\   ? 1 : ARM_NUM_REGS (MODE))/* Return true if REGNO is suitable for holding a quantity of type MODE.  */#define HARD_REGNO_MODE_OK(REGNO, MODE)					\  arm_hard_regno_mode_ok ((REGNO), (MODE))/* 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) == GET_MODE_CLASS (MODE2))#define VALID_IWMMXT_REG_MODE(MODE) \ (arm_vector_mode_supported_p (MODE) || (MODE) == DImode)/* The order in which register should be allocated.  It is good to use ip   since no saving is required (though calls clobber it) and it never contains   function parameters.  It is quite good to use lr since other calls may   clobber it anyway.  Allocate r0 through r3 in reverse order since r3 is   least likely to contain a function parameter; in addition results are   returned in r0.  */#define REG_ALLOC_ORDER  	    \{                                   \     3,  2,  1,  0, 12, 14,  4,  5, \     6,  7,  8, 10,  9, 11, 13, 15, \    16, 17, 18, 19, 20, 21, 22, 23, \    27, 28, 29, 30, 31, 32, 33, 34, \    35, 36, 37, 38, 39, 40, 41, 42, \    43, 44, 45, 46, 47, 48, 49, 50, \    51, 52, 53, 54, 55, 56, 57, 58, \    59, 60, 61, 62,		    \    24, 25, 26,			    \    78, 77, 76, 75, 74, 73, 72, 71, \    70, 69, 68, 67, 66, 65, 64, 63, \    79, 80, 81, 82, 83, 84, 85, 86, \    87, 88, 89, 90, 91, 92, 93, 94, \    95				    \}/* Interrupt functions can only use registers that have already been   saved by the prologue, even if they would normally be   call-clobbered.  */#define HARD_REGNO_RENAME_OK(SRC, DST)					\	(! IS_INTERRUPT (cfun->machine->func_type) ||			\		regs_ever_live[DST])/* Register and constant classes.  *//* Register classes: used to be simple, just all ARM regs or all FPA regs   Now that the Thumb is involved it has become more complicated.  */enum reg_class{  NO_REGS,  FPA_REGS,  CIRRUS_REGS,  VFP_REGS,  IWMMXT_GR_REGS,  IWMMXT_REGS,  LO_REGS,  STACK_REG,  BASE_REGS,  HI_REGS,  CC_REG,  VFPCC_REG,  GENERAL_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",		\  "FPA_REGS",		\  "CIRRUS_REGS",	\  "VFP_REGS",		\  "IWMMXT_GR_REGS",	\  "IWMMXT_REGS",	\  "LO_REGS",		\  "STACK_REG",		\  "BASE_REGS",		\  "HI_REGS",		\  "CC_REG",		\  "VFPCC_REG",		\  "GENERAL_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  */	\  { 0x00FF0000, 0x00000000, 0x00000000 }, /* FPA_REGS */	\  { 0xF8000000, 0x000007FF, 0x00000000 }, /* CIRRUS_REGS */	\  { 0x00000000, 0x80000000, 0x7FFFFFFF }, /* VFP_REGS  */	\  { 0x00000000, 0x00007800, 0x00000000 }, /* IWMMXT_GR_REGS */	\  { 0x00000000, 0x7FFF8000, 0x00000000 }, /* IWMMXT_REGS */	\  { 0x000000FF, 0x00000000, 0x00000000 }, /* LO_REGS */		\  { 0x00002000, 0x00000000, 0x00000000 }, /* STACK_REG */	\  { 0x000020FF, 0x00000000, 0x00000000 }, /* BASE_REGS */	\  { 0x0000FF00, 0x00000000, 0x00000000 }, /* HI_REGS */		\  { 0x01000000, 0x00000000, 0x00000000 }, /* CC_REG */		\  { 0x00000000, 0x00000000, 0x80000000 }, /* VFPCC_REG */	\  { 0x0200FFFF, 0x00000000, 0x00000000 }, /* GENERAL_REGS */	\  { 0xFAFFFFFF, 0xFFFFFFFF, 0x7FFFFFFF }  /* 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)  arm_regno_class (REGNO)/* FPA registers can't do subreg as all values are reformatted to internal   precision.  VFP registers may only be accessed in the mode they   were set.  */#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS)	\  (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)		\   ? reg_classes_intersect_p (FPA_REGS, (CLASS))	\     || reg_classes_intersect_p (VFP_REGS, (CLASS))	\   : 0)/* We need to define this for LO_REGS on thumb.  Otherwise we can end up   using r0-r4 for function arguments, r7 for the stack frame and don't   have enough left over to do doubleword arithmetic.  */#define CLASS_LIKELY_SPILLED_P(CLASS)	\    ((TARGET_THUMB && (CLASS) == LO_REGS)	\     || (CLASS) == CC_REG)/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS  (TARGET_THUMB ? LO_REGS : GENERAL_REGS)#define BASE_REG_CLASS   (TARGET_THUMB ? LO_REGS : GENERAL_REGS)

⌨️ 快捷键说明

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