📄 m88k.h
字号:
call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ global_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ } \ }/* These interfaces that don't apply to the m88000. *//* OVERLAPPING_REGNO_P(REGNO) 0 *//* INSN_CLOBBERS_REGNO_P(INSN, REGNO) 0 *//* True if register is an extended register. */#define XRF_REGNO_P(N) ((N) < FIRST_PSEUDO_REGISTER && (N) >= FIRST_EXTENDED_REGISTER) /* 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 m88000, GRF registers hold 32-bits and XRF registers hold 80-bits. An XRF register can hold any mode, but two GRF registers are required for larger modes. */#define HARD_REGNO_NREGS(REGNO, MODE) \ (XRF_REGNO_P (REGNO) \ ? 1 : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. For double integers, we never put the value into an odd register so that the operators don't run into the situation where the high part of one of the inputs is the low part of the result register. (It's ok if the output registers are the same as the input registers.) The XRF registers can hold all modes, but only DF and SF modes can be manipulated in these registers. The compiler should be allowed to use these as a fast spill area. */#define HARD_REGNO_MODE_OK(REGNO, MODE) \ (XRF_REGNO_P(REGNO) \ ? (TARGET_88110 && GET_MODE_CLASS (MODE) == MODE_FLOAT) \ : (((MODE) != DImode && (MODE) != DFmode && (MODE) != DCmode) \ || ((REGNO) & 1) == 0))/* 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) == DFmode || (MODE1) == DCmode || (MODE1) == DImode \ || (TARGET_88110 && GET_MODE_CLASS (MODE1) == MODE_FLOAT)) \ == ((MODE2) == DFmode || (MODE2) == DCmode || (MODE2) == DImode \ || (TARGET_88110 && GET_MODE_CLASS (MODE2) == MODE_FLOAT)))/* Specify the registers used for certain standard purposes. The values of these macros are register numbers. *//* the m88000 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 31/* Base register for access to local variables of the function. */#define FRAME_POINTER_REGNUM 30/* Base register for access to arguments of the function. */#define ARG_POINTER_REGNUM 0/* Register used in cases where a temporary is known to be safe to use. */#define TEMP_REGNUM 10/* Register in which static-chain is passed to a function. */#define STATIC_CHAIN_REGNUM 11/* Register in which address to store a structure value is passed to a function. */#define STRUCT_VALUE_REGNUM 12/* Register to hold the addressing base for position independent code access to data items. */#define PIC_OFFSET_TABLE_REGNUM 25/* Order in which registers are preferred (most to least). Use temp registers, then param registers top down. Preserve registers are top down to maximize use of double memory ops for register save. The 88open reserved registers (r26-r29 and x30-x31) may commonly be used in most environments with the -fcall-used- or -fcall-saved- options. */#define REG_ALLOC_ORDER \ { \ 13, 12, 11, 10, 29, 28, 27, 26, \ 62, 63, 9, 8, 7, 6, 5, 4, \ 3, 2, 1, 53, 52, 51, 50, 49, \ 48, 47, 46, 45, 44, 43, 42, 41, \ 40, 39, 38, 37, 36, 35, 34, 33, \ 25, 24, 23, 22, 21, 20, 19, 18, \ 17, 16, 15, 14, 61, 60, 59, 58, \ 57, 56, 55, 54, 30, 31, 0, 32}/* Order for leaf functions. */#define REG_LEAF_ALLOC_ORDER \ { \ 9, 8, 7, 6, 13, 12, 11, 10, \ 29, 28, 27, 26, 62, 63, 5, 4, \ 3, 2, 0, 53, 52, 51, 50, 49, \ 48, 47, 46, 45, 44, 43, 42, 41, \ 40, 39, 38, 37, 36, 35, 34, 33, \ 25, 24, 23, 22, 21, 20, 19, 18, \ 17, 16, 15, 14, 61, 60, 59, 58, \ 57, 56, 55, 54, 30, 31, 1, 32}/* Switch between the leaf and non-leaf orderings. The purpose is to avoid write-over scoreboard delays between caller and callee. */#define ORDER_REGS_FOR_LOCAL_ALLOC \{ \ static int leaf[] = REG_LEAF_ALLOC_ORDER; \ static int nonleaf[] = REG_ALLOC_ORDER; \ \ bcopy (regs_ever_live[1] ? nonleaf : leaf, reg_alloc_order, \ FIRST_PSEUDO_REGISTER * sizeof (int)); \}/*** Register Classes ***//* 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 m88000 hardware has two kinds of registers. In addition, we denote the arg pointer as a separate class. */enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, XGRF_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", "AP_REG", "XRF_REGS", "GENERAL_REGS", \ "AGRF_REGS", "XGRF_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 {{0x00000000, 0x00000000}, \ {0x00000001, 0x00000000}, \ {0x00000000, 0xffffffff}, \ {0xfffffffe, 0x00000000}, \ {0xffffffff, 0x00000000}, \ {0xfffffffe, 0xffffffff}, \ {0xffffffff, 0xffffffff}}/* 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) ? ((REGNO < 32) ? GENERAL_REGS : XRF_REGS) : AP_REG)/* The class value for index registers, and the one for base regs. */#define BASE_REG_CLASS AGRF_REGS#define INDEX_REG_CLASS GENERAL_REGS/* Get reg_class from a letter such as appears in the machine description. For the 88000, the following class/letter is defined for the XRF: x - Extended register file */#define REG_CLASS_FROM_LETTER(C) \ (((C) == 'x') ? XRF_REGS : NO_REGS)/* 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_BASE_P(REGNO) \ ((REGNO) < FIRST_EXTENDED_REGISTER \ || (unsigned) reg_renumber[REGNO] < FIRST_EXTENDED_REGISTER)#define REGNO_OK_FOR_INDEX_P(REGNO) \ (((REGNO) && (REGNO) < FIRST_EXTENDED_REGISTER) \ || (unsigned) reg_renumber[REGNO] < FIRST_EXTENDED_REGISTER)/* 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. Double constants should be in a register iff they can be made cheaply. */#define PREFERRED_RELOAD_CLASS(X,CLASS) \ (CONSTANT_P(X) && (CLASS == XRF_REGS) ? NO_REGS : (CLASS))/* Return the register class of a scratch register needed to load IN into a register of class CLASS in MODE. On the m88k, when PIC, we need a temporary when loading some addresses into a register. */#define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, IN) \ ((flag_pic \ && GET_CODE (IN) == CONST \ && GET_CODE (XEXP (IN, 0)) == PLUS \ && GET_CODE (XEXP (XEXP (IN, 0), 0)) == CONST_INT \ && ! SMALL_INT (XEXP (XEXP (IN, 0), 1))) ? GENERAL_REGS : NO_REGS)/* 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) == XRF_REGS) ? 1 \ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)))/* Letters in the range `I' through `P' in a register constraint string can be used to stand for particular ranges of immediate operands. The C expression is true iff C is a known letter and VALUE is appropriate for that letter. For the m88000, the following constants are used: `I' requires a non-negative 16-bit value. `J' requires a non-positive 16-bit value. `K' requires a non-negative value < 32. `L' requires a constant with only the upper 16-bits set. `M' requires constant values that can be formed with `set'. `N' requires a negative value. `O' requires zero. `P' requires a non-negative value. *//* Quick tests for certain values. */#define SMALL_INT(X) (SMALL_INTVAL (INTVAL (X)))#define SMALL_INTVAL(I) ((unsigned) (I) < 0x10000)#define ADD_INT(X) (ADD_INTVAL (INTVAL (X)))#define ADD_INTVAL(I) ((unsigned) (I) + 0xffff < 0x1ffff)#define POWER_OF_2(I) ((I) && POWER_OF_2_or_0(I))#define POWER_OF_2_or_0(I) (((I) & ((unsigned)(I) - 1)) == 0)#define CONST_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'I' ? SMALL_INTVAL (VALUE) \ : (C) == 'J' ? SMALL_INTVAL (-(VALUE)) \ : (C) == 'K' ? (unsigned)(VALUE) < 32 \ : (C) == 'L' ? ((VALUE) & 0xffff) == 0 \ : (C) == 'M' ? integer_ok_for_set (VALUE) \ : (C) == 'N' ? (VALUE) < 0 \ : (C) == 'O' ? (VALUE) == 0 \ : (C) == 'P' ? (VALUE) >= 0 \ : 0)/* Similar, but for floating constants, and defining letters G and H. Here VALUE is the CONST_DOUBLE rtx itself. For the m88000, the constraints are: `G' requires zero, and `H' requires one or two. */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'G' ? (CONST_DOUBLE_HIGH (VALUE) == 0 \ && CONST_DOUBLE_LOW (VALUE) == 0) \ : 0)/* Letters in the range `Q' through `U' in a register constraint string may be defined in a machine-dependent fashion to stand for arbitrary operand types. For the m88k, `Q' handles addresses in a call context. */#define EXTRA_CONSTRAINT(OP, C) \ ((C) == 'Q' ? symbolic_address_p (OP) : 0)/*** Describing Stack Layout ***//* Define this if pushing a word on the stack moves the stack pointer to a smaller address. */#define STACK_GROWS_DOWNWARD/* Define this if the addresses of local variable slots are at negative offsets from the frame pointer. *//* #define FRAME_GROWS_DOWNWARD *//* Offset from the frame pointer to the first local variable slot to be allocated. For the m88k, the debugger wants the return address (r1) stored at location r30+4, and the previous frame pointer stored at location r30. */#define STARTING_FRAME_OFFSET 8/* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. The m88k has no push instruction. *//* #define PUSH_ROUNDING(BYTES) *//* If defined, the maximum amount of space required for outgoing arguments will be computed and placed into the variable `current_function_outgoing_args_size'. No space will be pushed onto the stack for each call; instead, the function prologue should increase the stack frame size by this amount. */#define ACCUMULATE_OUTGOING_ARGS/* Offset from the stack pointer register to the first location at which outgoing arguments are placed. Use the default value zero. *//* #define STACK_POINTER_OFFSET 0 *//* Offset of first parameter from the argument pointer register value. Using an argument pointer, this is 0 for the m88k. GCC knows how to eliminate the argument pointer references if necessary. */#define FIRST_PARM_OFFSET(FNDECL) 0/* Define this if functions should assume that stack space has been allocated for arguments even when their values are passed in registers. The value of this macro is the size, in bytes, of the area reserved for arguments passed in registers. This space can either be allocated by the caller or be a part of the machine-dependent stack frame: `OUTGOING_REG_PARM_STACK_SPACE' says which. */#define REG_PARM_STACK_SPACE(FNDECL) 32/* Define this macro if REG_PARM_STACK_SPACE is defined but stack parameters don't skip the area specified by REG_PARM_STACK_SPACE. Normally, when a parameter is not passed in registers, it is placed on the stack beyond the REG_PARM_STACK_SPACE area. Defining this macro suppresses this behavior and causes the parameter to be passed on the stack in its natural location. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -