📄 pa.h
字号:
56, 57, 58, 59, 60, 61, 62, 63, \ 64, 65, 66, 67, 68, 69, 70, 71, \ 72, 73, 74, 75, 76, 77, 78, 79, \ 80, 81, 82, 83, 84, 85, 86, 87, \ 88, 89, 90, 91, 92, 93, 94, 95, \ 96, 97, 98, 99, 100, 101, 102, 103, \ 104, 105, 106, 107, 108, 109, 110, 111,\ 5, 6, 7, \ 8, 9, 10, 11, 12, 13, 14, 15, \ 16, 17, 18, 44, 45, 46, 47, \ 48, 49, 50, 51, 52, 53, 54, 55, \ 1, \ 2, 3, 4, 32, 33, 34, 35, 0, \ 112}/* Return number of consecutive hard regs needed starting at reg REGNO to hold something of mode MODE. This is ordinarily the length in words of a value of mode MODE but can be less for certain modes in special long registers. On the HP-PA, ordinary registers hold 32 bits worth; The floating point registers are 64 bits wide. Snake fp regs are 32 bits wide */#define HARD_REGNO_NREGS(REGNO, MODE) \ (((REGNO) < 32 || (REGNO) >= 48) \ ? ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) : 1)/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. On the HP-PA, the cpu registers can hold any mode. We force this to be an even register is it cannot hold the full mode. */#if 0#define HARD_REGNO_MODE_OK(REGNO, MODE) \ ((REGNO) == 0 ? (MODE) == CCmode || (MODE) == CCFPmode \ : (REGNO) < 32 ? ((GET_MODE_SIZE (MODE) <= 4) ? 1 : ((REGNO) & 1) == 0)\ : (REGNO) < 48 ? (GET_MODE_SIZE (MODE) >= 4) \ : (GET_MODE_SIZE (MODE) > 4 ? ((REGNO) & 1) == 0 \ : GET_MODE_SIZE (MODE) == 4))#endif#define HARD_REGNO_MODE_OK(REGNO, MODE) \ ((REGNO) == 0 ? (MODE) == CCmode || (MODE) == CCFPmode \ : (REGNO) < 32 ? ((GET_MODE_SIZE (MODE) <= 4) ? 1 : ((REGNO) & 1) == 0)\ : (REGNO) < 48 ? (GET_MODE_SIZE (MODE) >= 4) \ : (GET_MODE_SIZE (MODE) > 4 ? ((REGNO) & 1) == 0 \ : 1))/* Value is 1 if it is a good idea to tie two pseudo registers when one has mode MODE1 and one has mode MODE2. If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, for any hard reg, then this must be 0 for correct output. */#define MODES_TIEABLE_P(MODE1, MODE2) \ ((MODE1) == (MODE2) || GET_MODE_CLASS (MODE1) == GET_MODE_CLASS (MODE2))/* Specify the registers used for certain standard purposes. The values of these macros are register numbers. *//* The HP-PA pc isn't overloaded on a register that the compiler knows about. *//* #define PC_REGNUM *//* Register to use for pushing function arguments. */#define STACK_POINTER_REGNUM 30/* Base register for access to local variables of the function. */#define FRAME_POINTER_REGNUM 4/* 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. */extern int leaf_function;#define FRAME_POINTER_REQUIRED (current_function_calls_alloca) /* C statement to store the difference between the frame pointer and the stack pointer values immediately after the function prologue. Note, we always pretend that this is a leaf function because if it's not, there's no point in trying to eliminate the frame pointer. If it is a leaf function, we guessed right! */#define INITIAL_FRAME_POINTER_OFFSET(VAR) \ do { int __fsize = compute_frame_size (get_frame_size (), 1, 0) + 32; \ (VAR) = -(TARGET_SNAKE ? (__fsize + 63) & ~63 : __fsize); } while (0)/* Base register for access to arguments of the function. */#define ARG_POINTER_REGNUM 4/* Register in which static-chain is passed to a function. *//* ??? */#define STATIC_CHAIN_REGNUM 29/* Register which holds offset table for position-independent data references. */#define PIC_OFFSET_TABLE_REGNUM 19#define INITIALIZE_PIC initialize_pic ()#define FINALIZE_PIC finalize_pic ()/* Register in which address to store a structure value is passed to a function. */#define STRUCT_VALUE_REGNUM 28/* 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. */ /* The HP-PA has four kinds of registers: general regs, 1.0 fp regs, 1.1 fp regs, and the high 1.1 fp regs, to which the operands of fmpyadd and fmpysub are restricted. FP_OR_SNAKE_FP_REGS is for reload_{in,out}di only and isn't used anywhere else.*/enum reg_class { NO_REGS, R1_REGS, GENERAL_REGS, FP_REGS, GENERAL_OR_FP_REGS, HI_SNAKE_FP_REGS, SNAKE_FP_REGS, GENERAL_OR_SNAKE_FP_REGS, FP_OR_SNAKE_FP_REGS, SHIFT_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", "R1_REGS", "GENERAL_REGS", "FP_REGS", "GENERAL_OR_FP_REGS",\ "HI_SNAKE_FP_REGS", "SNAKE_FP_REGS", "GENERAL_OR_SNAKE_FP_REGS",\ "FP_OR_SNAKE_FP_REGS","SHIFT_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. Register 0, the "condition code" register, is in no class. */#define REG_CLASS_CONTENTS \{ {0, 0, 0, 0}, /* NO_REGS */ \ {0x2, 0, 0, 0}, /* R1_REGS */ \ {-2, 0, 0, 0}, /* GENERAL_REGS */ \ {0, 0xffff, 0, 0}, /* FP_REGS */ \ {-2, 0xffff, 0, 0}, /* GENERAL_OR_FP_REGS */\ {0, 0, 0xffff0000, 0xffff}, /* HI_SNAKE_FP_REGS */ \ {0, 0xffff0000, ~0, 0xffff}, /* SNAKE_FP_REGS */ \ {-2, 0xffff0000, ~0, 0xffff}, /* GENERAL_OR_SNAKE_FP_REGS */\ {0, ~0, ~0, 0xffff}, /* FP_OR_SNAKE_FP_REGS */\ {0, 0, 0, 0x10000}, /* SHIFT_REGS */ \ {-2, ~0, ~0, 0x1ffff}} /* ALL_REGS *//* 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) \ ((REGNO) == 0 ? NO_REGS \ : (REGNO) == 1 ? R1_REGS \ : (REGNO) < 32 ? GENERAL_REGS \ : (REGNO) < 48 ? FP_REGS \ : (REGNO) < 80 ? SNAKE_FP_REGS \ : (REGNO) < 112 ? HI_SNAKE_FP_REGS \ : SHIFT_REGS)/* The class value for index registers, and the one for base regs. */#define INDEX_REG_CLASS GENERAL_REGS#define BASE_REG_CLASS GENERAL_REGS/* Get reg_class from a letter such as appears in the machine description. */#define REG_CLASS_FROM_LETTER(C) \ ((C) == 'f' ? (!TARGET_SNAKE ? FP_REGS : NO_REGS) : \ ((C) == 'x' ? (TARGET_SNAKE ? SNAKE_FP_REGS : NO_REGS) : \ ((C) == 'y' ? (TARGET_SNAKE ? HI_SNAKE_FP_REGS : NO_REGS) : \ ((C) == 'q' ? SHIFT_REGS : \ ((C) == 'a' ? R1_REGS : \ ((C) == 'z' ? FP_OR_SNAKE_FP_REGS : 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.HP-PA immediate field sizes: 5 bits: scalar/floating short loads + stores; deposit; conditional branch 11 bits: arithmetic immediate, compare immediate 14 bits: loads and stores; load offset 21 bits: load and add immediate long (but this isn't really used) (there are also 13-bit and 26-bit immediates but only in system instructions) `I' is used for the 11 bit constants. `J' is used for the 14 bit constants. `K' is used for unsigned 5 bit constants (extract/deposit operands). `L' is used for the 5 bit constants. `M' is used for 0. */#define CONST_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'I' ? (unsigned) ((VALUE) + 0x400) < 0x800 \ : (C) == 'J' ? (unsigned) ((VALUE) + 0x2000) < 0x4000 \ : (C) == 'K' ? (unsigned) (VALUE) < 0x20 \ : (C) == 'L' ? (unsigned) ((VALUE) + 0x10) < 0x20 \ : (C) == 'M' ? (VALUE) == 0 \ : (C) == 'O' ? (((VALUE) & ((VALUE) + 1)) == 0) \ : (C) == 'P' ? consec_zeros_p (VALUE) \ : 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) \ ((C) == 'G' && XINT (VALUE, 0) == 0 && XINT (VALUE, 1) == 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 register class of a scratch register needed to copy IN into or out of a register in CLASS in MODE. If it can be done directly, NO_REGS is returned. */#define SECONDARY_RELOAD_CLASS(CLASS,MODE,IN) \ secondary_reload_class (CLASS, MODE, IN)/* 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 *//* Believe it or not. */#define ARGS_GROW_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 8/* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. On the HP-PA, don't define this because there are no push insns. *//* #define PUSH_ROUNDING(BYTES) *//* Offset of first parameter from the argument pointer register value. This value will be negated because the arguments grow down. Also note that on STACK_GROWS_UPWARD machines (such as this one) this is the distance from the frame pointer to the end of the first argument, not it's beginning. To get the real offset of the first argument, the size of the argument must be added. ??? Have to check on this.*//* #define FIRST_PARM_OFFSET(FNDECL) 36 */#define FIRST_PARM_OFFSET(FNDECL) -32 /* Absolute value of offset from top-of-stack address to location to store the function parameter if it can't go in a register. Addresses for following parameters are computed relative to this one. *//* #define FIRST_PARM_CALLER_OFFSET(FNDECL) 36 */#define FIRST_PARM_CALLER_OFFSET(FNDECL) -32 /* When a parameter is passed in a register, stack space is still allocated for it. */#define REG_PARM_STACK_SPACE(DECL) 16/* Define this if the above stack space is to be considered part of the space allocated by the caller. */#define OUTGOING_REG_PARM_STACK_SPACE/* Keep the stack pointer constant throughout the function. This is both an optimization and a necessity: longjmp doesn't behave itself when the stack pointer moves within the function! */#define ACCUMULATE_OUTGOING_ARGS /* The weird HPPA calling conventions require a minimum of 48 bytes on the stack: 16 bytes for register saves, and 32 bytes for magic. This is the difference between the logical top of stack and the actual sp. */ #define STACK_POINTER_OFFSET -32#define STACK_DYNAMIC_OFFSET(FNDECL) \ ((STACK_POINTER_OFFSET) - current_function_outgoing_args_size)/* Value is 1 if returning from a function call automatically pops the arguments described by the number-of-args field in the call. 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. */#define RETURN_POPS_ARGS(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 0. *//* On the HP-PA the value is found in register(s) 28(-29), unless the mode is SF or DF. Then the value is returned in fr4 (36, ) */#define FUNCTION_VALUE(VALTYPE, FUNC) \ gen_rtx (REG, TYPE_MODE (VALTYPE), ((TYPE_MODE (VALTYPE) == SFmode ||\ TYPE_MODE (VALTYPE) == DFmode) ? \ (TARGET_SNAKE ? 56 : 36) : 28))#define FUNCTION_OUTGOING_VALUE(VALTYPE, FUNC) \ FUNCTION_VALUE(VALTYPE, FUNC)/* 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, (MODE == SFmode || MODE == DFmode ?\ (TARGET_SNAKE ? 56 : 36) : 28))/* 1 if N is a possible register number for a function value as seen by the caller. */#define FUNCTION_VALUE_REGNO_P(N) ((N) == 28 || (N) == 36 || (N) == 56)/* 1 if N is a possible register number for function argument passing. */#define FUNCTION_ARG_REGNO_P(N) (((N) >= 23 && (N) <= 26) || \ ((N) >= 36 && (N) <= 39) || \ ((N) >= 56 && (N) <= 63))/* 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -