?? tm-vax.h
字號:
of arguments scanned so far. */#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. On the vax, the offset starts at 0. */#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE) \ ((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) + 3) & ~3 \ : (int_size_in_bytes (TYPE) + 3) & ~3))/* 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). *//* On the vax all args are pushed. */ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0/* This macro generates the assembly code for function entry. FILE is a stdio stream to output the code to. SIZE is an int: how many units of temporary storage to allocate, adjusted by STARTING_FRAME_OFFSET to accomodate tm-vms.h. Refer to the array `regs_ever_live' to determine which registers to save; `regs_ever_live[I]' is nonzero if register number I is ever used in the function. This macro is responsible for knowing which registers should not be saved even if used. */#define FUNCTION_PROLOGUE(FILE, SIZE) \{ register int regno; \ register int mask = 0; \ register int size = SIZE - STARTING_FRAME_OFFSET; \ extern char call_used_regs[]; \ for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) \ if (regs_ever_live[regno] && !call_used_regs[regno]) \ mask |= 1 << regno; \ fprintf (FILE, "\t.word 0x%x\n", mask); \ MAYBE_VMS_FUNCTION_PROLOGUE(FILE) \ if (size >= 64) fprintf (FILE, "\tmovab %d(sp),sp\n", -size); \ else if (size) fprintf (FILE, "\tsubl2 $%d,sp\n", size); }/* tm-vms.h redefines this. */#define MAYBE_VMS_FUNCTION_PROLOGUE(FILE)/* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */#define FUNCTION_PROFILER(FILE, LABELNO) \ fprintf (FILE, "\tmovab LP%d,r0\n\tjsb mcount\n", (LABELNO));/* Output assembler code to FILE to initialize this source file's basic block profiling info, if that has not already been done. */#define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \ fprintf (FILE, "\ttstl LPBX0\n\tjneq LPI%d\n\tpushal LPBX0\n\tcalls $1,__bb_init_func\nLPI%d:\n", \ LABELNO, LABELNO);/* Output assembler code to FILE to increment the entry-count for the BLOCKNO'th basic block in this source file. This is a real pain in the sphincter on a VAX, since we do not want to change any of the bits in the processor status word. The way it is done here, it is pushed onto the stack before any flags have changed, and then the stack is fixed up to account for the fact that the instruction to restore the flags only reads a word. It may seem a bit clumsy, but at least it works.*/#define BLOCK_PROFILER(FILE, BLOCKNO) \ fprintf (FILE, "\tmovpsl -(sp)\n\tmovw (sp),2(sp)\n\taddl2 $2,sp\n\taddl2 $1,LPBX2+%d\n\tbicpsw $255\n\tbispsw (sp)+\n", \ 4 * BLOCKNO)/* 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. */#define EXIT_IGNORE_STACK 1/* This macro generates the assembly code for function exit, on machines that need it. If FUNCTION_EPILOGUE is not defined then individual return instructions are generated for each return statement. Args are same as for FUNCTION_PROLOGUE. *//* #define FUNCTION_EPILOGUE(FILE, SIZE) *//* If the memory address ADDR is relative to the frame pointer, correct it to be relative to the stack pointer instead. This is for when we don't use a frame pointer. ADDR should be a variable name. */#define FIX_FRAME_POINTER_ADDRESS(ADDR,DEPTH) abort ();/* Addressing modes, and classification of registers for them. */#define HAVE_POST_INCREMENT/* #define HAVE_POST_DECREMENT */#define HAVE_PRE_DECREMENT/* #define HAVE_PRE_INCREMENT *//* 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) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] >= 0)#define REGNO_OK_FOR_BASE_P(regno) \((regno) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] >= 0)/* Maximum number of registers that can appear in a valid memory address. */#define MAX_REGS_PER_ADDRESS 2/* 1 if X is an rtx for a constant that is a valid address. */#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X) && LEGITIMATE_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. */#ifdef NO_EXTERNAL_INDIRECT_ADDRESS#define LEGITIMATE_CONSTANT_P(X) \ (! (GET_CODE ((X)) == CONST \ && GET_CODE (XEXP ((X), 0)) == PLUS \ && GET_CODE (XEXP (XEXP ((X), 0), 0)) == SYMBOL_REF \ && EXTERNAL_SYMBOL_P (XEXP (XEXP ((X), 0), 0))))#else#define LEGITIMATE_CONSTANT_P(X) 1#endif/* 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. The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS, except for CONSTANT_ADDRESS_P which is actually machine-independent. *//* 1 if X is an address that we could indirect through. */#ifdef NO_EXTERNAL_INDIRECT_ADDRESS#define INDIRECTABLE_CONSTANT_ADDRESS_P(X) \ (GET_CODE (X) == LABEL_REF \ || (GET_CODE (X) == SYMBOL_REF && !EXTERNAL_SYMBOL_P (X)) \ || (GET_CODE (X) == CONST && LEGITIMATE_CONSTANT_P(X)) \ || GET_CODE (X) == CONST_INT)#define INDIRECTABLE_ADDRESS_P(X) \ (INDIRECTABLE_CONSTANT_ADDRESS_P (X) \ || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ || (GET_CODE (X) == PLUS \ && GET_CODE (XEXP (X, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 1))))#else#define INDIRECTABLE_CONSTANT_ADDRESS_P(X) CONSTANT_ADDRESS_P(X)#define INDIRECTABLE_ADDRESS_P(X) \ (CONSTANT_ADDRESS_P (X) \ || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ || (GET_CODE (X) == PLUS \ && GET_CODE (XEXP (X, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && CONSTANT_ADDRESS_P (XEXP (X, 1))))#endif/* Non-zero if this is a valid address without indexing or indirection. */#define NONINDIRECT_ADDRESS_P(X) \ (CONSTANT_ADDRESS_P (X) \ || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ || (GET_CODE (X) == PLUS \ && GET_CODE (XEXP (X, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && CONSTANT_ADDRESS_P (XEXP (X, 1))))/* Go to ADDR if X is a valid address not using indexing. (This much is the easy part.) */#define GO_IF_NONINDEXED_ADDRESS(X, ADDR) \{ register rtx xfoob = (X); \ if (GET_CODE (xfoob) == REG) goto ADDR; \ if (NONINDIRECT_ADDRESS_P (xfoob)) goto ADDR; \ xfoob = XEXP (X, 0); \ if (GET_CODE (X) == MEM && INDIRECTABLE_ADDRESS_P (xfoob)) \ goto ADDR; \ if ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_INC) \ && GET_CODE (xfoob) == REG && REG_OK_FOR_BASE_P (xfoob)) \ goto ADDR; }/* 1 if PROD is either a reg times size of mode MODE or just a reg, if MODE is just one byte. This macro's expansion uses the temporary variables xfoo0 and xfoo1 that must be declared in the surrounding context. */#define INDEX_TERM_P(PROD, MODE) \(GET_MODE_SIZE (MODE) == 1 \ ? (GET_CODE (PROD) == REG && REG_OK_FOR_BASE_P (PROD)) \ : (GET_CODE (PROD) == MULT \ && \ (xfoo0 = XEXP (PROD, 0), xfoo1 = XEXP (PROD, 1), \ ((GET_CODE (xfoo0) == CONST_INT \ && INTVAL (xfoo0) == GET_MODE_SIZE (MODE) \ && GET_CODE (xfoo1) == REG \ && REG_OK_FOR_INDEX_P (xfoo1)) \ || \ (GET_CODE (xfoo1) == CONST_INT \ && INTVAL (xfoo1) == GET_MODE_SIZE (MODE) \ && GET_CODE (xfoo0) == REG \ && REG_OK_FOR_INDEX_P (xfoo0))))))/* Go to ADDR if X is the sum of a register and a valid index term for mode MODE. */#define GO_IF_REG_PLUS_INDEX(X, MODE, ADDR) \{ register rtx xfooa; \ if (GET_CODE (X) == PLUS) \ { if (GET_CODE (XEXP (X, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && (xfooa = XEXP (X, 1), \ INDEX_TERM_P (xfooa, MODE))) \ goto ADDR; \ if (GET_CODE (XEXP (X, 1)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 1)) \ && (xfooa = XEXP (X, 0), \ INDEX_TERM_P (xfooa, MODE))) \ goto ADDR; } }#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \{ register rtx xfoo, xfoo0, xfoo1; \ GO_IF_NONINDEXED_ADDRESS (X, ADDR); \ if (GET_CODE (X) == PLUS) \ { /* Handle <address>[index] represented with index-sum outermost */\ xfoo = XEXP (X, 0); \ if (INDEX_TERM_P (xfoo, MODE)) \ { GO_IF_NONINDEXED_ADDRESS (XEXP (X, 1), ADDR); } \ xfoo = XEXP (X, 1); \ if (INDEX_TERM_P (xfoo, MODE)) \ { GO_IF_NONINDEXED_ADDRESS (XEXP (X, 0), ADDR); } \ /* Handle offset(reg)[index] with offset added outermost */ \ if (INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 0))) \ { if (GET_CODE (XEXP (X, 1)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 1))) \ goto ADDR; \ GO_IF_REG_PLUS_INDEX (XEXP (X, 1), MODE, ADDR); } \ if (INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 1))) \ { if (GET_CODE (XEXP (X, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 0))) \ goto ADDR; \ GO_IF_REG_PLUS_INDEX (XEXP (X, 0), MODE, ADDR); } } }/* 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. For the vax, nothing needs to be done. */#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {}/* Go to LABEL if ADDR (a legitimate address expression) has an effect that depends on the machine mode it is used for. On the VAX, the predecrement and postincrement address depend thus (the amount of decrement or increment being the length of the operand) and all indexed address depend thus (because the index scale factor is the length of the operand). */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ { if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) \ goto LABEL; \ if (GET_CODE (ADDR) == PLUS) \ { if (CONSTANT_ADDRESS_P (XEXP (ADDR, 0)) \ && GET_CODE (XEXP (ADDR, 1)) == REG); \ else if (CONSTANT_ADDRESS_P (XEXP (ADDR, 1)) \ && GET_CODE (XEXP (ADDR, 0)) == REG); \ else goto LABEL; }}/* Specify the machine mode that this machine uses for the index in the tablejump instruction. */#define CASE_VECTOR_MODE HImode/* Define this if the case instruction expects the table to contain offsets from the address of the table. Do not define this if the table should contain absolute addresses. */#define CASE_VECTOR_PC_RELATIVE/* Define this if the case instruction drops through after the table when the index is out of range. Don't define it if the case insn jumps to the default label instead. */#define CASE_DROPS_THROUGH/* Specify the tree operation to be used to convert reals to integers. */#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR/* This is the kind of divide that is easiest to do in the general case. */#define EASY_DIV_EXPR TRUNC_DIV_EXPR/* Define this as 1 if `char' should by default be signed; else as 0. */#define DEFAULT_SIGNED_CHAR 1/* This flag, if defined, says the same insns that convert to a signed fixnum also convert validly to an unsigned one. */#define FIXUNS_TRUNC_LIKE_FIX_TRUNC/* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */#define MOVE_MAX 8/* Define this if zero-extension is slow (more than one real instruction). *//* #define SLOW_ZERO_EXTEND */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -