📄 m88k.h
字号:
&& (GET_CODE (XEXP (ADDR, 0)) == MULT \ || GET_CODE (XEXP (ADDR, 1)) == MULT))/* Can the reference to X be made short? */#define SHORT_ADDRESS_P(X,TEMP) \ ((TEMP) = (GET_CODE (X) == CONST ? get_related_value (X) : X), \ ((TEMP) && GET_CODE (TEMP) == SYMBOL_REF && SYMBOL_REF_FLAG (TEMP)))/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression that wants to use this address. On the m88000, a legitimate address has the form REG, REG+REG, REG+SMALLINT, REG+(REG*modesize) (REG[REG]), or SMALLINT. The register elimination process should deal with the argument pointer and frame pointer changing to REG+SMALLINT. */#define LEGITIMATE_INDEX_P(X, MODE) \ ((GET_CODE (X) == CONST_INT \ && SMALL_INT (X)) \ || (REG_P (X) \ && REG_OK_FOR_INDEX_P (X)) \ || (GET_CODE (X) == MULT \ && REG_P (XEXP (X, 0)) \ && REG_OK_FOR_INDEX_P (XEXP (X, 0)) \ && GET_CODE (XEXP (X, 1)) == CONST_INT \ && INTVAL (XEXP (X, 1)) == GET_MODE_SIZE (MODE)))#define RTX_OK_FOR_BASE_P(X) \ ((GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ || (GET_CODE (X) == SUBREG \ && GET_CODE (SUBREG_REG (X)) == REG \ && REG_OK_FOR_BASE_P (SUBREG_REG (X))))#define RTX_OK_FOR_INDEX_P(X) \ ((GET_CODE (X) == REG && REG_OK_FOR_INDEX_P (X)) \ || (GET_CODE (X) == SUBREG \ && GET_CODE (SUBREG_REG (X)) == REG \ && REG_OK_FOR_INDEX_P (SUBREG_REG (X))))#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \{ \ register rtx _x; \ if (REG_P (X)) \ { \ if (REG_OK_FOR_BASE_P (X)) \ goto ADDR; \ } \ else if (GET_CODE (X) == PLUS) \ { \ register rtx _x0 = XEXP (X, 0); \ register rtx _x1 = XEXP (X, 1); \ if ((flag_pic \ && _x0 == pic_offset_table_rtx \ && (flag_pic == 2 \ ? RTX_OK_FOR_BASE_P (_x1) \ : (GET_CODE (_x1) == SYMBOL_REF \ || GET_CODE (_x1) == LABEL_REF))) \ || (REG_P (_x0) \ && (REG_OK_FOR_BASE_P (_x0) \ && LEGITIMATE_INDEX_P (_x1, MODE))) \ || (REG_P (_x1) \ && (REG_OK_FOR_BASE_P (_x1) \ && LEGITIMATE_INDEX_P (_x0, MODE)))) \ goto ADDR; \ } \ else if (GET_CODE (X) == LO_SUM) \ { \ register rtx _x0 = XEXP (X, 0); \ register rtx _x1 = XEXP (X, 1); \ if (((REG_P (_x0) \ && REG_OK_FOR_BASE_P (_x0)) \ || (GET_CODE (_x0) == SUBREG \ && REG_P (SUBREG_REG (_x0)) \ && REG_OK_FOR_BASE_P (SUBREG_REG (_x0)))) \ && CONSTANT_P (_x1)) \ goto ADDR; \ } \ else if (GET_CODE (X) == CONST_INT \ && SMALL_INT (X)) \ goto ADDR; \ else if (SHORT_ADDRESS_P (X, _x)) \ goto ADDR; \}/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. We have two alternate definitions for each of them. The usual definition accepts all pseudo regs; the other rejects them unless they have been allocated suitable hard regs. The symbol REG_OK_STRICT causes the latter definition to be used. Most source files want to accept pseudo regs in the hope that they will get allocated to the class that the insn wants them to be in. Source files for reload pass need to be strict. After reload, it makes no difference, since pseudo regs have been eliminated by then. */#ifndef REG_OK_STRICT/* Nonzero if X is a hard reg that can be used as an index or if it is a pseudo reg. Not the argument pointer. */#define REG_OK_FOR_INDEX_P(X) \ (!XRF_REGNO_P(REGNO (X)))/* Nonzero if X is a hard reg that can be used as a base reg or if it is a pseudo reg. */#define REG_OK_FOR_BASE_P(X) (REG_OK_FOR_INDEX_P (X))#else/* Nonzero if X is a hard reg that can be used as an index. */#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))/* Nonzero if X is a hard reg that can be used as a base reg. */#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))#endif/* Try machine-dependent ways of modifying an illegitimate address to be legitimate. If we find one, return the new, valid address. This macro is used in only one place: `memory_address' in explow.c. OLDX is the address as it was before break_out_memory_refs was called. In some cases it is useful to look at this to decide what needs to be done. MODE and WIN are passed so that this macro can use GO_IF_LEGITIMATE_ADDRESS. It is always safe for this macro to do nothing. It exists to recognize opportunities to optimize the output. *//* On the m88000, change REG+N into REG+REG, and REG+(X*Y) into REG+REG. */#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \{ \ if (GET_CODE (X) == PLUS && CONSTANT_ADDRESS_P (XEXP (X, 1))) \ (X) = gen_rtx (PLUS, SImode, XEXP (X, 0), \ copy_to_mode_reg (SImode, XEXP (X, 1))); \ if (GET_CODE (X) == PLUS && CONSTANT_ADDRESS_P (XEXP (X, 0))) \ (X) = gen_rtx (PLUS, SImode, XEXP (X, 1), \ copy_to_mode_reg (SImode, XEXP (X, 0))); \ if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == MULT) \ (X) = gen_rtx (PLUS, SImode, XEXP (X, 1), \ force_operand (XEXP (X, 0), 0)); \ if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == MULT) \ (X) = gen_rtx (PLUS, SImode, XEXP (X, 0), \ force_operand (XEXP (X, 1), 0)); \ if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == PLUS) \ (X) = gen_rtx (PLUS, Pmode, force_operand (XEXP (X, 0), NULL_RTX),\ XEXP (X, 1)); \ if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == PLUS) \ (X) = gen_rtx (PLUS, Pmode, XEXP (X, 0), \ force_operand (XEXP (X, 1), NULL_RTX)); \ if (GET_CODE (X) == SYMBOL_REF || GET_CODE (X) == CONST \ || GET_CODE (X) == LABEL_REF) \ (X) = legitimize_address (flag_pic, X, 0, 0); \ if (memory_address_p (MODE, X)) \ goto WIN; }/* Go to LABEL if ADDR (a legitimate address expression) has an effect that depends on the machine mode it is used for. On the m88000 this is never true. */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)/* Nonzero if the constant value X is a legitimate general operand. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */#define LEGITIMATE_CONSTANT_P(X) (1)/* Define this, so that when PIC, reload won't try to reload invalid addresses which require two reload registers. */#define LEGITIMATE_PIC_OPERAND_P(X) (! pic_address_needs_scratch (X))/*** Condition Code Information ***//* C code for a data type which is used for declaring the `mdep' component of `cc_status'. It defaults to `int'. *//* #define CC_STATUS_MDEP int *//* A C expression to initialize the `mdep' field to "empty". *//* #define CC_STATUS_MDEP_INIT (cc_status.mdep = 0) *//* Macro to zap the normal portions of CC_STATUS, but leave the machine dependent parts (ie, literal synthesis) alone. *//* #define CC_STATUS_INIT_NO_MDEP \ (cc_status.flags = 0, cc_status.value1 = 0, cc_status.value2 = 0) *//* When using a register to hold the condition codes, the cc_status mechanism cannot be used. */#define NOTICE_UPDATE_CC(EXP, INSN) (0)/*** Miscellaneous Parameters ***//* Define the codes that are matched by predicates in m88k.c. */#define PREDICATE_CODES \ {"move_operand", {SUBREG, REG, CONST_INT, LO_SUM, MEM}}, \ {"call_address_operand", {SUBREG, REG, SYMBOL_REF, LABEL_REF, CONST}}, \ {"arith_operand", {SUBREG, REG, CONST_INT}}, \ {"arith5_operand", {SUBREG, REG, CONST_INT}}, \ {"arith32_operand", {SUBREG, REG, CONST_INT}}, \ {"arith64_operand", {SUBREG, REG, CONST_INT}}, \ {"int5_operand", {CONST_INT}}, \ {"int32_operand", {CONST_INT}}, \ {"add_operand", {SUBREG, REG, CONST_INT}}, \ {"reg_or_bbx_mask_operand", {SUBREG, REG, CONST_INT}}, \ {"real_or_0_operand", {SUBREG, REG, CONST_DOUBLE}}, \ {"reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \ {"relop", {EQ, NE, LT, LE, GE, GT, LTU, LEU, GEU, GTU}}, \ {"even_relop", {EQ, LT, GT, LTU, GTU}}, \ {"odd_relop", { NE, LE, GE, LEU, GEU}}, \ {"partial_ccmode_register_operand", { SUBREG, REG}}, \ {"relop_no_unsigned", {EQ, NE, LT, LE, GE, GT}}, \ {"equality_op", {EQ, NE}}, \ {"pc_or_label_ref", {PC, LABEL_REF}},/* The case table contains either words or branch instructions. This says which. We always claim that the vector is PC-relative. It is position independent when -fpic is used. */#define CASE_VECTOR_INSNS (TARGET_88100 || flag_pic)/* An alias for a machine mode name. This is the machine mode that elements of a jump-table should have. */#define CASE_VECTOR_MODE SImode/* Define as C expression which evaluates to nonzero if the tablejump instruction expects the table to contain offsets from the address of the table. Do not define this if the table should contain absolute addresses. */#define CASE_VECTOR_PC_RELATIVE 1/* Define this if control falls through a `case' insn when the index value is out of range. This means the specified default-label is actually ignored by the `case' insn proper. *//* #define CASE_DROPS_THROUGH *//* Define this to be the smallest number of different values for which it is best to use a jump-table instead of a tree of conditional branches. The default is 4 for machines with a casesi instruction and 5 otherwise. The best 88110 number is around 7, though the exact number isn't yet known. A third alternative for the 88110 is to use a binary tree of bb1 instructions on bits 2/1/0 if the range is dense. This may not win very much though. */#define CASE_VALUES_THRESHOLD (TARGET_88100 ? 4 : 7)/* Specify the tree operation to be used to convert reals to integers. */#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR/* This is the kind of divide that is easiest to do in the general case. */#define EASY_DIV_EXPR TRUNC_DIV_EXPR/* Define this as 1 if `char' should by default be signed; else as 0. */#define DEFAULT_SIGNED_CHAR 1/* The 88open ABI says size_t is unsigned int. */#define SIZE_TYPE "unsigned int"/* Allow and ignore #sccs directives */#define SCCS_DIRECTIVE/* Handle #pragma pack and sometimes #pragma weak. */#define HANDLE_SYSV_PRAGMA/* Tell when to handle #pragma weak. This is only done for V.4. */#define SUPPORTS_WEAK TARGET_SVR4#define SUPPORTS_ONE_ONLY TARGET_SVR4/* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */#define MOVE_MAX 8/* Define if normal loads of shorter-than-word items from memory clears the rest of the bigs in the register. */#define BYTE_LOADS_ZERO_EXTEND/* Zero if access to memory by bytes is faster. */#define SLOW_BYTE_ACCESS 1/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits is done just by pretending it is already truncated. */#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1/* Define this if addresses of constant functions shouldn't be put through pseudo regs where they can be cse'd. Desirable on machines where ordinary constants are expensive but a CALL with constant address is cheap. */#define NO_FUNCTION_CSE/* Define this macro if an argument declared as `char' or `short' in a prototype should actually be passed as an `int'. In addition to avoiding errors in certain cases of mismatch, it also makes for better code on certain machines. */#define PROMOTE_PROTOTYPES/* Define this macro if a float function always returns float (even in traditional mode). Redefined in luna.h. */#define TRADITIONAL_RETURN_FLOAT/* We assume that the store-condition-codes instructions store 0 for false and some other value for true. This is the value stored for true. */#define STORE_FLAG_VALUE -1/* Specify the machine mode that pointers have. After generation of rtl, the compiler makes no further distinction between pointers and any other objects of this machine mode. */#define Pmode SImode/* A function address in a call instruction is a word address (for indexing purposes) so give the MEM rtx word mode. */#define FUNCTION_MODE SImode/* A barrier will be aligned so account for the possible expansion. A volatile load may be preceded by a serializing instruction. Account for profiling code output at NOTE_INSN
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -