📄 vax.h
字号:
: (C) == 'M' ? 0 <= (VALUE) && (VALUE) < 256 \ : (C) == 'L' ? -32768 <= (VALUE) && (VALUE) < 32768 \ : (C) == 'N' ? 0 <= (VALUE) && (VALUE) < 65536 \ : 0)/* Similar, but for floating constants, and defining letters G and H. Here VALUE is the CONST_DOUBLE rtx itself. `G' is a floating-point zero. */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'G' ? ((VALUE) == CONST0_RTX (DFmode) \ || (VALUE) == CONST0_RTX (SFmode)) \ : 0)/* Optional extra constraints for this machine. For the VAX, `Q' means that OP is a MEM that does not have a mode-dependent address. */#define EXTRA_CONSTRAINT(OP, C) \ ((C) == 'Q' \ ? GET_CODE (OP) == MEM && ! mode_dependent_address_p (XEXP (OP, 0)) \ : 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. */#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS)/* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. *//* On the VAX, this is always the size of MODE in words, since all registers are the same size. */#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/* Given an rtx for the address of a frame, return an rtx for the address of the word in the frame that holds the dynamic chain--the previous frame's address. */#define DYNAMIC_CHAIN_ADDRESS(FRAME) plus_constant ((FRAME), 12)/* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. On the VAX, -(sp) pushes only the bytes of the operands. */#define PUSH_ROUNDING(BYTES) (BYTES)/* Offset of first parameter from the argument pointer register value. */#define FIRST_PARM_OFFSET(FNDECL) 4/* Value is the number of bytes 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 VAX, the RET insn pops a maximum of 255 args for any function. */#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ ((SIZE) > 255*4 ? 0 : (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 VAX the return value is in R0 regardless. */ #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. *//* On the VAX the return value is in R0 regardless. */ #define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 0)/* 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 VAX, R0 is the only register thus used. */#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)/* 1 if N is a possible register number for function argument passing. On the VAX, 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 VAX, 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 VAX, 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 VAX all args are pushed. */ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0/* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */#define VAX_FUNCTION_PROFILER_NAME "mcount"#define FUNCTION_PROFILER(FILE, LABELNO) \ do \ { \ char label[256]; \ ASM_GENERATE_INTERNAL_LABEL (label, "LP", (LABELNO)); \ fprintf (FILE, "\tmovab "); \ assemble_name (FILE, label); \ asm_fprintf (FILE, ",%Rr0\n\tjsb %s\n", \ VAX_FUNCTION_PROFILER_NAME); \ } \ while (0)/* 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/* Store in the variable DEPTH the initial difference between the frame pointer reg contents and the stack pointer reg contents, as of the start of the function body. This depends on the layout of the fixed parts of the stack frame and on how registers are saved. On the VAX, FRAME_POINTER_REQUIRED is always 1, so the definition of this macro doesn't matter. But it must be defined. */#define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = 0;/* Output assembler code for a block containing the constant parts of a trampoline, leaving space for the variable parts. *//* On the VAX, the trampoline contains an entry mask and two instructions: .word NN movl $STATIC,r0 (store the functions static chain) jmp *$FUNCTION (jump to function code at address FUNCTION) */#define TRAMPOLINE_TEMPLATE(FILE) \{ \ assemble_aligned_integer (2, const0_rtx); \ assemble_aligned_integer (2, GEN_INT (0x8fd0)); \ assemble_aligned_integer (4, const0_rtx); \ assemble_aligned_integer (1, GEN_INT (0x50 + STATIC_CHAIN_REGNUM)); \ assemble_aligned_integer (2, GEN_INT (0x9f17)); \ assemble_aligned_integer (4, const0_rtx); \}/* Length in units of the trampoline for entering a nested function. */#define TRAMPOLINE_SIZE 15/* 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. *//* We copy the register-mask from the function's pure code to the start of the trampoline. */#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \{ \ emit_move_insn (gen_rtx_MEM (HImode, TRAMP), \ gen_rtx_MEM (HImode, FNADDR)); \ emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 4)), CXT); \ emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 11)), \ plus_constant (FNADDR, 2)); \ emit_insn (gen_sync_istream ()); \}/* Byte offset of return address in a stack frame. The "saved PC" field is in element [4] when treating the frame as an array of longwords. */#define RETURN_ADDRESS_OFFSET (4 * UNITS_PER_WORD) /* 16 *//* A C expression whose value is RTL representing the value of the return address for the frame COUNT steps up from the current frame. FRAMEADDR is already the frame pointer of the COUNT frame, so we can ignore COUNT. */#define RETURN_ADDR_RTX(COUNT, FRAME) \ ((COUNT == 0) \ ? gen_rtx_MEM (Pmode, plus_constant (FRAME, RETURN_ADDRESS_OFFSET)) \ : (rtx) 0)/* Addressing modes, and classification of registers for them. */#define HAVE_POST_INCREMENT 1/* #define HAVE_POST_DECREMENT 0 */#define HAVE_PRE_DECREMENT 1/* #define HAVE_PRE_INCREMENT 0 *//* 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) \ (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \ || GET_CODE (X) == HIGH)/* 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 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. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -