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

📄 i370.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 4 页
字号:
/* 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) == FP_REGS ? 1 :						\   (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* 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  						\     (STACK_POINTER_OFFSET + current_function_outgoing_args_size)#define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = STARTING_FRAME_OFFSET/* If we generate an insn to push BYTES bytes, this says how many the stack   pointer really advances by.  On the 370, we have no push instruction.  *//* #define PUSH_ROUNDING(BYTES) *//* Accumulate the outgoing argument count so we can request the right   DSA size and determine stack offset.  */#define ACCUMULATE_OUTGOING_ARGS/* Define offset from stack pointer, to location where a parm can be   pushed.  */#define STACK_POINTER_OFFSET 148/* Offset of first parameter from the argument pointer register value.  */#define FIRST_PARM_OFFSET(FNDECL) 0/* 1 if N is a possible register number for function argument passing.   On the 370, no registers are used in this way.  */#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.  */#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT)  ((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) == DFmode || (MODE) == SFmode			\	    ? 256							\	    : (MODE) != BLKmode                 			\	    ? (GET_MODE_SIZE (MODE) + 3) / 4 				\	    : (int_size_in_bytes (TYPE) + 3) / 4))/* 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.  */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0/* For an arg passed partly in registers and partly in memory, this is the   number of registers used.  For args passed entirely in registers or   entirely in memory, zero.  */#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0/* Define if returning from a function call automatically pops the   arguments described by the number-of-args field in the call.  */#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 15.  */#define RET_REG(MODE)	((MODE) == DFmode || (MODE) == SFmode ? 16 : 15)/* On the 370 the return value is in R15 or R16.  */#define FUNCTION_VALUE(VALTYPE, FUNC)  					\  gen_rtx(REG, TYPE_MODE (VALTYPE), RET_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, RET_REG(MODE))/* 1 if N is a possible register number for a function value.   On the 370 under C/370, R15 and R16 are thus used.  */#define FUNCTION_VALUE_REGNO_P(N) ((N) == 15 || (N) == 16)/* This macro definition sets up a default value for `main' to return.  */#define DEFAULT_MAIN_RETURN  c_expand_return (integer_zero_node)/* This macro generates the assembly code for function entry.   All of the C/370 environment is preserved.  */#define FUNCTION_PROLOGUE(FILE, LSIZE) i370_function_prolog ((FILE), (LSIZE));#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)			\{									\  if (strlen (NAME) * 2 > mvs_function_name_length)			\    {									\      if (mvs_function_name)						\	free (mvs_function_name);					\      mvs_function_name = 0;						\    }									\  if (!mvs_function_name)						\    {									\      mvs_function_name_length = strlen (NAME) * 2;			\      mvs_function_name = (char *) malloc (mvs_function_name_length);	\      if (mvs_function_name == 0)					\	{								\	  fatal ("virtual memory exceeded");				\	  abort ();							\	}								\    }									\  if (!strcmp (NAME, "main"))						\    strcpy (mvs_function_name, "gccmain");				\  else									\    strcpy (mvs_function_name, NAME);					\}/* 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.  */#if MACROEPILOGUE == 1#define FUNCTION_EPILOGUE(FILE, LSIZE)					\{									\  int i;								\  check_label_emit();							\  mvs_check_page (FILE,14,0);						\  fprintf (FILE, "\tEDCEPIL\n");					\  mvs_page_num++;							\  fprintf (FILE, "\tDS\t0F\n" );					\  fprintf (FILE, "\tLTORG\n");						\  fprintf (FILE, "\tDS\t0F\n");						\  fprintf (FILE, "PGT%d\tEQU\t*\n", function_base_page);		\  mvs_free_label();							\  for ( i = function_base_page; i < mvs_page_num; i++ )			\    fprintf (FILE, "\tDC\tA(PG%d)\n", i);				\}#else /* MACROEPILOGUE != 1 */#define FUNCTION_EPILOGUE(FILE, LSIZE)					\{									\  int i;								\  check_label_emit();							\  mvs_check_page (FILE,14,0);						\  fprintf (FILE, "\tL\t13,4(,13)\n");					\  fprintf (FILE, "\tL\t14,12(,13)\n");					\  fprintf (FILE, "\tLM\t2,12,28(13)\n");				\  fprintf (FILE, "\tBALR\t1,14\n");					\  fprintf (FILE, "\tDC\tA(");						\  mvs_page_num++;							\  assemble_name (FILE, mvs_function_name);				\  fprintf (FILE, ")\n" );						\  fprintf (FILE, "\tDS\t0F\n" );					\  fprintf (FILE, "\tLTORG\n");						\  fprintf (FILE, "\tDS\t0F\n");						\  fprintf (FILE, "PGT%d\tEQU\t*\n", function_base_page);		\  mvs_free_label();							\  for ( i = function_base_page; i < mvs_page_num; i++ )			\    fprintf (FILE, "\tDC\tA(PG%d)\n", i);				\}#endif /* MACROEPILOGUE *//* Output assembler code for a block containing the constant parts of a   trampoline, leaving space for the variable parts.   On the 370, the trampoline contains these instructions:        BALR  14,0        USING *,14        L     STATIC_CHAIN_REGISTER,X        L     15,Y        BR    15   X    DS    0F   Y    DS    0F  */#define TRAMPOLINE_TEMPLATE(FILE)					\{									\  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x05E0));				\  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x5800 | STATIC_CHAIN_REGNUM << 4));	\  ASM_OUTPUT_SHORT (FILE, GEN_INT (0xE00A));				\  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x58F0)); 				\  ASM_OUTPUT_SHORT (FILE, GEN_INT (0xE00E));				\  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x07FF));				\  ASM_OUTPUT_SHORT (FILE, const0_rtx);					\  ASM_OUTPUT_SHORT (FILE, const0_rtx);					\  ASM_OUTPUT_SHORT (FILE, const0_rtx);					\  ASM_OUTPUT_SHORT (FILE, const0_rtx);					\}/* Length in units of the trampoline for entering a nested function.  */#define TRAMPOLINE_SIZE 20/* Emit RTL insns to initialize the variable parts of a trampoline.  */#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)			\{									\  emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 12)), CXT); \  emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 16)), FNADDR); \}/* Output assembler code to FILE to increment profiler label # LABELNO   for profiling a function entry.  */#define FUNCTION_PROFILER(FILE, LABELNO) 				\  fprintf (FILE, "Error: No profiling available.\n")/* Define EXIT_IGNORE_STACK if, when returning from a function, the stack   pointer does not matter (provided there is a frame pointer).  */#define EXIT_IGNORE_STACK	1/* Addressing modes, and classification of registers for them.  *//* #define HAVE_POST_INCREMENT 0 *//* #define HAVE_POST_DECREMENT 0 *//* #define HAVE_PRE_DECREMENT 0 *//* #define HAVE_PRE_INCREMENT 0 *//* 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.   These definitions are NOT overridden anywhere.  */#define REGNO_OK_FOR_INDEX_P(REGNO) 					\  (((REGNO) > 0 && (REGNO) < 16)					\    || (reg_renumber[REGNO] > 0 && reg_renumber[REGNO] < 16))#define REGNO_OK_FOR_BASE_P(REGNO) REGNO_OK_FOR_INDEX_P(REGNO)#define REGNO_OK_FOR_DATA_P(REGNO) 					\  ((REGNO) < 16 || (unsigned) reg_renumber[REGNO] < 16)#define REGNO_OK_FOR_FP_P(REGNO) 					\  ((unsigned) ((REGNO) - 16) < 4 || (unsigned) (reg_renumber[REGNO] - 16) < 4)/* Now macros that check whether X is a register and also,   strictly, whether it is in a specified class.  *//* 1 if X is a data register.  */#define DATA_REG_P(X) (REG_P (X) && REGNO_OK_FOR_DATA_P (REGNO (X)))/* 1 if X is an fp register.  */#define FP_REG_P(X) (REG_P (X) && REGNO_OK_FOR_FP_P (REGNO (X)))/* 1 if X is an address register.  */#define ADDRESS_REG_P(X) (REG_P (X) && REGNO_OK_FOR_BASE_P (REGNO (X)))/* Maximum number of registers that can appear in a valid memory address.  */#define MAX_REGS_PER_ADDRESS 2/* 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_DOUBLE		\  || (GET_CODE (X) == CONST						\	  && GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF)		\  || (GET_CODE (X) == CONST						\	  && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF		\	  && !SYMBOL_REF_FLAG (XEXP (XEXP (X, 0), 0))))/* 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) 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 all.  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.   Some source files that are used after register allocation   need to be strict.  */#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)						\  ((REGNO(X) > 0 && REGNO(X) < 16) || REGNO(X) >= 20)/* 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)	REG_OK_FOR_INDEX_P(X)#else /* REG_OK_STRICT *//* 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 /* REG_OK_STRICT *//* 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.  */#define COUNT_REGS(X, REGS, FAIL)					\ if (REG_P (X) && REG_OK_FOR_BASE_P (X))				\   REGS += 1;								\ else if (GET_CODE (X) != CONST_INT || (unsigned) INTVAL (X) >= 4096)	\   goto FAIL;

⌨️ 快捷键说明

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