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

📄 arc.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
#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) \((CUM) = 0)/* The number of registers used for parameter passing.  Local to this file.  */#define MAX_ARC_PARM_REGS 8/* 1 if N is a possible register number for function argument passing.  */#define FUNCTION_ARG_REGNO_P(N) \((unsigned) (N) < MAX_ARC_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				\ ? ROUND_ADVANCE (int_size_in_bytes (TYPE))	\ : ROUND_ADVANCE (GET_MODE_SIZE (MODE)))/* Round CUM up to the necessary point for argument MODE/TYPE.  */#define ROUND_ADVANCE_CUM(CUM, MODE, TYPE) \((((MODE) == BLKmode ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) \  > BITS_PER_WORD)	\ ? ((CUM) + 1 & ~1)	\ : (CUM))/* Return boolean indicating arg of type TYPE and mode MODE will be passed in   a reg.  This includes arguments that have to be passed by reference as the   pointer to them is passed in a reg if one is available (and that is what   we're given).   When passing arguments NAMED is always 1.  When receiving arguments NAMED   is 1 for each argument except the last in a stdarg/varargs function.  In   a stdarg function we want to treat the last named arg as named.  In a   varargs function we want to treat the last named arg (which is   `__builtin_va_alist') as unnamed.   This macro is only used in this file.  */extern int current_function_varargs;#define PASS_IN_REG_P(CUM, MODE, TYPE, NAMED) \((!current_function_varargs || (NAMED))					\ && (CUM) < MAX_ARC_PARM_REGS						\ && ((ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))				\      + ROUND_ADVANCE_ARG ((MODE), (TYPE))				\      <= MAX_ARC_PARM_REGS)))/* 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).  *//* On the ARC the first MAX_ARC_PARM_REGS args are normally in registers   and the rest are pushed.  */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \(PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED))				\ ? gen_rtx (REG, (MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)))	\ : 0)/* A C expression for the number of words, at the beginning of an   argument, must be put in registers.  The value must be zero for   arguments that are passed entirely in registers or that are entirely   pushed on the stack.   On some machines, certain arguments must be passed partially in   registers and partially in memory.  On these machines, typically the   first @var{n} words of arguments are passed in registers, and the rest   on the stack.  If a multi-word argument (a @code{double} or a   structure) crosses that boundary, its first few words must be passed   in registers and the rest must be pushed.  This macro tells the   compiler when this occurs, and how many of the words should go in   registers.  */#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0/* A C expression that indicates when an argument must be passed by   reference.  If nonzero for an argument, a copy of that argument is   made in memory and a pointer to the argument is passed instead of   the argument itself.  The pointer is passed in whatever way is   appropriate for passing a pointer to that type.  *//* All aggregates and arguments greater than 8 bytes are passed this way.  */#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \(TYPE					\ && (AGGREGATE_TYPE_P (TYPE)		\     || int_size_in_bytes (TYPE) > 8))/* A C expression that indicates when it is the called function's   responsibility to make copies of arguments passed by reference.   If the callee can determine that the argument won't be modified, it can   avoid the copy.  *//* ??? We'd love to be able to use NAMED here.  Unfortunately, it doesn't   include the last named argument so we keep track of the args ourselves.  */#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \FUNCTION_ARG_PASS_BY_REFERENCE ((CUM), (MODE), (TYPE), (NAMED))/* 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) = (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) \	  + ROUND_ADVANCE_ARG ((MODE), (TYPE))))/* If defined, a C expression that gives the alignment boundary, in bits,   of an argument with the specified mode and type.  If it is not defined,    PARM_BOUNDARY is used for all arguments.  */#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \(((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) <= PARM_BOUNDARY \ ? PARM_BOUNDARY \ : 2 * PARM_BOUNDARY)/* This macro offers an alternative   to using `__builtin_saveregs' and defining the macro   `EXPAND_BUILTIN_SAVEREGS'.  Use it to store the anonymous register   arguments into the stack so that all the arguments appear to have   been passed consecutively on the stack.  Once this is done, you   can use the standard implementation of varargs that works for   machines that pass all their arguments on the stack.   The argument ARGS_SO_FAR is the `CUMULATIVE_ARGS' data structure,   containing the values that obtain after processing of the named   arguments.  The arguments MODE and TYPE describe the last named   argument--its machine mode and its data type as a tree node.   The macro implementation should do two things: first, push onto the   stack all the argument registers *not* used for the named   arguments, and second, store the size of the data thus pushed into   the `int'-valued variable whose name is supplied as the argument   PRETEND_SIZE.  The value that you store here will serve as   additional offset for setting up the stack frame.   If the argument NO_RTL is nonzero, it means that the   arguments of the function are being analyzed for the second time.   This happens for an inline function, which is not actually   compiled until the end of the source file.  The macro   `SETUP_INCOMING_VARARGS' should not generate any instructions in   this case.  */#define SETUP_INCOMING_VARARGS(ARGS_SO_FAR, MODE, TYPE, PRETEND_SIZE, NO_RTL) \arc_setup_incoming_varargs(&ARGS_SO_FAR, MODE, TYPE, &PRETEND_SIZE, NO_RTL)/* Function results.  *//* 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 FUNCTION_VALUE(VALTYPE, FUNC) gen_rtx (REG, TYPE_MODE (VALTYPE), 0)/* 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, 0)/* 1 if N is a possible register number for a function value   as seen by the caller.  *//* ??? What about r1 in DI/DF values.  */#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)/* A C expression which can inhibit the returning of certain function   values in registers, based on the type of value.  A nonzero value says   to return the function value in memory, just as large structures are   always returned.  Here TYPE will be a C expression of type `tree',   representing the data type of the value.  */#define RETURN_IN_MEMORY(TYPE) \(AGGREGATE_TYPE_P (TYPE) \ || int_size_in_bytes (TYPE) > 8 \ || TREE_ADDRESSABLE (TYPE))/* Tell GCC to use RETURN_IN_MEMORY.  */#define DEFAULT_PCC_STRUCT_RETURN 0/* Register in which address to store a structure value   is passed to a function, or 0 to use `invisible' first argument.  */#define STRUCT_VALUE 0/* Function entry and exit.  *//* 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.   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) \arc_output_function_prologue (FILE, SIZE)/* 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 0/* 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.   The function epilogue should not depend on the current stack pointer!   It should use the frame pointer only.  This is mandatory because   of alloca; we also take advantage of it to omit stack adjustments   before returning.  */#define FUNCTION_EPILOGUE(FILE, SIZE) \arc_output_function_epilogue (FILE, SIZE)/* Epilogue delay slots.  */#define DELAY_SLOTS_FOR_EPILOGUE arc_delay_slots_for_epilogue ()#define ELIGIBLE_FOR_EPILOGUE_DELAY(TRIAL, SLOTS_FILLED) \arc_eligible_for_epilogue_delay (TRIAL, SLOTS_FILLED)/* Output assembler code to FILE to increment profiler label # LABELNO   for profiling a function entry.  */#define FUNCTION_PROFILER(FILE, LABELNO)/* Trampolines.  *//* ??? This doesn't work yet because GCC will use as the address of a nested   function the address of the trampoline.  We need to use that address   right shifted by 2.  It looks like we'll need PSImode after all. :-(  *//* Output assembler code for a block containing the constant parts   of a trampoline, leaving space for the variable parts.  *//* On the ARC, the trampoline is quite simple as we have 32 bit immediate   constants.	mov r24,STATIC	j.nd FUNCTION*/#define TRAMPOLINE_TEMPLATE(FILE) \do { \  ASM_OUTPUT_INT (FILE, GEN_INT (0x631f7c00)); \  ASM_OUTPUT_INT (FILE, const0_rtx); \  ASM_OUTPUT_INT (FILE, GEN_INT (0x381f0000)); \  ASM_OUTPUT_INT (FILE, const0_rtx); \} while (0)/* Length in units of the trampoline for entering a nested function.  */#define TRAMPOLINE_SIZE 16/* Emit RTL insns to initialize the variable parts of a trampoline.   FNADDR is an RTX for the address of the function's pure code.   CXT is an RTX for the static chain value for the function.  */#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \do { \  emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 4)), CXT); \  emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 12)), FNADDR); \  emit_insn (gen_flush_icache (validize_mem (gen_rtx (MEM, SImode, TRAMP)))); \} while (0)/* Library calls.  *//* Generate calls to memcpy, memcmp and memset.  */#define TARGET_MEM_FUNCTIONS/* Addressing modes, and classification of registers for them.  *//* Maximum number of registers that can appear in a valid memory address.  *//* The `ld' insn allows 2, but the `st' insn only allows 1.  */#define MAX_REGS_PER_ADDRESS 1/* We have pre inc/dec (load/store with update).  */#define HAVE_PRE_INCREMENT 1#define HAVE_PRE_DECREMENT 1/* Recognize any constant value that is a valid address.  */#define CONSTANT_ADDRESS_P(X) \(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF	\ || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST)/* Nonzero if the constant value X is a legitimate general operand.   We can handle any 32 or 64 bit constant.  *//* "1" should work since the largest constant should be a 64 bit critter.  *//* ??? Not sure what to do for 64x32 compiler.  */#define LEGITIMATE_CONSTANT_P(X) 1/* 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) \((unsigned) REGNO (X) - 29 >= FIRST_PSEUDO_REGISTER - 29)/* 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) \((unsigned) REGNO (X) - 29 >= FIRST_PSEUDO_REGISTER - 29)#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 `ld' insn allows [reg],[reg+shimm],[reg+limm],[reg+reg],[limm]   but the `st' insn only allows [reg],[reg+shimm],[limm].   The only thing we can do is only allow the most strict case `st' and hope   other parts optimize out the restrictions for `ld'.  *//* local to this file */#define RTX_OK_FOR_BASE_P(X) \

⌨️ 快捷键说明

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