📄 frv.h
字号:
If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, MODE2)' are ever different for any R, then `MODES_TIEABLE_P (MODE1, MODE2)' must be zero. */#define MODES_TIEABLE_P(MODE1, MODE2) (MODE1 == MODE2)/* Define this macro if the compiler should avoid copies to/from CCmode registers. You should only define this macro if support fo copying to/from CCmode is incomplete. */#define AVOID_CCMODE_COPIES/* Register Classes. *//* An enumeral type that must be defined with all the register class names as enumeral values. `NO_REGS' must be first. `ALL_REGS' must be the last register class, followed by one more enumeral value, `LIM_REG_CLASSES', which is not a register class but rather tells how many classes there are. Each register class has a number, which is the value of casting the class name to type `int'. The number serves as an index in many of the tables described below. */enum reg_class{ NO_REGS, ICC_REGS, FCC_REGS, CC_REGS, ICR_REGS, FCR_REGS, CR_REGS, LCR_REG, LR_REG, SPR_REGS, QUAD_ACC_REGS, EVEN_ACC_REGS, ACC_REGS, ACCG_REGS, QUAD_FPR_REGS, FEVEN_REGS, FPR_REGS, QUAD_REGS, EVEN_REGS, GPR_REGS, ALL_REGS, LIM_REG_CLASSES};#define GENERAL_REGS GPR_REGS/* The number of distinct register classes, defined as follows: #define N_REG_CLASSES (int) LIM_REG_CLASSES */#define N_REG_CLASSES ((int) LIM_REG_CLASSES)/* An initializer containing the names of the register classes as C string constants. These names are used in writing some of the debugging dumps. */#define REG_CLASS_NAMES { \ "NO_REGS", \ "ICC_REGS", \ "FCC_REGS", \ "CC_REGS", \ "ICR_REGS", \ "FCR_REGS", \ "CR_REGS", \ "LCR_REG", \ "LR_REG", \ "SPR_REGS", \ "QUAD_ACC_REGS", \ "EVEN_ACC_REGS", \ "ACC_REGS", \ "ACCG_REGS", \ "QUAD_FPR_REGS", \ "FEVEN_REGS", \ "FPR_REGS", \ "QUAD_REGS", \ "EVEN_REGS", \ "GPR_REGS", \ "ALL_REGS" \}/* An initializer containing the contents of the register classes, as integers which are bit masks. The Nth integer specifies the contents of class N. The way the integer MASK is interpreted is that register R is in the class if `MASK & (1 << R)' is 1. When the machine has more than 32 registers, an integer does not suffice. Then the integers are replaced by sub-initializers, braced groupings containing several integers. Each sub-initializer must be suitable as an initializer for the type `HARD_REG_SET' which is defined in `hard-reg-set.h'. */#define REG_CLASS_CONTENTS \{ /* gr0-gr31 gr32-gr63 fr0-fr31 fr32-fr-63 cc/ccr/acc ap/spr */ \ { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0}, /* NO_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x000000f0,0x0}, /* ICC_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x0000000f,0x0}, /* FCC_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x000000ff,0x0}, /* CC_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x0000f000,0x0}, /* ICR_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000f00,0x0}, /* FCR_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x0000ff00,0x0}, /* CR_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x4}, /* LCR_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x2}, /* LR_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x6}, /* SPR_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x00ff0000,0x0}, /* QUAD_ACC */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x00ff0000,0x0}, /* EVEN_ACC */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0x00ff0000,0x0}, /* ACC_REGS */\ { 0x00000000,0x00000000,0x00000000,0x00000000,0xff000000,0x0}, /* ACCG_REGS*/\ { 0x00000000,0x00000000,0xffffffff,0xffffffff,0x00000000,0x0}, /* QUAD_FPR */\ { 0x00000000,0x00000000,0xffffffff,0xffffffff,0x00000000,0x0}, /* FEVEN_REG*/\ { 0x00000000,0x00000000,0xffffffff,0xffffffff,0x00000000,0x0}, /* FPR_REGS */\ { 0x0ffffffc,0xffffffff,0x00000000,0x00000000,0x00000000,0x0}, /* QUAD_REGS*/\ { 0xfffffffc,0xffffffff,0x00000000,0x00000000,0x00000000,0x0}, /* EVEN_REGS*/\ { 0xffffffff,0xffffffff,0x00000000,0x00000000,0x00000000,0x1}, /* GPR_REGS */\ { 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x7}, /* ALL_REGS */\}/* A C expression whose value is a register class containing hard register REGNO. In general there is more than one such class; choose a class which is "minimal", meaning that no smaller class also contains the register. */extern enum reg_class regno_reg_class[];#define REGNO_REG_CLASS(REGNO) regno_reg_class [REGNO]/* A macro whose definition is the name of the class to which a valid base register must belong. A base register is one used in an address which is the register value plus a displacement. */#define BASE_REG_CLASS GPR_REGS/* A macro whose definition is the name of the class to which a valid index register must belong. An index register is one used in an address where its value is either multiplied by a scale factor or added to another register (as well as added to a displacement). */#define INDEX_REG_CLASS GPR_REGS/* A C expression which defines the machine-dependent operand constraint letters for register classes. If CHAR is such a letter, the value should be the register class corresponding to it. Otherwise, the value should be `NO_REGS'. The register letter `r', corresponding to class `GENERAL_REGS', will not be passed to this macro; you do not need to handle it. The following letters are unavailable, due to being used as constraints: '0'..'9' '<', '>' 'E', 'F', 'G', 'H' 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P' 'Q', 'R', 'S', 'T', 'U' 'V', 'X' 'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */extern enum reg_class reg_class_from_letter[];#define REG_CLASS_FROM_LETTER(CHAR) reg_class_from_letter [(unsigned char)(CHAR)]/* A C expression which is nonzero if register number NUM is suitable for use as a base register in operand addresses. It may be either a suitable hard register or a pseudo register that has been allocated such a hard register. */#define REGNO_OK_FOR_BASE_P(NUM) \ ((NUM) < FIRST_PSEUDO_REGISTER \ ? GPR_P (NUM) \ : (reg_renumber [NUM] >= 0 && GPR_P (reg_renumber [NUM])))/* A C expression which is nonzero if register number NUM is suitable for use as an index register in operand addresses. It may be either a suitable hard register or a pseudo register that has been allocated such a hard register. The difference between an index register and a base register is that the index register may be scaled. If an address involves the sum of two registers, neither one of them scaled, then either one may be labeled the "base" and the other the "index"; but whichever labeling is used must fit the machine's constraints of which registers may serve in each capacity. The compiler will try both labelings, looking for one that is valid, and will reload one or both registers only if neither labeling works. */#define REGNO_OK_FOR_INDEX_P(NUM) \ ((NUM) < FIRST_PSEUDO_REGISTER \ ? GPR_P (NUM) \ : (reg_renumber [NUM] >= 0 && GPR_P (reg_renumber [NUM])))/* A C expression that places additional restrictions on the register class to use when it is necessary to copy value X into a register in class CLASS. The value is a register class; perhaps CLASS, or perhaps another, smaller class. On many machines, the following definition is safe: #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS Sometimes returning a more restrictive class makes better code. For example, on the 68000, when X is an integer constant that is in range for a `moveq' instruction, the value of this macro is always `DATA_REGS' as long as CLASS includes the data registers. Requiring a data register guarantees that a `moveq' will be used. If X is a `const_double', by returning `NO_REGS' you can force X into a memory constant. This is useful on certain machines where immediate floating values cannot be loaded into certain kinds of registers. This declaration must be present. */#define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS#define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ frv_secondary_reload_class (CLASS, MODE, X, TRUE)#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ frv_secondary_reload_class (CLASS, MODE, X, FALSE)/* A C expression whose value is nonzero if pseudos that have been assigned to registers of class CLASS would likely be spilled because registers of CLASS are needed for spill registers. The default value of this macro returns 1 if CLASS has exactly one register and zero otherwise. On most machines, this default should be used. Only define this macro to some other expression if pseudo allocated by `local-alloc.c' end up in memory because their hard registers were needed for spill registers. If this macro returns nonzero for those classes, those pseudos will only be allocated by `global.c', which knows how to reallocate the pseudo to another register. If there would not be another register available for reallocation, you should not change the definition of this macro since the only effect of such a definition would be to slow down register allocation. */#define CLASS_LIKELY_SPILLED_P(CLASS) frv_class_likely_spilled_p (CLASS)/* A C expression for the maximum number of consecutive registers of class CLASS needed to hold a value of mode MODE. This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS. This macro helps control the handling of multiple-word values in the reload pass. This declaration is required. */#define CLASS_MAX_NREGS(CLASS, MODE) frv_class_max_nregs (CLASS, MODE)#define ZERO_P(x) (x == CONST0_RTX (GET_MODE (x)))/* 6 bit signed immediate. */#define CONST_OK_FOR_I(VALUE) IN_RANGE_P(VALUE, -32, 31)/* 10 bit signed immediate. */#define CONST_OK_FOR_J(VALUE) IN_RANGE_P(VALUE, -512, 511)/* Unused */#define CONST_OK_FOR_K(VALUE) 0/* 16 bit signed immediate. */#define CONST_OK_FOR_L(VALUE) IN_RANGE_P(VALUE, -32768, 32767)/* 16 bit unsigned immediate. */#define CONST_OK_FOR_M(VALUE) IN_RANGE_P (VALUE, 0, 65535)/* 12 bit signed immediate that is negative. */#define CONST_OK_FOR_N(VALUE) IN_RANGE_P(VALUE, -2048, -1)/* Zero */#define CONST_OK_FOR_O(VALUE) ((VALUE) == 0)/* 12 bit signed immediate that is negative. */#define CONST_OK_FOR_P(VALUE) IN_RANGE_P(VALUE, 1, 2047)/* A C expression that defines the machine-dependent operand constraint letters (`I', `J', `K', .. 'P') that specify particular ranges of integer values. If C is one of those letters, the expression should check that VALUE, an integer, is in the appropriate range and return 1 if so, 0 otherwise. If C is not one of those letters, the value should be 0 regardless of VALUE. */#define CONST_OK_FOR_LETTER_P(VALUE, C) \ ( (C) == 'I' ? CONST_OK_FOR_I (VALUE) \ : (C) == 'J' ? CONST_OK_FOR_J (VALUE) \ : (C) == 'K' ? CONST_OK_FOR_K (VALUE) \ : (C) == 'L' ? CONST_OK_FOR_L (VALUE) \ : (C) == 'M' ? CONST_OK_FOR_M (VALUE) \ : (C) == 'N' ? CONST_OK_FOR_N (VALUE) \ : (C) == 'O' ? CONST_OK_FOR_O (VALUE) \ : (C) == 'P' ? CONST_OK_FOR_P (VALUE) \ : 0)/* A C expression that defines the machine-dependent operand constraint letters (`G', `H') that specify particular ranges of `const_double' values. If C is one of those letters, the expression should check that VALUE, an RTX of code `const_double', is in the appropriate range and return 1 if so, 0 otherwise. If C is not one of those letters, the value should be 0 regardless of VALUE. `const_double' is used for all floating-point constants and for `DImode' fixed-point constants. A given letter can accept either or both kinds of values. It can use `GET_MODE' to distinguish between these kinds. */#define CONST_DOUBLE_OK_FOR_G(VALUE) \ ((GET_MODE (VALUE) == VOIDmode \ && CONST_DOUBLE_LOW (VALUE) == 0 \ && CONST_DOUBLE_HIGH (VALUE) == 0) \ || ((GET_MODE (VALUE) == SFmode \ || GET_MODE (VALUE) == DFmode) \ && (VALUE) == CONST0_RTX (GET_MODE (VALUE))))#define CONST_DOUBLE_OK_FOR_H(VALUE) 0#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ( (C) == 'G' ? CONST_DOUBLE_OK_FOR_G (VALUE) \ : (C) == 'H' ? CONST_DOUBLE_OK_FOR_H (VALUE) \ : 0)/* A C expression that defines the optional machine-dependent constraint letters (`Q', `R', `S', `T', `U') that can be used to segregate specific t
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -