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

📄 arc.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
   even those that are not normally considered general registers.  *//* Registers 61, 62, and 63 are not really registers and we needn't treat   them as such.  We still need a register for the condition code.  */#define FIRST_PSEUDO_REGISTER 62/* 1 for registers that have pervasive standard uses   and are not available for the register allocator.   0-28  - general purpose registers   29    - ilink1 (interrupt link register)   30    - ilink2 (interrupt link register)   31    - blink (branch link register)   32-59 - reserved for extensions   60    - LP_COUNT   61    - condition code   For doc purposes:   61    - short immediate data indicator (setting flags)   62    - long immediate data indicator   63    - short immediate data indicator (not setting flags).   The general purpose registers are further broken down into:   0-7   - arguments/results   8-15  - call used   16-23 - call saved   24    - call used, static chain pointer   25    - call used, gptmp   26    - global pointer   27    - frame pointer   28    - stack pointer   By default, the extension registers are not available.  */#define FIXED_REGISTERS \{ 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, 1, 1, 1, 0,	\				\  1, 1, 1, 1, 1, 1, 1, 1,	\  1, 1, 1, 1, 1, 1, 1, 1,	\  1, 1, 1, 1, 1, 1, 1, 1,	\  1, 1, 1, 1, 1, 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, 1, 1, 1,	\  0, 0, 0, 0, 0, 0, 0, 0,	\  1, 1, 1, 1, 1, 1, 1, 1,	\				\  1, 1, 1, 1, 1, 1, 1, 1,	\  1, 1, 1, 1, 1, 1, 1, 1,	\  1, 1, 1, 1, 1, 1, 1, 1,	\  1, 1, 1, 1, 1, 1 }/* If defined, an initializer for a vector of integers, containing the   numbers of hard registers in the order in which GNU CC should   prefer to use them (from most preferred to least).  */#define REG_ALLOC_ORDER \{ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1,			\  16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 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,		\  27, 28, 29, 30 }/* 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.  */#define HARD_REGNO_NREGS(REGNO, MODE) \((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.  */extern unsigned int arc_hard_regno_mode_ok[];extern unsigned int arc_mode_class[];#define HARD_REGNO_MODE_OK(REGNO, MODE) \((arc_hard_regno_mode_ok[REGNO] & arc_mode_class[MODE]) != 0)/* A C expression that is nonzero if it is desirable to choose   register allocation so as to avoid move instructions between a   value of mode MODE1 and a value of mode MODE2.   If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R,   MODE2)' are ever different for any R, then `MODES_TIEABLE_P (MODE1,   MODE2)' must be zero.  *//* Tie QI/HI/SI modes together.  */#define MODES_TIEABLE_P(MODE1, MODE2) \(GET_MODE_CLASS (MODE1) == MODE_INT		\ && GET_MODE_CLASS (MODE2) == MODE_INT		\ && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD	\ && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD)/* 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, LPCOUNT_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", "LPCOUNT_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 \{ {0, 0}, {0, 0x10000000}, {0xffffffff, 0xfffffff}, \  {0xffffffff, 0x1fffffff} }/* 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 arc_regno_reg_class[];#define REGNO_REG_CLASS(REGNO) \(arc_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/* Get reg_class from a letter such as appears in the machine description.  */#define REG_CLASS_FROM_LETTER(C) \((C) == 'l' ? LPCOUNT_REG /* ??? needed? */ \ : 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) < 29 || (unsigned) reg_renumber[REGNO] < 29)#define REGNO_OK_FOR_INDEX_P(REGNO) \((REGNO) < 29 || (unsigned) reg_renumber[REGNO] < 29)/* 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 short immediates (always signed).   'J' is used for long immediates.   'K' is used for any constant up to 64 bits (for 64x32 situations?).  *//* local to this file */#define SMALL_INT(X) ((unsigned) ((X) + 0x100) < 0x200)/* local to this file */#define LARGE_INT(X) \((X) >= (-(HOST_WIDE_INT) 0x7fffffff - 1) \ && (X) <= (unsigned HOST_WIDE_INT) 0xffffffff)#define CONST_OK_FOR_LETTER_P(VALUE, C) \((C) == 'I' ? SMALL_INT (VALUE)		\ : (C) == 'J' ? LARGE_INT (VALUE)	\ : (C) == 'K' ? 1			\ : 0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.  *//* 'G' is used for integer values for the multiplication insns where the   operands are extended from 4 bytes to 8 bytes.   'H' is used when any 64 bit constant is allowed.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \((C) == 'G' ? arc_double_limm_p (VALUE) \ : (C) == 'H' ? 1 \ : 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.  *//* ??? This currently isn't used.  Waiting for PIC.  */#if 0#define EXTRA_CONSTRAINT(VALUE, C) \((C) == 'R' ? (SYMBOL_REF_FLAG (VALUE) || GET_CODE (VALUE) == LABEL_REF) \ : 0)#endif/* 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/* 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.  */#define FRAME_GROWS_DOWNWARD/* 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.  */#define STARTING_FRAME_OFFSET 0/* Offset from the stack pointer register to the first location at which   outgoing arguments are placed.  */#define STACK_POINTER_OFFSET FIRST_PARM_OFFSET (0)/* Offset of first parameter from the argument pointer register value.  *//* 4 bytes for each of previous fp, return address, and previous gp.   4 byte reserved area for future considerations.  */#define FIRST_PARM_OFFSET(FNDECL) 16/* A C expression whose value is RTL representing the address in a   stack frame where the pointer to the caller's frame is stored.   Assume that FRAMEADDR is an RTL expression for the address of the   stack frame itself.   If you don't define this macro, the default is to return the value   of FRAMEADDR--that is, the stack frame address is also the address   of the stack word that points to the previous frame.  *//* ??? unfinished *//*define DYNAMIC_CHAIN_ADDRESS (FRAMEADDR)*//* A C expression whose value is RTL representing the value of the   return address for the frame COUNT steps up from the current frame.   FRAMEADDR is the frame pointer of the COUNT frame, or the frame   pointer of the COUNT - 1 frame if `RETURN_ADDR_IN_PREVIOUS_FRAME'   is defined.  *//* The current return address is in r31.  The return address of anything   farther back is at [%fp,4].  */#if 0 /* The default value should work.  */#define RETURN_ADDR_RTX(COUNT, FRAME) \(((COUNT) == -1)				\ ? gen_rtx (REG, Pmode, 31)			\ : copy_to_reg (gen_rtx (MEM, Pmode,		\			 memory_address (Pmode, plus_constant ((FRAME), UNITS_PER_WORD)))))#endif/* Register to use for pushing function arguments.  */#define STACK_POINTER_REGNUM 28/* Base register for access to local variables of the function.  */#define FRAME_POINTER_REGNUM 27/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM/* Register in which static-chain is passed to a function.  This must   not be a register used by the prologue.  */#define STATIC_CHAIN_REGNUM 24/* 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)/* C statement to store the difference between the frame pointer   and the stack pointer values immediately after the function prologue.  */#define INITIAL_FRAME_POINTER_OFFSET(VAR) \((VAR) = arc_compute_frame_size (get_frame_size ()))/* Function argument passing.  *//* When a prototype says `char' or `short', really pass an `int'.  */#define PROMOTE_PROTOTYPES/* 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/* 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.  */

⌨️ 快捷键说明

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