📄 pa.h
字号:
rtx base = 0, index; \ if (flag_pic && XEXP (X, 0) == pic_offset_table_rtx)\ { \ if (GET_CODE (XEXP (X, 1)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 1))) \ goto ADDR; \ else if (flag_pic == 1 \ && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)\ goto ADDR; \ } \ else if (REG_P (XEXP (X, 0)) \ && REG_OK_FOR_BASE_P (XEXP (X, 0))) \ base = XEXP (X, 0), index = XEXP (X, 1); \ else if (REG_P (XEXP (X, 1)) \ && REG_OK_FOR_BASE_P (XEXP (X, 1))) \ base = XEXP (X, 1), index = XEXP (X, 0); \ if (base != 0) \ if (GET_CODE (index) == CONST_INT \ && ((INT_14_BITS (index) \ && (TARGET_SOFT_FLOAT \ || ((MODE) != SFmode && (MODE) != DFmode))) \ || INT_5_BITS (index))) \ goto ADDR; \ } \ else if (GET_CODE (X) == LO_SUM \ && GET_CODE (XEXP (X, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && CONSTANT_P (XEXP (X, 1)) \ && (TARGET_SOFT_FLOAT \ || ((MODE) != SFmode \ && (MODE) != DFmode))) \ goto ADDR; \ else if (GET_CODE (X) == LO_SUM \ && GET_CODE (XEXP (X, 0)) == SUBREG \ && GET_CODE (SUBREG_REG (XEXP (X, 0))) == REG\ && REG_OK_FOR_BASE_P (SUBREG_REG (XEXP (X, 0)))\ && CONSTANT_P (XEXP (X, 1)) \ && (TARGET_SOFT_FLOAT \ || ((MODE) != SFmode \ && (MODE) != DFmode))) \ goto ADDR; \ else if (GET_CODE (X) == LABEL_REF \ || (GET_CODE (X) == CONST_INT \ && INT_5_BITS (X))) \ goto ADDR; \ /* Needed for -fPIC */ \ else if (GET_CODE (X) == LO_SUM \ && GET_CODE (XEXP (X, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && GET_CODE (XEXP (X, 1)) == UNSPEC) \ goto ADDR; \}/* 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. */extern struct rtx_def *hppa_legitimize_address ();#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \{ rtx orig_x = (X); \ (X) = hppa_legitimize_address (X, OLDX, MODE); \ if ((X) != orig_x && 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. */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ if (GET_CODE (ADDR) == PRE_DEC \ || GET_CODE (ADDR) == POST_DEC \ || GET_CODE (ADDR) == PRE_INC \ || GET_CODE (ADDR) == POST_INC) \ goto LABEL/* Define this macro if references to a symbol must be treated differently depending on something about the variable or function named by the symbol (such as what section it is in). The macro definition, if any, is executed immediately after the rtl for DECL or other node is created. The value of the rtl will be a `mem' whose address is a `symbol_ref'. The usual thing for this macro to do is to a flag in the `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified name string in the `symbol_ref' (if one bit is not enough information). On the HP-PA we use this to indicate if a symbol is in text or data space. Also, function labels need special treatment. */#define TEXT_SPACE_P(DECL)\ (TREE_CODE (DECL) == FUNCTION_DECL \ || (TREE_CODE (DECL) == VAR_DECL \ && TREE_READONLY (DECL) && ! TREE_SIDE_EFFECTS (DECL) \ && !flag_pic) \ || (*tree_code_type[(int) TREE_CODE (DECL)] == 'c' \ && !(TREE_CODE (DECL) == STRING_CST && flag_writable_strings)))#define FUNCTION_NAME_P(NAME) \(*(NAME) == '@' || (*(NAME) == '*' && *((NAME) + 1) == '@'))#define ENCODE_SECTION_INFO(DECL)\do \ { if (TEXT_SPACE_P (DECL)) \ { rtx _rtl; \ if (TREE_CODE (DECL) == FUNCTION_DECL \ || TREE_CODE (DECL) == VAR_DECL) \ _rtl = DECL_RTL (DECL); \ else \ _rtl = TREE_CST_RTL (DECL); \ SYMBOL_REF_FLAG (XEXP (_rtl, 0)) = 1; \ if (TREE_CODE (DECL) == FUNCTION_DECL) \ hppa_encode_label (XEXP (DECL_RTL (DECL), 0), 0);\ } \ } \while (0)/* Store the user-specified part of SYMBOL_NAME in VAR. This is sort of inverse to ENCODE_SECTION_INFO. */#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \ (VAR) = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*' ? \ 1 + (SYMBOL_NAME)[1] == '@'\ : (SYMBOL_NAME)[0] == '@'))/* Arghh. This is used for stuff in the constant pool; this may include function addresses on the PA, which during PIC code generation must reside in the data space. Unfortunately, there's no way to determine if a particular label in the constant pool refers to a function address. So just force everything into the data space during PIC generation. */#define SELECT_RTX_SECTION(RTX,MODE) \ if (flag_pic) \ data_section (); \ else \ readonly_data_section ();/* Specify the machine mode that this machine uses for the index in the tablejump instruction. */#define CASE_VECTOR_MODE DImode/* Define this 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 */#define CASE_DROPS_THROUGH/* 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/* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */#define MOVE_MAX 8/* Define if operations between registers always perform the operation on the full register even if a narrower mode is specified. */#define WORD_REGISTER_OPERATIONS/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD will either zero-extend or sign-extend. The value of this macro should be the code that says which one of the two operations is implicitly done, NIL if none. */#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND/* Nonzero if access to memory by bytes is slow and undesirable. */#define SLOW_BYTE_ACCESS 1/* Do not break .stabs pseudos into continuations. */#define DBX_CONTIN_LENGTH 0/* 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/* 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/* When a prototype says `char' or `short', really pass an `int'. */#define PROMOTE_PROTOTYPES/* 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/* Add any extra modes needed to represent the condition code. HPPA floating comparisons produce condition codes. */#define EXTRA_CC_MODES CCFPmode/* Define the names for the modes specified above. */#define EXTRA_CC_NAMES "CCFP"/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFPmode should be used. CC_NOOVmode should be used when the first operand is a PLUS, MINUS, or NEG. CCmode should be used when no special processing is needed. */#define SELECT_CC_MODE(OP,X,Y) \ (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT ? CCFPmode : CCmode) \/* A function address in a call instruction is a byte address (for indexing purposes) so give the MEM rtx a byte's mode. */#define FUNCTION_MODE SImode/* 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 to be nonzero if shift instructions ignore all but the low-order few bits. */#define SHIFT_COUNT_TRUNCATED 1/* Use atexit for static constructors/destructors, instead of defining our own exit function. */#define HAVE_ATEXIT/* Compute the cost of computing a constant rtl expression RTX whose rtx-code is CODE. The body of this macro is a portion of a switch statement. If the code is computed here, return it with a return statement. Otherwise, break from the switch. */#define CONST_COSTS(RTX,CODE,OUTER_CODE) \ case CONST_INT: \ if (INTVAL (RTX) == 0) return 0; \ if (INT_14_BITS (RTX)) return 1; \ case HIGH: \ return 2; \ case CONST: \ case LABEL_REF: \ case SYMBOL_REF: \ return 4; \ case CONST_DOUBLE: \ if (RTX == CONST0_RTX (DFmode) || RTX == CONST0_RTX (SFmode)\ && OUTER_CODE != SET) \ return 0; \ else \ return 8;#define ADDRESS_COST(RTX) \ (GET_CODE (RTX) == REG ? 1 : hppa_address_cost (RTX))/* Compute extra cost of moving data between one register class and another. Make moves from SAR so expensive they should never happen. We used to have 0xffff here, but that generates overflow in rare cases. Copies involving a FP register and a non-FP register are relatively expensive because they must go through memory. Other copies are reasonably cheap. */#define REGISTER_MOVE_COST(CLASS1, CLASS2) \ (CLASS1 == SHIFT_REGS ? 0x100 \ : FP_REG_CLASS_P (CLASS1) && ! FP_REG_CLASS_P (CLASS2) ? 16 \ : FP_REG_CLASS_P (CLASS2) && ! FP_REG_CLASS_P (CLASS1) ? 16 \ : 2)/* Provide the costs of a rtl expression. This is in the body of a switch on CODE. The purpose for the cost of MULT is to encourage `synth_mult' to find a synthetic multiply when reasonable. */#define RTX_COSTS(X,CODE,OUTER_CODE) \ case MULT: \ return (TARGET_SNAKE && ! TARGET_DISABLE_FPREGS \ && ! TARGET_SOFT_FLOAT \ ? COSTS_N_INSNS (8) : COSTS_N_INSNS (20)); \ case DIV: \ case UDIV: \ case MOD: \ case UMOD: \ return COSTS_N_INSNS (60); \ case PLUS: \ if (GET_CODE (XEXP (X, 0)) == MULT \ && shadd_operand (XEXP (XEXP (X, 0), 1), VOIDmode)) \ return (2 + rtx_cost (XEXP (XEXP (X, 0), 0), OUTER_CODE) \ + rtx_cost (XEXP (X, 1), OUTER_CODE)); \ break;/* Adjust the cost of dependencies. */#define ADJUST_COST(INSN,LINK,DEP,COST) \ (COST) = pa_adjust_cost (INSN, LINK, DEP, COST)/* Handling the special cases is going to get too complicated for a macro, just call `pa_adjust_insn_length' to do the real work. */#define ADJUST_INSN_LENGTH(INSN, LENGTH) \ LENGTH += pa_adjust_insn_length (INSN, LENGTH);/* Enable a bug fix. (This is for extra caution.) */#define SHORTEN_WITH_ADJUST_INSN_LENGTH/* Millicode insns are actually function calls with some special constraints on arguments and register usage. Millicode calls always expect their arguments in the integer argument registers, and always return their result in %r29 (ret1). They are expected to clobber their arguments, %r1, %r29, and %r31 and nothing else. These macros tell reorg that the references to arguments and register clobbers for millicode calls do not appear to happen until after the millicode call. This allows reorg to put insns which set the argument registers into the delay slot of the millicode call -- thus they act more like traditional CALL_INSNs. get_attr_type will try to recognize the given insn, so make sure to filter out things it will not accept -- SEQUENCE, USE and CLOBBER insns in particular. */#define INSN_SETS_ARE_DELAYED(X) \ ((GET_CODE (X) == INSN \ && GET_CODE (PATTERN (X)) != SEQUENCE \ && GET_CODE (PATTERN (X)) != USE \ && GET_CODE (PATTERN (X)) != CLOBBER \ && get_attr_type (X) == TYPE_MILLI))#define INSN_REFERENCES_ARE_DELAYED(X) \ ((GET_CODE (X) == INSN \ && GET_CODE (PATTERN (X)) != SEQUENCE \ && GET_CODE (PATTERN (X)) != USE \ && GET_CODE (PATTERN (X)) != CLOBBER \ && get_attr_type (X) == TYPE_MILLI))/* Control the assembler format that we output. *//* Output at
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -