⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sh.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
#define ELIMINABLE_REGS						\{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM},			\ { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM},	\ { RETURN_ADDRESS_POINTER_REGNUM, FRAME_POINTER_REGNUM},	\ { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM},			\ { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM},}/* Given FROM and TO register numbers, say whether this elimination   is allowed.  */#define CAN_ELIMINATE(FROM, TO) \  (!((FROM) == FRAME_POINTER_REGNUM && FRAME_POINTER_REQUIRED))/* Define the offset between two registers, one to be eliminated, and the other   its replacement, at the start of a routine.  */#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \  OFFSET = initial_elimination_offset ((FROM), (TO))/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM	AP_REG/* Register in which the static-chain is passed to a function.  */#define STATIC_CHAIN_REGNUM	(TARGET_SH5 ? 1 : 3)/* Don't default to pcc-struct-return, because we have already specified   exactly how to return structures in the TARGET_RETURN_IN_MEMORY   target hook.  */#define DEFAULT_PCC_STRUCT_RETURN 0#define SHMEDIA_REGS_STACK_ADJUST() \  (TARGET_SHCOMPACT && current_function_has_nonlocal_label \   ? (8 * (/* r28-r35 */ 8 + /* r44-r59 */ 16 + /* tr5-tr7 */ 3) \      + (TARGET_FPU_ANY ? 4 * (/* fr36 - fr63 */ 28) : 0)) \   : 0)/* 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 SH has two sorts of general registers, R0 and the rest.  R0 can   be used as the destination of some of the arithmetic ops. There are   also some special purpose registers; the T bit register, the   Procedure Return Register and the Multiply Accumulate Registers.  *//* Place GENERAL_REGS after FPUL_REGS so that it will be preferred by   reg_class_subunion.  We don't want to have an actual union class   of these, because it would only be used when both classes are calculated   to give the same cost, but there is only one FPUL register.   Besides, regclass fails to notice the different REGISTER_MOVE_COSTS   applying to the actual instruction alternative considered.  E.g., the   y/r alternative of movsi_ie is considered to have no more cost that   the r/r alternative, which is patently untrue.  */enum reg_class{  NO_REGS,  R0_REGS,  PR_REGS,  T_REGS,  MAC_REGS,  FPUL_REGS,  SIBCALL_REGS,  GENERAL_REGS,  FP0_REGS,  FP_REGS,  DF_HI_REGS,  DF_REGS,  FPSCR_REGS,  GENERAL_FP_REGS,  TARGET_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",		\  "R0_REGS",		\  "PR_REGS",		\  "T_REGS",		\  "MAC_REGS",		\  "FPUL_REGS",		\  "SIBCALL_REGS",	\  "GENERAL_REGS",	\  "FP0_REGS",		\  "FP_REGS",		\  "DF_HI_REGS",		\  "DF_REGS",		\  "FPSCR_REGS",		\  "GENERAL_FP_REGS",	\  "TARGET_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						\{									\/* NO_REGS:  */								\  { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },	\/* R0_REGS:  */								\  { 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },	\/* PR_REGS:  */								\  { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00040000 },	\/* T_REGS:  */								\  { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00080000 },	\/* MAC_REGS:  */							\  { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00300000 },	\/* FPUL_REGS:  */							\  { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00400000 },	\/* SIBCALL_REGS: Initialized in CONDITIONAL_REGISTER_USAGE.  */	\  { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },	\/* GENERAL_REGS:  */							\  { 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x01020000 },	\/* FP0_REGS:  */							\  { 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000 },	\/* FP_REGS:  */								\  { 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000 },	\/* DF_HI_REGS:  Initialized in CONDITIONAL_REGISTER_USAGE.  */		\  { 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x0000ff00 },	\/* DF_REGS:  */								\  { 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x0000ff00 },	\/* FPSCR_REGS:  */							\  { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00800000 },	\/* GENERAL_FP_REGS:  */							\  { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0102ff00 },	\/* TARGET_REGS:  */							\  { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff },	\/* ALL_REGS:  */							\  { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x01ffffff },	\}/* 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.  */extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];#define REGNO_REG_CLASS(REGNO) regno_reg_class[(REGNO)]/* When defined, the compiler allows registers explicitly used in the   rtl to be used as spill registers but prevents the compiler from   extending the lifetime of these registers.  */#define SMALL_REGISTER_CLASSES (! TARGET_SHMEDIA)/* The order in which register should be allocated.  *//* Sometimes FP0_REGS becomes the preferred class of a floating point pseudo,   and GENERAL_FP_REGS the alternate class.  Since FP0 is likely to be   spilled or used otherwise, we better have the FP_REGS allocated first.  */#define REG_ALLOC_ORDER \  {/* Caller-saved FPRs */ \    65, 66, 67, 68, 69, 70, 71, 64, \    72, 73, 74, 75, 80, 81, 82, 83, \    84, 85, 86, 87, 88, 89, 90, 91, \    92, 93, 94, 95, 96, 97, 98, 99, \   /* Callee-saved FPRs */ \    76, 77, 78, 79,100,101,102,103, \   104,105,106,107,108,109,110,111, \   112,113,114,115,116,117,118,119, \   120,121,122,123,124,125,126,127, \   136,137,138,139,140,141,142,143, \   /* FPSCR */ 151, \   /* Caller-saved GPRs (except 8/9 on SH1-4) */ \     1,  2,  3,  7,  6,  5,  4,  0, \     8,  9, 17, 19, 20, 21, 22, 23, \    36, 37, 38, 39, 40, 41, 42, 43, \    60, 61, 62, \   /* SH1-4 callee-saved saved GPRs / SH5 partially-saved GPRs */ \    10, 11, 12, 13, 14, 18, \    /* SH5 callee-saved GPRs */ \    28, 29, 30, 31, 32, 33, 34, 35, \    44, 45, 46, 47, 48, 49, 50, 51, \    52, 53, 54, 55, 56, 57, 58, 59, \   /* FPUL */ 150, \   /* SH5 branch target registers */ \   128,129,130,131,132,133,134,135, \   /* Fixed registers */ \    15, 16, 24, 25, 26, 27, 63,144, \   145,146,147,148,149,152 }/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS  (TARGET_SHMEDIA ? GENERAL_REGS : R0_REGS)#define BASE_REG_CLASS	 GENERAL_REGS/* Get reg_class from a letter such as appears in the machine   description.  */extern enum reg_class reg_class_from_letter[];/* We might use 'Rxx' constraints in the future for exotic reg classes.*/#define REG_CLASS_FROM_CONSTRAINT(C, STR) \  (ISLOWER (C) ? reg_class_from_letter[(C)-'a'] : NO_REGS )/* Overview of uppercase letter constraints:   A: Addresses (constraint len == 3)    Ac4: sh4 cache operations    Ac5: sh5 cache operations   Bxx: miscellaneous constraints    Bsc: SCRATCH - for the scratch register in movsi_ie in the	 fldi0 / fldi0 cases   C: Constants other than only CONST_INT (constraint len == 3)    C16: 16 bit constant, literal or symbolic    Csy: label or symbol    Cpg: non-explicit constants that can be directly loaded into a general	 purpose register in PIC code.  like 's' except we don't allow	 PIC_DIRECT_ADDR_P   IJKLMNOP: CONT_INT constants    Ixx: signed xx bit    J16: 0xffffffff00000000 | 0x00000000ffffffff    Kxx: unsigned xx bit    M: 1    N: 0    P27: 1 | 2 | 8 | 16   Q: pc relative load operand   Rxx: reserved for exotic register classes.   S: extra memory (storage) constraints (constraint len == 3)    Sua: unaligned memory operations   W: vector   Z: zero in any mode   unused CONST_INT constraint letters: LO   unused EXTRA_CONSTRAINT letters: D T U Y */#if 1 /* check that the transition went well.  */#define CONSTRAINT_LEN(C,STR) \  (((C) == 'L' || (C) == 'O' || (C) == 'D' || (C) == 'T' || (C) == 'U' \    || (C) == 'Y' \    || ((C) == 'I' \        && (((STR)[1] != '0' && (STR)[1] != '1' && (STR)[1] != '2') \	    || (STR)[2] < '0' || (STR)[2] > '9')) \    || ((C) == 'B' && ((STR)[1] != 's' || (STR)[2] != 'c')) \    || ((C) == 'J' && ((STR)[1] != '1' || (STR)[2] != '6')) \    || ((C) == 'K' && ((STR)[1] != '0' || (STR)[2] != '8')) \    || ((C) == 'P' && ((STR)[1] != '2' || (STR)[2] != '7'))) \   ? -1 \   : ((C) == 'A' || (C) == 'B' || (C) == 'C' \      || (C) == 'I' || (C) == 'J' || (C) == 'K' || (C) == 'P' \      || (C) == 'R' || (C) == 'S') \   ? 3 \   : DEFAULT_CONSTRAINT_LEN ((C), (STR)))#else#define CONSTRAINT_LEN(C,STR) \  (((C) == 'A' || (C) == 'B' || (C) == 'C' \    || (C) == 'I' || (C) == 'J' || (C) == 'K' || (C) == 'P' \    || (C) == 'R' || (C) == 'S') \   ? 3 : DEFAULT_CONSTRAINT_LEN ((C), (STR)))#endif/* 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.	I08: arithmetic operand -127..128, as used in add, sub, etc	I16: arithmetic operand -32768..32767, as used in SHmedia movi and shori	P27: shift operand 1,2,8 or 16	K08: logical operand 0..255, as used in and, or, etc.	M: constant 1	N: constant 0	I06: arithmetic operand -32..31, as used in SHmedia beqi, bnei and xori	I10: arithmetic operand -512..511, as used in SHmedia andi, ori*/#define CONST_OK_FOR_I06(VALUE) (((HOST_WIDE_INT)(VALUE)) >= -32 \				 && ((HOST_WIDE_INT)(VALUE)) <= 31)#define CONST_OK_FOR_I08(VALUE) (((HOST_WIDE_INT)(VALUE))>= -128 \				 && ((HOST_WIDE_INT)(VALUE)) <= 127)#define CONST_OK_FOR_I10(VALUE) (((HOST_WIDE_INT)(VALUE)) >= -512 \				 && ((HOST_WIDE_INT)(VALUE)) <= 511)#define CONST_OK_FOR_I16(VALUE) (((HOST_WIDE_INT)(VALUE)) >= -32768 \				 && ((HOST_WIDE_INT)(VALUE)) <= 32767)#define CONST_OK_FOR_I20(VALUE) (((HOST_WIDE_INT)(VALUE)) >= -524288 \				 && ((HOST_WIDE_INT)(VALUE)) <= 524287 \				 && TARGET_SH2A)#define CONST_OK_FOR_I(VALUE, STR) \  ((STR)[1] == '0' && (STR)[2] == 6 ? CONST_OK_FOR_I06 (VALUE) \   : (STR)[1] == '0' && (STR)[2] == '8' ? CONST_OK_FOR_I08 (VALUE) \   : (STR)[1] == '1' && (STR)[2] == '0' ? CONST_OK_FOR_I10 (VALUE) \   : (STR)[1] == '1' && (STR)[2] == '6' ? CONST_OK_FOR_I16 (VALUE) \   : (STR)[1] == '2' && (STR)[2] == '0' ? CONST_OK_FOR_I20 (VALUE) \   : 0)#define CONST_OK_FOR_J16(VALUE) \  ((HOST_BITS_PER_WIDE_INT >= 64 && (VALUE) == (HOST_WIDE_INT) 0xffffffff) \   || (HOST_BITS_PER_WIDE_INT >= 64 && (VALUE) == (HOST_WIDE_INT) -1 << 32))#define CONST_OK_FOR_J(VALUE, STR) \  ((STR)[1] == '1' && (STR)[2] == '6' ? CONST_OK_FOR_J16 (VALUE) \   : 0)#define CONST_OK_FOR_K08(VALUE) (((HOST_WIDE_INT)(VALUE))>= 0 \				 && ((HOST_WIDE_INT)(VALUE)) <= 255)#define CONST_OK_FOR_K(VALUE, STR) \  ((STR)[1] == '0' && (STR)[2] == '8' ? CONST_OK_FOR_K08 (VALUE) \   : 0)#define CONST_OK_FOR_P27(VALUE) \  ((VALUE)==1||(VALUE)==2||(VALUE)==8||(VALUE)==16)#define CONST_OK_FOR_P(VALUE, STR) \  ((STR)[1] == '2' && (STR)[2] == '7' ? CONST_OK_FOR_P27 (VALUE) \   : 0)#define CONST_OK_FOR_M(VALUE) ((VALUE)==1)#define CONST_OK_FOR_N(VALUE) ((VALUE)==0)#define CONST_OK_FOR_CONSTRAINT_P(VALUE, C, STR)	\     ((C) == 'I' ? CONST_OK_FOR_I ((VALUE), (STR))	\    : (C) == 'J' ? CONST_OK_FOR_J ((VALUE), (STR))	\    : (C) == 'K' ? CONST_OK_FOR_K ((VALUE), (STR))	\    : (C) == 'M' ? CONST_OK_FOR_M (VALUE)		\    : (C) == 'N' ? CONST_OK_FOR_N (VALUE)		\    : (C) == 'P' ? CONST_OK_FOR_P ((VALUE), (STR))	\    : 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' ? (fp_zero_operand (VALUE) && fldi_ok ())	\ : (C) == 'H' ? (fp_one_operand (VALUE) && fldi_ok ())	\ : (C) == 'F')/* Given an rtx X being reloaded into a reg required to be   in class CLASS, return the class of reg to actually use.   In g

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -