📄 frv.h
字号:
#define SPR_FIRST 169#define SPR_LAST 172#define LR_REGNO (SPR_FIRST)#define LCR_REGNO (SPR_FIRST + 1)#define IACC_FIRST (SPR_FIRST + 2)#define IACC_LAST (SPR_FIRST + 3)#define GPR_P(R) IN_RANGE_P (R, GPR_FIRST, GPR_LAST)#define GPR_OR_AP_P(R) (GPR_P (R) || (R) == ARG_POINTER_REGNUM)#define FPR_P(R) IN_RANGE_P (R, FPR_FIRST, FPR_LAST)#define CC_P(R) IN_RANGE_P (R, CC_FIRST, CC_LAST)#define ICC_P(R) IN_RANGE_P (R, ICC_FIRST, ICC_LAST)#define FCC_P(R) IN_RANGE_P (R, FCC_FIRST, FCC_LAST)#define CR_P(R) IN_RANGE_P (R, CR_FIRST, CR_LAST)#define ICR_P(R) IN_RANGE_P (R, ICR_FIRST, ICR_LAST)#define FCR_P(R) IN_RANGE_P (R, FCR_FIRST, FCR_LAST)#define ACC_P(R) IN_RANGE_P (R, ACC_FIRST, ACC_LAST)#define ACCG_P(R) IN_RANGE_P (R, ACCG_FIRST, ACCG_LAST)#define SPR_P(R) IN_RANGE_P (R, SPR_FIRST, SPR_LAST)#define GPR_OR_PSEUDO_P(R) (GPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define FPR_OR_PSEUDO_P(R) (FPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define GPR_AP_OR_PSEUDO_P(R) (GPR_OR_AP_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define CC_OR_PSEUDO_P(R) (CC_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define ICC_OR_PSEUDO_P(R) (ICC_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define FCC_OR_PSEUDO_P(R) (FCC_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define CR_OR_PSEUDO_P(R) (CR_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define ICR_OR_PSEUDO_P(R) (ICR_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define FCR_OR_PSEUDO_P(R) (FCR_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define ACC_OR_PSEUDO_P(R) (ACC_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define ACCG_OR_PSEUDO_P(R) (ACCG_P (R) || (R) >= FIRST_PSEUDO_REGISTER)#define MAX_STACK_IMMEDIATE_OFFSET 2047/* Register Basics. *//* Number of hardware registers known to the compiler. They receive numbers 0 through `FIRST_PSEUDO_REGISTER-1'; thus, the first pseudo register's number really is assigned the number `FIRST_PSEUDO_REGISTER'. */#define FIRST_PSEUDO_REGISTER (SPR_LAST + 1)/* The first/last register that can contain the arguments to a function. */#define FIRST_ARG_REGNUM (GPR_FIRST + 8)#define LAST_ARG_REGNUM (FIRST_ARG_REGNUM + FRV_NUM_ARG_REGS - 1)/* Registers used by the exception handling functions. These should be registers that are not otherwise used by the calling sequence. */#define FIRST_EH_REGNUM 14#define LAST_EH_REGNUM 15/* Scratch registers used in the prologue, epilogue and thunks. OFFSET_REGNO is for loading constant addends that are too big for a single instruction. TEMP_REGNO is used for transferring SPRs to and from the stack, and various other activities. */#define OFFSET_REGNO 4#define TEMP_REGNO 5/* Registers used in the prologue. OLD_SP_REGNO is the old stack pointer, which is sometimes used to set up the frame pointer. */#define OLD_SP_REGNO 6/* Registers used in the epilogue. STACKADJ_REGNO stores the exception handler's stack adjustment. */#define STACKADJ_REGNO 6/* Registers used in thunks. JMP_REGNO is used for loading the target address. */#define JUMP_REGNO 6#define EH_RETURN_DATA_REGNO(N) ((N) <= (LAST_EH_REGNUM - FIRST_EH_REGNUM)? \ (N) + FIRST_EH_REGNUM : INVALID_REGNUM)#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (SImode, STACKADJ_REGNO)#define EH_RETURN_HANDLER_RTX RETURN_ADDR_RTX (0, frame_pointer_rtx)#define EPILOGUE_USES(REGNO) ((REGNO) == LR_REGNO)/* An initializer that says which registers are used for fixed purposes all throughout the compiled code and are therefore not available for general allocation. These would include the stack pointer, the frame pointer (except on machines where that can be used as a general register when no frame pointer is needed), the program counter on machines where that is considered one of the addressable registers, and any other numbered register with a standard use. This information is expressed as a sequence of numbers, separated by commas and surrounded by braces. The Nth number is 1 if register N is fixed, 0 otherwise. The table initialized from this macro, and the table initialized by the following one, may be overridden at run time either automatically, by the actions of the macro `CONDITIONAL_REGISTER_USAGE', or by the user with the command options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. *//* gr0 -- Hard Zero gr1 -- Stack Pointer gr2 -- Frame Pointer gr3 -- Hidden Parameter gr16 -- Small Data reserved gr17 -- Pic reserved gr28 -- OS reserved gr29 -- OS reserved gr30 -- OS reserved gr31 -- OS reserved cr3 -- reserved to reload FCC registers. cr7 -- reserved to reload ICC registers. */#define FIXED_REGISTERS \{ /* Integer Registers */ \ 1, 1, 1, 1, 0, 0, 0, 0, /* 000-007, gr0 - gr7 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 008-015, gr8 - gr15 */ \ 1, 1, 0, 0, 0, 0, 0, 0, /* 016-023, gr16 - gr23 */ \ 0, 0, 0, 0, 1, 1, 1, 1, /* 024-031, gr24 - gr31 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 032-039, gr32 - gr39 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 040-040, gr48 - gr47 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 048-055, gr48 - gr55 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 056-063, gr56 - gr63 */ \ /* Float Registers */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 064-071, fr0 - fr7 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 072-079, fr8 - fr15 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 080-087, fr16 - fr23 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 088-095, fr24 - fr31 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 096-103, fr32 - fr39 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 104-111, fr48 - fr47 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 112-119, fr48 - fr55 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 120-127, fr56 - fr63 */ \ /* Condition Code Registers */ \ 0, 0, 0, 0, /* 128-131, fcc0 - fcc3 */ \ 0, 0, 0, 1, /* 132-135, icc0 - icc3 */ \ /* Conditional execution Registers (CCR) */ \ 0, 0, 0, 0, 0, 0, 0, 1, /* 136-143, cr0 - cr7 */ \ /* Accumulators */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 144-151, acc0 - acc7 */ \ 1, 1, 1, 1, /* 152-155, acc8 - acc11 */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 156-163, accg0 - accg7 */ \ 1, 1, 1, 1, /* 164-167, accg8 - accg11 */ \ /* Other registers */ \ 1, /* 168, AP - fake arg ptr */ \ 0, /* 169, LR - Link register*/ \ 0, /* 170, LCR - Loop count reg*/ \ 1, 1 /* 171-172, iacc0 */ \}/* Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in general) by function calls as well as for fixed registers. This macro therefore identifies the registers that are not available for general allocation of values that must live across function calls. If a register has 0 in `CALL_USED_REGISTERS', the compiler automatically saves it on function entry and restores it on function exit, if the register is used within the function. */#define CALL_USED_REGISTERS \{ /* Integer Registers */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 000-007, gr0 - gr7 */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 008-015, gr8 - gr15 */ \ 1, 1, 0, 0, 0, 0, 0, 0, /* 016-023, gr16 - gr23 */ \ 0, 0, 0, 0, 1, 1, 1, 1, /* 024-031, gr24 - gr31 */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 032-039, gr32 - gr39 */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 040-040, gr48 - gr47 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 048-055, gr48 - gr55 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 056-063, gr56 - gr63 */ \ /* Float Registers */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 064-071, fr0 - fr7 */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 072-079, fr8 - fr15 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 080-087, fr16 - fr23 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 088-095, fr24 - fr31 */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 096-103, fr32 - fr39 */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 104-111, fr48 - fr47 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 112-119, fr48 - fr55 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* 120-127, fr56 - fr63 */ \ /* Condition Code Registers */ \ 1, 1, 1, 1, /* 128-131, fcc0 - fcc3 */ \ 1, 1, 1, 1, /* 132-135, icc0 - icc3 */ \ /* Conditional execution Registers (CCR) */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 136-143, cr0 - cr7 */ \ /* Accumulators */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 144-151, acc0 - acc7 */ \ 1, 1, 1, 1, /* 152-155, acc8 - acc11 */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* 156-163, accg0 - accg7 */ \ 1, 1, 1, 1, /* 164-167, accg8 - accg11 */ \ /* Other registers */ \ 1, /* 168, AP - fake arg ptr */ \ 1, /* 169, LR - Link register*/ \ 1, /* 170, LCR - Loop count reg */ \ 1, 1 /* 171-172, iacc0 */ \}/* Zero or more C statements that may conditionally modify two variables `fixed_regs' and `call_used_regs' (both of type `char []') after they have been initialized from the two preceding macros. This is necessary in case the fixed or call-clobbered registers depend on target flags. You need not define this macro if it has no work to do. If the usage of an entire class of registers depends on the target flags, you may indicate this to GCC by using this macro to modify `fixed_regs' and `call_used_regs' to 1 for each of the registers in the classes which should not be used by GCC. Also define the macro `REG_CLASS_FROM_LETTER' to return `NO_REGS' if it is called with a letter for a class that shouldn't be used. (However, if this class is not included in `GENERAL_REGS' and all of the insn patterns whose constraints permit this class are controlled by target switches, then GCC will automatically avoid using these registers when the target switches are opposed to them.) */#define CONDITIONAL_REGISTER_USAGE frv_conditional_register_usage ()/* Order of allocation of registers. *//* If defined, an initializer for a vector of integers, containing the numbers of hard registers in the order in which GCC should prefer to use them (from most preferred to least). If this macro is not defined, registers are used lowest numbered first (all else being equal). One use of this macro is on machines where the highest numbered registers must always be saved and the save-multiple-registers instruction supports only sequences of consecutive registers. On such machines, define `REG_ALLOC_ORDER' to be an initializer that lists the highest numbered allocatable register first. *//* On the FRV, allocate GR16 and GR17 after other saved registers so that we have a better chance of allocating 2 registers at a time and can use the double word load/store instructions in the prologue. */#define REG_ALLOC_ORDER \{ \ /* volatile registers */ \ GPR_FIRST + 4, GPR_FIRST + 5, GPR_FIRST + 6, GPR_FIRST + 7, \ GPR_FIRST + 8, GPR_FIRST + 9, GPR_FIRST + 10, GPR_FIRST + 11, \ GPR_FIRST + 12, GPR_FIRST + 13, GPR_FIRST + 14, GPR_FIRST + 15, \ GPR_FIRST + 32, GPR_FIRST + 33, GPR_FIRST + 34, GPR_FIRST + 35, \ GPR_FIRST + 36, GPR_FIRST + 37, GPR_FIRST + 38, GPR_FIRST + 39, \ GPR_FIRST + 40, GPR_FIRST + 41, GPR_FIRST + 42, GPR_FIRST + 43, \ GPR_FIRST + 44, GPR_FIRST + 45, GPR_FIRST + 46, GPR_FIRST + 47, \ \ FPR_FIRST + 0, FPR_FIRST + 1, FPR_FIRST + 2, FPR_FIRST + 3, \ FPR_FIRST + 4, FPR_FIRST + 5, FPR_FIRST + 6, FPR_FIRST + 7, \ FPR_FIRST + 8, FPR_FIRST + 9, FPR_FIRST + 10, FPR_FIRST + 11, \ FPR_FIRST + 12, FPR_FIRST + 13, FPR_FIRST + 14, FPR_FIRST + 15, \ FPR_FIRST + 32, FPR_FIRST + 33, FPR_FIRST + 34, FPR_FIRST + 35, \ FPR_FIRST + 36, FPR_FIRST + 37, FPR_FIRST + 38, FPR_FIRST + 39, \ FPR_FIRST + 40, FPR_FIRST + 41, FPR_FIRST + 42, FPR_FIRST + 43, \ FPR_FIRST + 44, FPR_FIRST + 45, FPR_FIRST + 46, FPR_FIRST + 47, \ \ ICC_FIRST + 0, ICC_FIRST + 1, ICC_FIRST + 2, ICC_FIRST + 3, \ FCC_FIRST + 0, FCC_FIRST + 1, FCC_FIRST + 2, FCC_FIRST + 3, \ CR_FIRST + 0, CR_FIRST + 1, CR_FIRST + 2, CR_FIRST + 3, \ CR_FIRST + 4, CR_FIRST + 5, CR_FIRST + 6, CR_FIRST + 7, \ \ /* saved registers */ \ GPR_FIRST + 18, GPR_FIRST + 19, \ GPR_FIRST + 20, GPR_FIRST + 21, GPR_FIRST + 22, GPR_FIRST + 23, \ GPR_FIRST + 24, GPR_FIRST + 25, GPR_FIRST + 26, GPR_FIRST + 27, \ GPR_FIRST + 48, GPR_FIRST + 49, GPR_FIRST + 50, GPR_FIRST + 51, \ GPR_FIRST + 52, GPR_FIRST + 53, GPR_FIRST + 54, GPR_FIRST + 55, \ GPR_FIRST + 56, GPR_FIRST + 57, GPR_FIRST + 58, GPR_FIRST + 59, \ GPR_FIRST + 60, GPR_FIRST + 61, GPR_FIRST + 62, GPR_FIRST + 63, \ GPR_FIRST + 16, GPR_FIRST + 17, \ \ FPR_FIRST + 16, FPR_FIRST + 17, FPR_FIRST + 18, FPR_FIRST + 19, \ FPR_FIRST + 20, FPR_FIRST + 21, FPR_FIRST + 22, FPR_FIRST + 23, \ FPR_FIRST + 24, FPR_FIRST + 25, FPR_FIRST + 26, FPR_FIRST + 27, \ FPR_FIRST + 28, FPR_FIRST + 29, FPR_FIRST + 30, FPR_FIRST + 31, \ FPR_FIRST + 48, FPR_FIRST + 49, FPR_FIRST + 50, FPR_FIRST + 51, \ FPR_FIRST + 52, FPR_FIRST + 53, FPR_FIRST + 54, FPR_FIRST + 55, \ FPR_FIRST + 56, FPR_FIRST + 57, FPR_FIRST + 58, FPR_FIRST + 59, \ FPR_FIRST + 60, FPR_FIRST + 61, FPR_FIRST + 62, FPR_FIRST + 63, \ \ /* special or fixed registers */ \ GPR_FIRST + 0, GPR_FIRST + 1, GPR_FIRST + 2, GPR_FIRST + 3, \ GPR_FIRST + 28, GPR_FIRST + 29, GPR_FIRST + 30, GPR_FIRST + 31, \ ACC_FIRST + 0, ACC_FIRST + 1, ACC_FIRST + 2, ACC_FIRST + 3, \ ACC_FIRST + 4, ACC_FIRST + 5, ACC_FIRST + 6, ACC_FIRST + 7, \ ACC_FIRST + 8, ACC_FIRST + 9, ACC_FIRST + 10, ACC_FIRST + 11, \ ACCG_FIRST + 0, ACCG_FIRST + 1, ACCG_FIRST + 2, ACCG_FIRST + 3, \ ACCG_FIRST + 4, ACCG_FIRST + 5, ACCG_FIRST + 6, ACCG_FIRST + 7, \ ACCG_FIRST + 8, ACCG_FIRST + 9, ACCG_FIRST + 10, ACCG_FIRST + 11, \ AP_FIRST, LR_REGNO, LCR_REGNO, \ IACC_FIRST + 0, IACC_FIRST + 1 \}/* How Values Fit in Registers. *//* A C expression for the number of consecutive hard registers, starting at register number REGNO, required to hold a value of mode MODE. On a machine where all registers are exactly one word, a suitable definition of this macro is #define HARD_REGNO_NREGS(REGNO, MODE) \ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -