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

📄 pdp11.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
#define SMALL_REGISTER_CLASSES 1/* Since GENERAL_REGS is the same class as ALL_REGS,   don't give it a different class number; just make it an alias.  *//* #define GENERAL_REGS ALL_REGS *//* Give names of register classes as strings for dump file.  */#define REG_CLASS_NAMES {"NO_REGS", "MUL_REGS", "GENERAL_REGS", "LOAD_FPU_REGS", "NO_LOAD_FPU_REGS", "FPU_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}, {0x00aa}, {0x00ff}, {0x0f00}, {0x3000}, {0x3f00}, {0x3fff}}/* 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)>=8?((REGNO)<=11?LOAD_FPU_REGS:NO_LOAD_FPU_REGS):(((REGNO)&1)?MUL_REGS:GENERAL_REGS))/* 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) == 'f' ? FPU_REGS :			\  ((C) == 'd' ? MUL_REGS : 			\   ((C) == 'a' ? LOAD_FPU_REGS : NO_REGS)))    /* The letters I, J, K, L and M 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		bits 31-16 0000   J		bits 15-00 0000   K		completely random 32 bit   L,M,N	-1,1,0 respectively   O 		where doing shifts in sequence is faster than                 one big shift */#define CONST_OK_FOR_LETTER_P(VALUE, C)  \  ((C) == 'I' ? ((VALUE) & 0xffff0000) == 0		\   : (C) == 'J' ? ((VALUE) & 0x0000ffff) == 0  	       	\   : (C) == 'K' ? (((VALUE) & 0xffff0000) != 0		\		   && ((VALUE) & 0x0000ffff) != 0)	\   : (C) == 'L' ? ((VALUE) == 1)			\   : (C) == 'M' ? ((VALUE) == -1)			\   : (C) == 'N' ? ((VALUE) == 0)			\   : (C) == 'O' ? (abs(VALUE) >1 && abs(VALUE) <= 4)		\   : 0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)  \  ((C) == 'G' && XINT (VALUE, 0) == 0 && XINT (VALUE, 1) == 0)/* Letters in the range `Q' through `U' may be defined in a   machine-dependent fashion to stand for arbitrary operand types.    The machine description macro `EXTRA_CONSTRAINT' is passed the   operand as its first argument and the constraint letter as its   second operand.   `Q'	is for memory references that require an extra word after the opcode.   `R'	is for memory references which are encoded within the opcode.  */#define EXTRA_CONSTRAINT(OP,CODE)					\  ((GET_CODE (OP) != MEM) ? 0						\   : !legitimate_address_p (GET_MODE (OP), XEXP (OP, 0)) ? 0		\   : ((CODE) == 'Q')	  ? !simple_memory_operand (OP, GET_MODE (OP))	\   : ((CODE) == 'R')	  ? simple_memory_operand (OP, GET_MODE (OP))	\   : 0)/* 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.  loading is easier into LOAD_FPU_REGS than FPU_REGS! */#define PREFERRED_RELOAD_CLASS(X,CLASS) 	\(((CLASS) != FPU_REGS)?(CLASS):LOAD_FPU_REGS)#define SECONDARY_RELOAD_CLASS(CLASS,MODE,x)	\(((CLASS) == NO_LOAD_FPU_REGS && !(REG_P(x) && LOAD_FPU_REG_P(REGNO(x))))?LOAD_FPU_REGS:NO_REGS)/* Return the maximum number of consecutive registers   needed to represent mode MODE in a register of class CLASS.  */#define CLASS_MAX_NREGS(CLASS, MODE)	\((CLASS == GENERAL_REGS || CLASS == MUL_REGS)?				\  ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD):	\  1									\)/* Stack layout; function entry, exit and calling.  *//* Define this if pushing a word on the stack   makes the stack pointer 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/* If we generate an insn to push BYTES bytes,   this says how many the stack pointer really advances by.   On the pdp11, the stack is on an even boundary */#define PUSH_ROUNDING(BYTES) ((BYTES + 1) & ~1)/* current_first_parm_offset stores the # of registers pushed on the    stack */extern int current_first_parm_offset;/* Offset of first parameter from the argument pointer register value.     For the pdp11, this is nonzero to account for the return address.	1 - return address	2 - frame pointer (always saved, even when not used!!!!)		-- chnage some day !!!:q!*/#define FIRST_PARM_OFFSET(FNDECL) 4/* Value is 1 if returning from a function call automatically   pops the arguments described by the number-of-args field in the 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.  */#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 BASE_RETURN_VALUE_REG(MODE) \ ((MODE) == DFmode ? 8 : 0) /* On the pdp11 the value is found in R0 (or ac0??? not without FPU!!!! ) */#define FUNCTION_VALUE(VALTYPE, FUNC)  \  gen_rtx_REG (TYPE_MODE (VALTYPE), BASE_RETURN_VALUE_REG(TYPE_MODE(VALTYPE)))/* and the called function leaves it in the first register.   Difference only on machines with register windows.  */#define FUNCTION_OUTGOING_VALUE(VALTYPE, FUNC)  \  gen_rtx_REG (TYPE_MODE (VALTYPE), BASE_RETURN_VALUE_REG(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, BASE_RETURN_VALUE_REG(MODE))/* 1 if N is a possible register number for a function value   as seen by the caller.   On the pdp, the first "output" reg is the only register thus used. maybe ac0 ? - as option someday! */#define FUNCTION_VALUE_REGNO_P(N) (((N) == 0) || (TARGET_AC0 && (N) == 8))/* 1 if N is a possible register number for function argument passing.   - not used on pdp */#define FUNCTION_ARG_REGNO_P(N) 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.   ...., the offset normally starts at 0, but starts at 1 word   when the function gets a structure-value-address as an   invisible first argument.  */#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ ((CUM) = 0)/* 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)	\ ((CUM) += ((MODE) != BLKmode			\	    ? (GET_MODE_SIZE (MODE))		\	    : (int_size_in_bytes (TYPE))))	/* Determine where to put an argument 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)  0/* Define where a function finds its arguments.   This would be different from FUNCTION_ARG if we had register windows.  *//*#define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED)	\  FUNCTION_ARG (CUM, MODE, TYPE, NAMED)*//* Output assembler code to FILE to increment profiler label # LABELNO   for profiling a function entry.  */#define FUNCTION_PROFILER(FILE, LABELNO)  \   abort ();/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,   the stack pointer does not matter.  The value is tested only in   functions that have frame pointers.   No definition is equivalent to always zero.  */extern int may_call_alloca;#define EXIT_IGNORE_STACK	1#define INITIAL_FRAME_POINTER_OFFSET(DEPTH_VAR)	\{								\  int offset, regno;		      				\  offset = get_frame_size();					\  for (regno = 0; regno < 8; regno++)				\    if (regs_ever_live[regno] && ! call_used_regs[regno])	\      offset += 2;						\  for (regno = 8; regno < 14; regno++)				\    if (regs_ever_live[regno] && ! call_used_regs[regno])	\      offset += 8;						\  /* offset -= 2;   no fp on stack frame */			\  (DEPTH_VAR) = offset;						\}       /* Addressing modes, and classification of registers for them.  */#define HAVE_POST_INCREMENT 1#define HAVE_PRE_DECREMENT 1/* Macros to check register numbers against specific register classes.  *//* 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_INDEX_P(REGNO) \  ((REGNO) < 8 || (unsigned) reg_renumber[REGNO] < 8)#define REGNO_OK_FOR_BASE_P(REGNO)  \  ((REGNO) < 8 || (unsigned) reg_renumber[REGNO] < 8)/* Now macros that check whether X is a register and also,   strictly, whether it is in a specified class.*//* Maximum number of registers that can appear in a valid memory address.  */#define MAX_REGS_PER_ADDRESS 1/* 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.   It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */#define LEGITIMATE_CONSTANT_P(X)                                        \  (GET_CODE (X) != CONST_DOUBLE || legitimate_const_double_p (X))/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx   and check its validity for a certain class.   We have two alternate definitions for each of them.   The usual definition accepts all pseudo regs; the other rejects   them unless they have been allocated suitable hard regs.   The symbol REG_OK_STRICT causes the latter definition to be used.   Most source files want to accept pseudo regs in the hope that   they will get allocated to the class that the insn wants them to be in.   Source files for reload pass need to be strict.   After reload, it makes no difference, since pseudo regs have   been eliminated by then.  */#ifndef REG_OK_STRICT/* Nonzero if X is a hard reg that can be used as an index   or if it is a pseudo reg.  */#define REG_OK_FOR_INDEX_P(X) (1)/* Nonzero if X is a hard reg that can be used as a base reg   or if it is a pseudo reg.  */#define REG_OK_FOR_BASE_P(X) (1)#else/* Nonzero if X is a hard reg that can be used as an index.  */#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))/* Nonzero if X is a hard reg that can be used as a base reg.  */#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))#endif/* 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.*/#define GO_IF_LEGITIMATE_ADDRESS(mode, operand, ADDR) \{						      \    rtx xfoob;								\									\    /* accept (R0) */							\    if (GET_CODE (operand) == REG					\	&& REG_OK_FOR_BASE_P(operand))					\      goto ADDR;							\									\    /* accept @#address */						\    if (CONSTANT_ADDRESS_P (operand))					\      goto ADDR;							\    									\    /* accept X(R0) */							\    if (GET_CODE (operand) == PLUS       				\	&& GET_CODE (XEXP (operand, 0)) == REG				\	&& REG_OK_FOR_BASE_P (XEXP (operand, 0))			\	&& CONSTANT_ADDRESS_P (XEXP (operand, 1)))			\      goto ADDR;							\    									\    /* accept -(R0) */							\    if (GET_CODE (operand) == PRE_DEC					\	&& GET_CODE (XEXP (operand, 0)) == REG				\	&& REG_OK_FOR_BASE_P (XEXP (operand, 0)))			\      goto ADDR;							\									\    /* accept (R0)+ */							\    if (GET_CODE (operand) == POST_INC					\	&& GET_CODE (XEXP (operand, 0)) == REG				\	&& REG_OK_FOR_BASE_P (XEXP (operand, 0)))			\      goto ADDR;							\									\    /* accept -(SP) -- which uses PRE_MODIFY for byte mode */		\

⌨️ 快捷键说明

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