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

📄 m32r.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
   && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD)#define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \  m32r_hard_regno_rename_ok (OLD_REG, NEW_REG)/* Register classes and constants.  *//* 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.   It is important that any condition codes have class NO_REGS.   See `register_operand'.  */enum reg_class{  NO_REGS, CARRY_REG, ACCUM_REGS, 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", "CARRY_REG", "ACCUM_REGS", "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.  */#ifndef SUBTARGET_REG_CLASS_CARRY#define SUBTARGET_REG_CLASS_CARRY 0#endif#ifndef SUBTARGET_REG_CLASS_ACCUM#define SUBTARGET_REG_CLASS_ACCUM 0#endif#ifndef SUBTARGET_REG_CLASS_GENERAL#define SUBTARGET_REG_CLASS_GENERAL 0#endif#ifndef SUBTARGET_REG_CLASS_ALL#define SUBTARGET_REG_CLASS_ALL 0#endif#define REG_CLASS_CONTENTS						\{									\  { 0x00000 },								\  { 0x20000 | SUBTARGET_REG_CLASS_CARRY },				\  { 0x40000 | SUBTARGET_REG_CLASS_ACCUM },				\  { 0x1ffff | SUBTARGET_REG_CLASS_GENERAL },				\  { 0x7ffff | SUBTARGET_REG_CLASS_ALL },				\}/* 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.  */extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER];#define REGNO_REG_CLASS(REGNO) (m32r_regno_reg_class[REGNO])/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS GENERAL_REGS#define BASE_REG_CLASS GENERAL_REGS#define REG_CLASS_FROM_LETTER(C)			\  (  (C) == 'c'	? CARRY_REG				\   : (C) == 'a'	? ACCUM_REGS				\   :		  NO_REGS)/* These assume that REGNO is a hard or pseudo reg number.   They give nonzero only if REGNO is a hard reg of the suitable class   or a pseudo reg currently allocated to a suitable hard reg.   Since they use reg_renumber, they are safe only once reg_renumber   has been allocated, which happens in local-alloc.c.  */#define REGNO_OK_FOR_BASE_P(REGNO) \  ((REGNO) < FIRST_PSEUDO_REGISTER			\   ? GPR_P (REGNO) || (REGNO) == ARG_POINTER_REGNUM	\   : GPR_P (reg_renumber[REGNO]))#define REGNO_OK_FOR_INDEX_P(REGNO) REGNO_OK_FOR_BASE_P(REGNO)/* 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.  */#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)/* Return the maximum number of consecutive registers   needed to represent mode MODE in a register of class CLASS.  */#define CLASS_MAX_NREGS(CLASS, MODE) \  ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* The letters I, J, K, L, M, N, O, 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 used for 8 bit signed immediates.   'J' is used for 16 bit signed immediates.   'K' is used for 16 bit unsigned immediates.   'L' is used for 16 bit immediates left shifted by 16 (sign ???).   'M' is used for 24 bit unsigned immediates.   'N' is used for any 32 bit non-symbolic value.   'O' is used for 5 bit unsigned immediates (shift count).   'P' is used for 16 bit signed immediates for compares       (values in the range -32767 to +32768).  *//* Return true if a value is inside a range.  */#define IN_RANGE_P(VALUE, LOW, HIGH)					\  (((unsigned HOST_WIDE_INT)((VALUE) - (LOW)))				\   <= ((unsigned HOST_WIDE_INT)((HIGH) - (LOW))))/* Local to this file.  */#define INT8_P(X)      ((X) >= -   0x80 && (X) <= 0x7f)#define INT16_P(X)     ((X) >= - 0x8000 && (X) <= 0x7fff)#define CMP_INT16_P(X) ((X) >= - 0x7fff && (X) <= 0x8000)#define UPPER16_P(X)  (((X) & 0xffff) == 0				\		        && ((X) >> 16) >= - 0x8000			\		        && ((X) >> 16) <= 0x7fff)#define UINT16_P(X)   (((unsigned HOST_WIDE_INT) (X)) <= 0x0000ffff)#define UINT24_P(X)   (((unsigned HOST_WIDE_INT) (X)) <= 0x00ffffff)#define UINT32_P(X)   (((unsigned HOST_WIDE_INT) (X)) <= 0xffffffff)#define UINT5_P(X)    ((X) >= 0 && (X) < 32)#define INVERTED_SIGNED_8BIT(VAL) ((VAL) >= -127 && (VAL) <= 128)#define CONST_OK_FOR_LETTER_P(VALUE, C)					\  (  (C) == 'I' ? INT8_P (VALUE)					\   : (C) == 'J' ? INT16_P (VALUE)					\   : (C) == 'K' ? UINT16_P (VALUE)					\   : (C) == 'L' ? UPPER16_P (VALUE)					\   : (C) == 'M' ? UINT24_P (VALUE)					\   : (C) == 'N' ? INVERTED_SIGNED_8BIT (VALUE)				\   : (C) == 'O' ? UINT5_P (VALUE)					\   : (C) == 'P' ? CMP_INT16_P (VALUE)					\   : 0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.   For the m32r, handle a few constants inline.   ??? We needn't treat DI and DF modes differently, but for now we do.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)				\  (  (C) == 'G' ? easy_di_const (VALUE)					\   : (C) == 'H' ? easy_df_const (VALUE)					\   : 0)/* A C expression that defines the optional machine-dependent constraint   letters that can be used to segregate specific types of operands,   usually memory references, for the target machine.  It should return 1 if   VALUE corresponds to the operand type represented by the constraint letter   C.  If C is not defined as an extra constraint, the value returned should   be 0 regardless of VALUE.  *//* Q is for symbolic addresses loadable with ld24.   R is for symbolic addresses when ld24 can't be used.   S is for stores with pre {inc,dec}rement   T is for indirect of a pointer.   U is for loads with post increment.  */#define EXTRA_CONSTRAINT(VALUE, C)					\  (  (C) == 'Q' ? ((TARGET_ADDR24 && GET_CODE (VALUE) == LABEL_REF)	\		 || addr24_operand (VALUE, VOIDmode))			\   : (C) == 'R' ? ((TARGET_ADDR32 && GET_CODE (VALUE) == LABEL_REF)	\		 || addr32_operand (VALUE, VOIDmode))			\   : (C) == 'S' ? (GET_CODE (VALUE) == MEM				\		 && STORE_PREINC_PREDEC_P (GET_MODE (VALUE),		\					   XEXP (VALUE, 0)))		\   : (C) == 'T' ? (GET_CODE (VALUE) == MEM				\		 && memreg_operand (VALUE, GET_MODE (VALUE)))		\   : (C) == 'U' ? (GET_CODE (VALUE) == MEM				\		 && LOAD_POSTINC_P (GET_MODE (VALUE),			\				    XEXP (VALUE, 0)))			\   : 0)/* Stack layout and stack pointer usage.  *//* Define this macro if pushing a word onto the stack moves the stack   pointer to a smaller address.  */#define STACK_GROWS_DOWNWARD/* Offset from frame pointer 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.  *//* The frame pointer points at the same place as the stack pointer, except if   alloca has been called.  */#define STARTING_FRAME_OFFSET \  M32R_STACK_ALIGN (current_function_outgoing_args_size)/* Offset from the stack pointer register to the first location at which   outgoing arguments are placed.  */#define STACK_POINTER_OFFSET 0/* Offset of first parameter from the argument pointer register value.  */#define FIRST_PARM_OFFSET(FNDECL) 0/* Register to use for pushing function arguments.  */#define STACK_POINTER_REGNUM 15/* Base register for access to local variables of the function.  */#define FRAME_POINTER_REGNUM 13/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM 16/* Register in which static-chain is passed to a function.   This must not be a register used by the prologue.  */#define STATIC_CHAIN_REGNUM  7/* These aren't official macros.  */#define PROLOGUE_TMP_REGNUM  4#define RETURN_ADDR_REGNUM  14/* #define GP_REGNUM        12 */#define CARRY_REGNUM        17#define ACCUM_REGNUM        18#define M32R_MAX_INT_REGS   16#ifndef SUBTARGET_GPR_P#define SUBTARGET_GPR_P(REGNO) 0#endif#ifndef SUBTARGET_ACCUM_P#define SUBTARGET_ACCUM_P(REGNO) 0#endif#ifndef SUBTARGET_CARRY_P#define SUBTARGET_CARRY_P(REGNO) 0#endif#define GPR_P(REGNO)   (IN_RANGE_P ((REGNO), 0, 15) || SUBTARGET_GPR_P (REGNO))#define ACCUM_P(REGNO) ((REGNO) == ACCUM_REGNUM || SUBTARGET_ACCUM_P (REGNO))#define CARRY_P(REGNO) ((REGNO) == CARRY_REGNUM || SUBTARGET_CARRY_P (REGNO))/* Eliminating the frame and arg pointers.  *//* A C expression which is nonzero if a function must have and use a   frame pointer.  This expression is evaluated in the reload pass.   If its value is nonzero the function will have a frame pointer.  */#define FRAME_POINTER_REQUIRED current_function_calls_alloca#if 0/* C statement to store the difference between the frame pointer   and the stack pointer values immediately after the function prologue.   If `ELIMINABLE_REGS' is defined, this macro will be not be used and   need not be defined.  */#define INITIAL_FRAME_POINTER_OFFSET(VAR) \((VAR) = m32r_compute_frame_size (get_frame_size ()))#endif/* If defined, this macro specifies a table of register pairs used to   eliminate unneeded registers that point into the stack frame.  If   it is not defined, the only elimination attempted by the compiler   is to replace references to the frame pointer with references to   the stack pointer.   Note that the elimination of the argument pointer with the stack   pointer is specified first since that is the preferred elimination.  */#define ELIMINABLE_REGS					\{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM },	\ { ARG_POINTER_REGNUM,	 STACK_POINTER_REGNUM },	\ { ARG_POINTER_REGNUM,   FRAME_POINTER_REGNUM }}/* A C expression that returns nonzero if the compiler is allowed to   try to replace register number FROM-REG with register number   TO-REG.  This macro need only be defined if `ELIMINABLE_REGS' is   defined, and will usually be the constant 1, since most of the   cases preventing register elimination are things that the compiler   already knows about.  */#define CAN_ELIMINATE(FROM, TO)						\  ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM		\   ? ! frame_pointer_needed						\   : 1)/* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'.  It   specifies the initial difference between the specified pair of   registers.  This macro must be defined if `ELIMINABLE_REGS' is   defined.  */#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)				\  do										\    {										\      int size = m32r_compute_frame_size (get_frame_size ());			\										\      if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM)	\	(OFFSET) = 0;								\      else if ((FROM) == ARG_POINTER_REGNUM && (TO) == FRAME_POINTER_REGNUM)	\	(OFFSET) = size - current_function_pretend_args_size;			\      else if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM)	\	(OFFSET) = size - current_function_pretend_args_size;			\      else									\	abort ();								\    }										\  while (0)/* Function argument passing.  *//* If defined, the maximum amount of space required for outgoing   arguments will be computed and placed into the variable   `current_function_outgoing_args_size'.  No space will be pushed   onto the stack for each call; instead, the function prologue should   increase the stack frame size by this amount.  */#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(DECL, FUNTYPE, SIZE) 0/* 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.  */#define CUMULATIVE_ARGS int/* Initialize a variable CUM of type CUMULATIVE_ARGS   for a call to a function whose data type is FNTYPE.   For a library call, FNTYPE is 0.  */#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \  ((CUM) = 0)/* The number of registers used for parameter passing.  Local to this file.  */#define M32R_MAX_PARM_REGS 4/* 1 if N is a possible register number for function argument passing.  */#define FUNCTION_ARG_REGNO_P(N) \  ((unsigned) (N) < M32R_MAX_PARM_REGS)/* The ROUND_ADVANCE* macros are local to this file.  *//* Round SIZE up to a word boundary.  */#define ROUND_ADVANCE(SIZE) \  (((SIZE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* Round arg MODE/TYPE up to the next word boundary.  */#define ROUND_ADVANCE_ARG(MODE, TYPE) \  ((MODE) == BLKmode				\

⌨️ 快捷键说明

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