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

📄 ns32k.h

📁 gcc编译工具没有什么特别
💻 H
📖 第 1 页 / 共 5 页
字号:
   be OK for SI but not for DI. However other ports (mips, i860, mvs   and tahoe) don't meet the above criterion. Evidently the real   requirement is somewhat laxer. Documentation was changed for gcc   2.8 but was not picked up by egcs (at least egcs 1.0). Having all   integer modes tieable definitely generates faster code. */#define MODES_TIEABLE_P(MODE1, MODE2)					\  ((FLOAT_MODE_P(MODE1) && FLOAT_MODE_P(MODE2)				\    && (GET_MODE_UNIT_SIZE(MODE1) == GET_MODE_UNIT_SIZE(MODE2)))	\   || (!FLOAT_MODE_P(MODE1) && !FLOAT_MODE_P(MODE2)))/* Value should be nonzero if functions must have frame pointers.   Zero means the frame pointer need not be set up (and parms   may be accessed via the stack pointer) in functions that seem suitable.   This is computed in `reload', in reload1.c.  */#define FRAME_POINTER_REQUIRED 0/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM 24/* Register in which static-chain is passed to a function.  */#define STATIC_CHAIN_REGNUM 1/* Register in which address to store a structure value   is passed to a function.  */#define STRUCT_VALUE_REGNUM 2/* Define the classes of registers for register constraints in the   machine description.  Also define ranges of constants.   One of the classes must always be named ALL_REGS and include all hard regs.   If there is more than one class, another class must be named NO_REGS   and contain no registers.   The name GENERAL_REGS must be the name of a class (or an alias for   another name such as ALL_REGS).  This is the class of registers   that is allowed by "g" or "r" in a register constraint.   Also, registers outside this class are allocated only when   instructions express preferences for them.   The classes must be numbered in nondecreasing order; that is,   a larger-numbered class must never be contained completely   in a smaller-numbered class.   For any two classes, it is very desirable that there be another   class that represents their union.  */enum reg_class{ NO_REGS, GENERAL_REGS, FLOAT_REG0, LONG_FLOAT_REG0, FLOAT_REGS,  FP_REGS, GEN_AND_FP_REGS, FRAME_POINTER_REG, STACK_POINTER_REG,  GEN_AND_MEM_REGS, ALL_REGS, LIM_REG_CLASSES };#define N_REG_CLASSES (int) LIM_REG_CLASSES/* Give names of register classes as strings for dump file.   */#define REG_CLASS_NAMES \ {"NO_REGS", "GENERAL_REGS", "FLOAT_REG0", "LONG_FLOAT_REG0", "FLOAT_REGS", \  "FP_REGS", "GEN_AND_FP_REGS", "FRAME_POINTER_REG", "STACK_POINTER_REG", \  "GEN_AND_MEM_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, 0x00ff, 0x100, 0x300, 0xff00, \                            0xffff00, 0xffffff, 0x1000000, 0x2000000, \                            0x30000ff, 0x3ffffff }#define SUBSET_P(CLASS1, CLASS2) \   ((ns32k_reg_class_contents[CLASS1] & ~ns32k_reg_class_contents[CLASS2]) \     == 0)/* 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)  (regclass_map[REGNO])/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS GENERAL_REGS#define BASE_REG_CLASS  GEN_AND_MEM_REGS/* Get reg_class from a letter such as appears in the machine description.  */#define REG_CLASS_FROM_LETTER(C)		\ ((C) == 'u' ? FLOAT_REG0			\  : (C) == 'v' ? LONG_FLOAT_REG0		\  : (C) == 'f' ? FLOAT_REGS			\  : (C) == 'l' ? FP_REGS			\  : (C) == 'x' ? FRAME_POINTER_REG		\  : (C) == 'y' ? STACK_POINTER_REG		\  : 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.   On the ns32k, these letters are used as follows:   I : Matches integers which are valid shift amounts for scaled indexing.       These are 0, 1, 2, 3 for byte, word, double, and quadword.       Used for matching arithmetic shifts only on 32032 & 32332.   J : Matches integers which fit a "quick" operand.   K : Matches integers 0 to 7 (for inss and exts instructions).  */#define CONST_OK_FOR_LETTER_P(VALUE, C)  \  ((VALUE) < 8 && (VALUE) + 8 >= 0 ?		\   ((C) == 'I' ? (!TARGET_32532 && 0 <= (VALUE) && (VALUE) <= 3) : \    (C) == 'J' ? (VALUE) <= 7 :			\    (C) == 'K' ? 0 <= (VALUE) : 0) : 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) 1/* 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.  *//* We return GENERAL_REGS instead of GEN_AND_MEM_REGS.   The latter offers no real additional possibilities   and can cause spurious secondary reloading.  */#define PREFERRED_RELOAD_CLASS(X,CLASS) \ ((CLASS) == GEN_AND_MEM_REGS ? GENERAL_REGS : (CLASS))/* Return the maximum number of consecutive registers   needed to represent mode MODE in a register of class CLASS.  *//* On the 32000, this is the size of MODE in words */#define CLASS_MAX_NREGS(CLASS, MODE) \  ((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 0/* A C expression whose value is RTL representing the location of the   incoming return address at the beginning of any function, before   the prologue.  This RTL is either a `REG', indicating that the   return value is saved in `REG', or a `MEM' representing a location   in the stack.   You only need to define this macro if you want to support call   frame debugging information like that provided by DWARF 2.   Before the prologue, RA is at 0(sp).  */#define INCOMING_RETURN_ADDR_RTX \  gen_rtx (MEM, VOIDmode, gen_rtx (REG, VOIDmode, STACK_POINTER_REGNUM))/* A C expression whose value is RTL representing the value of the   return address for the frame COUNT steps up from the current frame,   after the prologue.  FRAMEADDR is the frame pointer of the COUNT   frame, or the frame pointer of the COUNT - 1 frame if   `RETURN_ADDR_IN_PREVIOUS_FRAME' is defined.   After the prologue, RA is at 4(fp) in the current frame.  */#define RETURN_ADDR_RTX(COUNT, FRAME)					\  (gen_rtx (MEM, Pmode, gen_rtx (PLUS, Pmode, (FRAME), GEN_INT(4))))/* A C expression whose value is an integer giving the offset, in   bytes, from the value of the stack pointer register to the top of   the stack frame at the beginning of any function, before the   prologue.  The top of the frame is defined to be the value of the   stack pointer in the previous frame, just before the call   instruction.   You only need to define this macro if you want to support call   frame debugging information like that provided by DWARF 2. */#define INCOMING_FRAME_SP_OFFSET 4/* Offset of the CFA from the argument pointer register value.  */#define ARG_POINTER_CFA_OFFSET 8/* If we generate an insn to push BYTES bytes,   this says how many the stack pointer really advances by.   On the 32000, sp@- in a byte insn really pushes a BYTE.  */#define PUSH_ROUNDING(BYTES) (BYTES)/* Offset of first parameter from the argument pointer register value.  */#define FIRST_PARM_OFFSET(FNDECL) 8/* Value is the number of byte of arguments automatically   popped when returning from a subroutine 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.   SIZE is the number of bytes of arguments passed on the stack.   On the 32000, the RET insn may be used to pop them if the number     of args is fixed, but if the number is variable then the caller     must pop them all.  RET can't be used for library calls now     because the library is compiled with the Unix compiler.   Use of RET is a selectable option, since it is incompatible with   standard Unix calling sequences.  If the option is not selected,   the caller must always pop the args.   The attribute stdcall is equivalent to RTD on a per module basis.  */#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \  (ns32k_return_pops_args (FUNDECL, FUNTYPE, SIZE))/* 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.  *//* On the 32000 the return value is in R0,   or perhaps in F0 if there is fp support.  */#define FUNCTION_VALUE(VALTYPE, FUNC) LIBCALL_VALUE(TYPE_MODE (VALTYPE))/* Define how to find the value returned by a library function   assuming the value has mode MODE.  *//* On the 32000 the return value is in R0,   or perhaps F0 is there is fp support.  */#define LIBCALL_VALUE(MODE)  \  gen_rtx (REG, MODE,				  \	   FLOAT_MODE_P(MODE) && TARGET_32081 ? F0_REGNUM: R0_REGNUM)/* Define this if PCC uses the nonreentrant convention for returning   structure and union values.  */#define PCC_STATIC_STRUCT_RETURN/* 1 if N is a possible register number for a function value.   On the 32000, R0 and F0 are the only registers thus used.  */#define FUNCTION_VALUE_REGNO_P(N) (((N) & ~8) == 0)/* 1 if N is a possible register number for function argument passing.   On the 32000, 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.   On the ns32k, this is a single integer, which is a number of bytes   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 ns32k, the offset starts at 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) != 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 32000 all args are pushed, except if -mregparm is specified   then the first two words of arguments are passed in r0, r1.   *NOTE* -mregparm does not work.   It exists only to test register calling conventions.  */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \((TARGET_REGPARM && (CUM) < 8) ? gen_rtx (REG, (MODE), (CUM) / 4) : 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)	\((TARGET_REGPARM && (CUM) < 8					\  && 8 < ((CUM) + ((MODE) == BLKmode				\		      ? int_size_in_bytes (TYPE)		\		      : GET_MODE_SIZE (MODE))))  		\ ? 2 - (CUM) / 4 : 0)#ifndef MAIN_FUNCTION_PROLOGUE#define MAIN_FUNCTION_PROLOGUE#endif/* * The function prologue for the ns32k is fairly simple. * If a frame pointer is needed (decided in reload.c ?) then * we need assembler of the form * *  # Save the oldframe pointer, set the new frame pointer, make space *  # on the stack and save any general purpose registers necessary * *  enter [<general purpose regs to save>], <local stack space> * *  movf  fn, tos    # Save any floating point registers necessary *  . *  . * * If a frame pointer is not needed we need assembler of the form * *  # Make space on the stack *

⌨️ 快捷键说明

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