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

📄 bfin.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
#define GENERAL_REGS DPREGS/* Give names of register classes as strings for dump file.   */#define REG_CLASS_NAMES \{  "NO_REGS",		\   "IREGS",		\   "BREGS",		\   "LREGS",		\   "MREGS",		\   "CIRCREGS",		\   "DAGREGS",		\   "EVEN_AREGS",	\   "ODD_AREGS",		\   "AREGS",		\   "CCREGS",		\   "EVEN_DREGS",	\   "ODD_DREGS",		\   "DREGS",		\   "PREGS_CLOBBERED",	\   "PREGS",		\   "DPREGS",		\   "MOST_REGS",		\   "PROLOGUE_REGS",	\   "NON_A_CC_REGS",	\   "ALL_REGS" }/* An initializer containing the contents of the register classes, as integers   which are bit masks.  The Nth integer specifies the contents of class N.   The way the integer MASK is interpreted is that register R is in the class   if `MASK & (1 << R)' is 1.   When the machine has more than 32 registers, an integer does not suffice.   Then the integers are replaced by sub-initializers, braced groupings   containing several integers.  Each sub-initializer must be suitable as an   initializer for the type `HARD_REG_SET' which is defined in   `hard-reg-set.h'.  *//* NOTE: DSP registers, IREGS - AREGS, are not GENERAL_REGS.  We use   MOST_REGS as the union of DPREGS and DAGREGS.  */#define REG_CLASS_CONTENTS \    /* 31 - 0       63-32   */ \{   { 0x00000000,    0 },		/* NO_REGS */	\    { 0x02490000,    0 },		/* IREGS */	\    { 0x04920000,    0 },		/* BREGS */		\    { 0x09240000,    0 },		/* LREGS */	\    { 0xf0000000,    0 },		/* MREGS */   \    { 0x0fff0000,    0 },		/* CIRCREGS */   \    { 0xffff0000,    0 },		/* DAGREGS */   \    { 0x00000000,    0x1 },		/* EVEN_AREGS */   \    { 0x00000000,    0x2 },		/* ODD_AREGS */   \    { 0x00000000,    0x3 },		/* AREGS */   \    { 0x00000000,    0x4 },		/* CCREGS */  \    { 0x00000055,    0 },		/* EVEN_DREGS */   \    { 0x000000aa,    0 },		/* ODD_DREGS */   \    { 0x000000ff,    0 },		/* DREGS */   \    { 0x00004700,    0x800 },		/* PREGS_CLOBBERED */   \    { 0x0000ff00,    0x800 },		/* PREGS */   \    { 0x0000ffff,    0x800 },		/* DPREGS */   \    { 0xffffffff,    0x800 },		/* MOST_REGS */\    { 0x00000000,    0x7f8 },		/* PROLOGUE_REGS */\    { 0xffffffff,    0xff8 },		/* NON_A_CC_REGS */\    { 0xffffffff,    0xfff }}		/* ALL_REGS */#define BASE_REG_CLASS          PREGS#define INDEX_REG_CLASS         PREGS#define REGNO_OK_FOR_BASE_STRICT_P(X) (REGNO_REG_CLASS (X) == BASE_REG_CLASS)#define REGNO_OK_FOR_BASE_NONSTRICT_P(X)  \ (((X) >= FIRST_PSEUDO_REGISTER) || REGNO_REG_CLASS (X) == BASE_REG_CLASS)#ifdef REG_OK_STRICT#define REGNO_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_STRICT_P (X)#else#define REGNO_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_NONSTRICT_P (X)#endif#define REG_OK_FOR_BASE_P(X)    (REG_P (X) && REGNO_OK_FOR_BASE_P (REGNO (X)))#define REG_OK_FOR_INDEX_P(X)   0#define REGNO_OK_FOR_INDEX_P(X)   0/* Get reg_class from a letter such as appears in the machine description.  */#define REG_CLASS_FROM_LETTER(LETTER)	\  ((LETTER) == 'a' ? PREGS :            \   (LETTER) == 'd' ? DREGS : 		\   (LETTER) == 'z' ? PREGS_CLOBBERED :	\   (LETTER) == 'D' ? EVEN_DREGS : 	\   (LETTER) == 'W' ? ODD_DREGS : 	\   (LETTER) == 'e' ? AREGS : 		\   (LETTER) == 'A' ? EVEN_AREGS : 	\   (LETTER) == 'B' ? ODD_AREGS : 	\   (LETTER) == 'b' ? IREGS :            \   (LETTER) == 'B' ? BREGS :            \   (LETTER) == 'f' ? MREGS : 		\   (LETTER) == 'c' ? CIRCREGS :         \   (LETTER) == 'C' ? CCREGS : 		\   (LETTER) == 'x' ? MOST_REGS :	\   (LETTER) == 'y' ? PROLOGUE_REGS :	\   (LETTER) == 'w' ? NON_A_CC_REGS :	\   NO_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) < REG_P0 ? DREGS				\ : (REGNO) < REG_I0 ? PREGS				\ : (REGNO) == REG_ARGP ? BASE_REG_CLASS			\ : (REGNO) >= REG_I0 && (REGNO) <= REG_I3 ? IREGS	\ : (REGNO) >= REG_L0 && (REGNO) <= REG_L3 ? LREGS	\ : (REGNO) >= REG_B0 && (REGNO) <= REG_B3 ? BREGS	\ : (REGNO) >= REG_M0 && (REGNO) <= REG_M3 ? MREGS	\ : (REGNO) == REG_A0 || (REGNO) == REG_A1 ? AREGS	\ : (REGNO) == REG_CC ? CCREGS				\ : (REGNO) >= REG_RETS ? PROLOGUE_REGS			\ : NO_REGS)/* When defined, the compiler allows registers explicitly used in the   rtl to be used as spill registers but prevents the compiler from   extending the lifetime of these registers. */#define SMALL_REGISTER_CLASSES 1#define CLASS_LIKELY_SPILLED_P(CLASS) \    ((CLASS) == PREGS_CLOBBERED \     || (CLASS) == PROLOGUE_REGS \     || (CLASS) == CCREGS)/* Do not allow to store a value in REG_CC for any mode *//* Do not allow to store value in pregs if mode is not SI*/#define HARD_REGNO_MODE_OK(REGNO, MODE) hard_regno_mode_ok((REGNO), (MODE))/* 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)#define HARD_REGNO_NREGS(REGNO, MODE) \((MODE) == PDImode && ((REGNO) == REG_A0 || (REGNO) == REG_A1) \ ? 1 : CLASS_MAX_NREGS (GENERAL_REGS, MODE))/* A C expression that is nonzero if hard register TO can be   considered for use as a rename register for FROM register */#define HARD_REGNO_RENAME_OK(FROM, TO) bfin_hard_regno_rename_ok (FROM, TO)/* 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. */#define MODES_TIEABLE_P(MODE1, MODE2) ((MODE1) == (MODE2))/* `PREFERRED_RELOAD_CLASS (X, CLASS)'   A C expression that places additional restrictions on the register   class to use when it is necessary to copy value X into a register   in class CLASS.  The value is a register class; perhaps CLASS, or   perhaps another, smaller class.  */#define PREFERRED_RELOAD_CLASS(X, CLASS) (CLASS)#define  SECONDARY_OUTPUT_RELOAD_CLASS(class,mode,x) \    secondary_output_reload_class(class,mode,x)#define  SECONDARY_INPUT_RELOAD_CLASS(class,mode,x)  \    secondary_input_reload_class(class,mode,x)/* Function Calling Conventions. *//* The type of the current function; normal functions are of type   SUBROUTINE.  */typedef enum {  SUBROUTINE, INTERRUPT_HANDLER, EXCPT_HANDLER, NMI_HANDLER} e_funkind;#define FUNCTION_ARG_REGISTERS { REG_R0, REG_R1, REG_R2, -1 }typedef struct {  int words;			/* # words passed so far */  int nregs;			/* # registers available for passing */  int *arg_regs;		/* array of register -1 terminated */} CUMULATIVE_ARGS;/* Define where to put the arguments to a function.   Value is zero to push the argument on the stack,   or a hard register in which to store the argument.   MODE is the argument's machine mode.   TYPE is the data type of the argument (as a tree).    This is null for libcalls where that information may    not be available.   CUM is a variable of type CUMULATIVE_ARGS which gives info about    the preceding args and about the function being called.   NAMED is nonzero if this argument is a named parameter    (otherwise it is an extra parameter matching an ellipsis).  */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \  (function_arg (&CUM, MODE, TYPE, NAMED))#define FUNCTION_ARG_REGNO_P(REGNO) function_arg_regno_p (REGNO)/* 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)	\  (init_cumulative_args (&CUM, FNTYPE, LIBNAME))/* Update the data in CUM to advance over an argument   of mode MODE and data type TYPE.   (TYPE is null for libcalls where that information may not be available.)  */#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)	\  (function_arg_advance (&CUM, MODE, TYPE, NAMED))#define RETURN_POPS_ARGS(FDECL, FUNTYPE, STKSIZE) 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 VALUE_REGNO(MODE) (REG_R0)#define FUNCTION_VALUE(VALTYPE, FUNC)		\  gen_rtx_REG (TYPE_MODE (VALTYPE),		\	       VALUE_REGNO(TYPE_MODE(VALTYPE)))/* Define how to find the value returned by a library function   assuming the value has mode MODE.  */#define LIBCALL_VALUE(MODE)  gen_rtx_REG (MODE, VALUE_REGNO(MODE))#define FUNCTION_VALUE_REGNO_P(N) ((N) == REG_R0)#define DEFAULT_PCC_STRUCT_RETURN 0#define RETURN_IN_MEMORY(TYPE) bfin_return_in_memory(TYPE)/* Before the prologue, the return address is in the RETS register.  */#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, REG_RETS)#define RETURN_ADDR_RTX(COUNT, FRAME) bfin_return_addr_rtx (COUNT)#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (REG_RETS)/* Call instructions don't modify the stack pointer on the Blackfin.  */#define INCOMING_FRAME_SP_OFFSET 0/* Describe how we implement __builtin_eh_return.  */#define EH_RETURN_DATA_REGNO(N)	((N) < 2 ? (N) : INVALID_REGNUM)#define EH_RETURN_STACKADJ_RTX	gen_rtx_REG (Pmode, REG_P2)#define EH_RETURN_HANDLER_RTX \    gen_rtx_MEM (Pmode, plus_constant (frame_pointer_rtx, UNITS_PER_WORD))/* Addressing Modes *//* Recognize any constant value that is a valid address.  */#define CONSTANT_ADDRESS_P(X)	(CONSTANT_P (X))/* Nonzero if the constant value X is a legitimate general operand.   symbol_ref are not legitimate and will be put into constant pool.   See force_const_mem().   If -mno-pool, all constants are legitimate. */#define LEGITIMATE_CONSTANT_P(x) 1/*   A number, the maximum number of registers that can appear in a     valid memory address.  Note that it is up to you to specify a     value equal to the maximum number that `GO_IF_LEGITIMATE_ADDRESS'     would ever accept. */#define MAX_REGS_PER_ADDRESS 1/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression   that is a valid memory address for an instruction.   The MODE argument is the machine mode for the MEM expression   that wants to use this address.    Blackfin addressing modes are as follows:      [preg]      [preg + imm16]      B [ Preg + uimm15 ]      W [ Preg + uimm16m2 ]      [ Preg + uimm17m4 ]       [preg++]      [preg--]      [--sp]*/#define LEGITIMATE_MODE_FOR_AUTOINC_P(MODE) \      (GET_MODE_SIZE (MODE) <= 4 || (MODE) == PDImode)#ifdef REG_OK_STRICT#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, WIN)		\  do {							\    if (bfin_legitimate_address_p (MODE, X, 1))		\      goto WIN;						\  } while (0);#else#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, WIN)		\  do {							\    if (bfin_legitimate_address_p (MODE, X, 0))		\      goto WIN;						\  } while (0);#endif/* Try machine-dependent ways of modifying an illegitimate address   to be legitimate.  If we find one, return the new, valid address.   This macro is used in only one place: `memory_address' in explow.c.   OLDX is the address as it was before break_out_memory_refs was called.   In some cases it is useful to look at this to decide what needs to be done.   MODE and WIN are passed so that this macro can use   GO_IF_LEGITIMATE_ADDRESS.   It is always safe for this macro to do nothing.  It exists to recognize   opportunities to optimize the output. */#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)    \do {					       \   rtx _q = legitimize_address(X, OLDX, MODE); \   if (_q) { X = _q; goto WIN; }	       \} while (0)#define HAVE_POST_INCREMENT 1#define HAVE_POST_DECREMENT 1#define HAVE_PRE_DECREMENT  1/* `LEGITIMATE_PIC_OPERAND_P (X)'     A C expression that is nonzero if X is a legitimate immediate     operand on the target machine when generating position independent     code.  You can assume that X satisfies `CONSTANT_P', so you need     not check this.  You can also assume FLAG_PIC is true, so you need     not check it either.  You need not define this macro if all     constants (including `SYMBOL_REF') can be immediate operands when     generating position independent code. */#define LEGITIMATE_PIC_OPERAND_P(X) ! SYMBOLIC_CONST (X)#define SYMBOLIC_CONST(X)	\(GET_CODE (X) == SYMBOL_REF						\ || GET_CODE (X) == LABEL_REF						\ || (GET_CODE (X) == CONST && symbolic_reference_mentioned_p (X)))/*     A C statement or compound statement with a conditional `goto     LABEL;' executed if memory address X (an RTX) can have different     meanings depending on the machine mode of the memory reference it     is used for or if the address is valid for some modes but not     others.     Autoincrement and autodecrement addresses typically have     mode-dependent effects because the amount of the increment or     decrement is the size of the operand being addressed.  Some     machines have other mode-dependent addresses.  Many RISC machines     have no mode-dependent addresses.     You may assume that ADDR is a valid address for the machine.*/#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)  \do {                                              \ if (GET_CODE (ADDR) == POST_INC                  \     || GET_CODE (ADDR) == POST_DEC               \     || GET_CODE (ADDR) == PRE_DEC)               \   goto LABEL;					  \} while (0)#define NOTICE_UPDATE_CC(EXPR, INSN) 0/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits   is done just by pretending it is already truncated.  */#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1/* Max number of bytes we can move from memory to memory   in one reasonably fast instruction.  */#define MOVE_MAX UNITS_PER_WORD/* STORAGE LAYOUT: target machine storage layout   Define this macro as a C expression which is nonzero if accessing   less than a word of memory (i.e. a `char' or a `short') is no   faster than accessing a word of memory, i.e., if such access   require more than one instruction or if there is no difference in   cost between byte and (aligned) word loads.   When this macro is not defined, the compiler will access a field by   finding the smallest containing object; when it is defined, a   fullword load will be used if alignment permits.  Unless bytes   accesses are faster than word accesses, using word accesses is   preferable since it may eliminate subsequent memory access if   subsequent accesses occur to other fields in the same word of the   structure, but to different bytes.  */#define SLOW_BYTE_ACCESS  0#define SLOW_SHORT_ACCESS 0/* Define this if most significant bit is lowest numbered   in instructions that operate on numbered bit-fields. */

⌨️ 快捷键说明

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