📄 alpha.h
字号:
/* 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. On the Alpha, the table is really GP-relative, not relative to the PC of the table, but we pretend that it is PC-relative; this should be OK, but we should try to find some better way sometime. */#define CASE_VECTOR_PC_RELATIVE 1/* Define this as 1 if `char' should by default be signed; else as 0. */#define DEFAULT_SIGNED_CHAR 1/* This flag, if defined, says the same insns that convert to a signed fixnum also convert validly to an unsigned one. We actually lie a bit here as overflow conditions are different. But they aren't being checked anyway. */#define FIXUNS_TRUNC_LIKE_FIX_TRUNC/* Max number of bytes we can move to or from memory in one reasonably fast instruction. */#define MOVE_MAX 8/* If a memory-to-memory move would take MOVE_RATIO or more simple move-instruction pairs, we will do a movstr or libcall instead. Without byte/word accesses, we want no more than four instructions; with, several single byte accesses are better. */#define MOVE_RATIO (TARGET_BWX ? 7 : 2)/* Largest number of bytes of an object that can be placed in a register. On the Alpha we have plenty of registers, so use TImode. */#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TImode)/* Nonzero if access to memory by bytes is no faster than for words. Also non-zero if doing byte operations (specifically shifts) in registers is undesirable. On the Alpha, we want to not use the byte operation and instead use masking operations to access fields; these will save instructions. */#define SLOW_BYTE_ACCESS 1/* 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) ((MODE) == SImode ? SIGN_EXTEND : ZERO_EXTEND)/* Define if loading short immediate values into registers sign extends. */#define SHORT_IMMEDIATES_SIGN_EXTEND/* 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/* Define the value returned by a floating-point comparison instruction. */#define FLOAT_STORE_FLAG_VALUE(MODE) \ REAL_VALUE_ATOF ((TARGET_FLOAT_VAX ? "0.5" : "2.0"), (MODE))/* Canonicalize a comparison from one we don't have to one we do have. */#define CANONICALIZE_COMPARISON(CODE,OP0,OP1) \ do { \ if (((CODE) == GE || (CODE) == GT || (CODE) == GEU || (CODE) == GTU) \ && (GET_CODE (OP1) == REG || (OP1) == const0_rtx)) \ { \ rtx tem = (OP0); \ (OP0) = (OP1); \ (OP1) = tem; \ (CODE) = swap_condition (CODE); \ } \ if (((CODE) == LT || (CODE) == LTU) \ && GET_CODE (OP1) == CONST_INT && INTVAL (OP1) == 256) \ { \ (CODE) = (CODE) == LT ? LE : LEU; \ (OP1) = GEN_INT (255); \ } \ } while (0)/* 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 DImode/* Mode of a function address in a call instruction (for indexing purposes). */#define FUNCTION_MODE Pmode/* 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. We define this on the Alpha so that gen_call and gen_call_value get to see the SYMBOL_REF (for the hint field of the jsr). It will then copy it into a register, thus actually letting the address be cse'ed. */#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/* 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. If this is an 8-bit constant, return zero since it can be used nearly anywhere with no cost. If it is a valid operand for an ADD or AND, likewise return 0 if we know it will be used in that context. Otherwise, return 2 since it might be used there later. All other constants take at least two insns. */#define CONST_COSTS(RTX,CODE,OUTER_CODE) \ case CONST_INT: \ if (INTVAL (RTX) >= 0 && INTVAL (RTX) < 256) \ return 0; \ case CONST_DOUBLE: \ if ((RTX) == CONST0_RTX (GET_MODE (RTX))) \ return 0; \ else if (((OUTER_CODE) == PLUS && add_operand (RTX, VOIDmode)) \ || ((OUTER_CODE) == AND && and_operand (RTX, VOIDmode))) \ return 0; \ else if (add_operand (RTX, VOIDmode) || and_operand (RTX, VOIDmode)) \ return 2; \ else \ return COSTS_N_INSNS (2); \ case CONST: \ case SYMBOL_REF: \ case LABEL_REF: \ switch (alpha_cpu) \ { \ case PROCESSOR_EV4: \ return COSTS_N_INSNS (3); \ case PROCESSOR_EV5: \ case PROCESSOR_EV6: \ return COSTS_N_INSNS (2); \ default: abort(); \ } /* Provide the costs of a rtl expression. This is in the body of a switch on CODE. */ #define RTX_COSTS(X,CODE,OUTER_CODE) \ case PLUS: case MINUS: \ if (FLOAT_MODE_P (GET_MODE (X))) \ switch (alpha_cpu) \ { \ case PROCESSOR_EV4: \ return COSTS_N_INSNS (6); \ case PROCESSOR_EV5: \ case PROCESSOR_EV6: \ return COSTS_N_INSNS (4); \ default: abort(); \ } \ else if (GET_CODE (XEXP (X, 0)) == MULT \ && const48_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; \ case MULT: \ switch (alpha_cpu) \ { \ case PROCESSOR_EV4: \ if (FLOAT_MODE_P (GET_MODE (X))) \ return COSTS_N_INSNS (6); \ return COSTS_N_INSNS (23); \ case PROCESSOR_EV5: \ if (FLOAT_MODE_P (GET_MODE (X))) \ return COSTS_N_INSNS (4); \ else if (GET_MODE (X) == DImode) \ return COSTS_N_INSNS (12); \ else \ return COSTS_N_INSNS (8); \ case PROCESSOR_EV6: \ if (FLOAT_MODE_P (GET_MODE (X))) \ return COSTS_N_INSNS (4); \ else \ return COSTS_N_INSNS (7); \ default: abort(); \ } \ case ASHIFT: \ if (GET_CODE (XEXP (X, 1)) == CONST_INT \ && INTVAL (XEXP (X, 1)) <= 3) \ break; \ /* ... fall through ... */ \ case ASHIFTRT: case LSHIFTRT: \ switch (alpha_cpu) \ { \ case PROCESSOR_EV4: \ return COSTS_N_INSNS (2); \ case PROCESSOR_EV5: \ case PROCESSOR_EV6: \ return COSTS_N_INSNS (1); \ default: abort(); \ } \ case IF_THEN_ELSE: \ switch (alpha_cpu) \ { \ case PROCESSOR_EV4: \ case PROCESSOR_EV6: \ return COSTS_N_INSNS (2); \ case PROCESSOR_EV5: \ return COSTS_N_INSNS (1); \ default: abort(); \ } \ case DIV: case UDIV: case MOD: case UMOD: \ switch (alpha_cpu) \ { \ case PROCESSOR_EV4: \ if (GET_MODE (X) == SFmode) \ return COSTS_N_INSNS (34); \ else if (GET_MODE (X) == DFmode) \ return COSTS_N_INSNS (63); \ else \ return COSTS_N_INSNS (70); \ case PROCESSOR_EV5: \ if (GET_MODE (X) == SFmode) \ return COSTS_N_INSNS (15); \ else if (GET_MODE (X) == DFmode) \ return COSTS_N_INSNS (22); \ else \ return COSTS_N_INSNS (70); /* ??? */ \ case PROCESSOR_EV6: \ if (GET_MODE (X) == SFmode) \ return COSTS_N_INSNS (12); \ else if (GET_MODE (X) == DFmode) \ return COSTS_N_INSNS (15); \ else \ return COSTS_N_INSNS (70); /* ??? */ \ default: abort(); \ } \ case MEM: \ switch (alpha_cpu) \ { \ case PROCESSOR_EV4: \ case PROCESSOR_EV6: \ return COSTS_N_INSNS (3); \ case PROCESSOR_EV5: \ return COSTS_N_INSNS (2); \ default: abort(); \ } \ case NEG: case ABS: \ if (! FLOAT_MODE_P (GET_MODE (X))) \ break; \ /* ... fall through ... */ \ case FLOAT: case UNSIGNED_FLOAT: case FIX: case UNSIGNED_FIX: \ case FLOAT_EXTEND: case FLOAT_TRUNCATE: \ switch (alpha_cpu) \ { \ case PROCESSOR_EV4: \ return COSTS_N_INSNS (6); \ case PROCESSOR_EV5: \ case PROCESSOR_EV6: \ return COSTS_N_INSNS (4); \ default: abort(); \ }/* Control the assembler format that we output. *//* Output to assembler file text saying following lines may contain character constants, extra white space, comments, etc. */#define ASM_APP_ON (TARGET_EXPLICIT_RELOCS ? "\t.set\tmacro\n" : "")/* Output to assembler file text saying following lines no longer contain unusual constructs. */#define ASM_APP_OFF (TARGET_EXPLICIT_RELOCS ? "\t.set\tnomacro\n" : "")#define TEXT_SECTION_ASM_OP "\t.text"/* Output before read-only data. */#define READONLY_DATA_SECTION_ASM_OP "\t.rdata"/* Output before writable data. */#define DATA_SECTION_ASM_OP "\t.data"/* Define an extra section for read-only data, a routine to enter it, and indicate that it is for read-only data. The first time we enter the readonly data section for a file, we write eight bytes of zero. This works around a bug in DEC's assembler in some versions of OSF/1 V3.x. */#define EXTRA_SECTIONS readonly_data#define EXTRA_SECTION_FUNCTIONS \void \literal_section () \{ \ if (in_section != readonly_data) \ { \ static int firsttime = 1; \ \ fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \ if (firsttime) \ { \ firsttime = 0; \ assemble_aligned_integer (8, const0_rtx); \ } \ \ in_section = readonly_data; \ } \} \#define READONLY_DATA_SECTION literal_section/* 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). */#define ENCODE_SECTION_INFO(DECL) alpha_encode_section_info (DECL)/* If a variable is weakened, made one only or moved into a different section, it may be necessary to redo the section info to move the variable out of sdata. */#define REDO_SECTION_INFO_P(DECL) \ ((TREE_CODE (DECL) == VAR_DECL) \ && (DECL_ONE_ONLY (DECL) || DECL_WEAK (DECL) || DECL_COMMON (DECL) \ || DECL_SECTION_NAME (DECL) != 0))#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \do { \ (VAR) = (SYMBOL_NAME); \ if ((VAR)[0] == '@') \ (VAR) += 2; \ if ((VAR)[0] == '*') \ (VAR)++; \} while (0)/* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number (see above). */#define REGISTER_NAMES \{"$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ "$9", "$10", "$11", "$12", "$13", "$14", "$15", \ "$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23", \ "$24", "$25", "$26", "$27", "$28", "$29", "$30", "AP", \ "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7",
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -