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

📄 mn10300.h

📁 linux下的gcc编译器
💻 H
📖 第 1 页 / 共 3 页
字号:
/* 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.   The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS,   except for CONSTANT_ADDRESS_P which is actually   machine-independent.   On the mn10300, the value in the address register must be   in the same memory space/segment as the effective address.   This is problematical for reload since it does not understand   that base+index != index+base in a memory reference.   Note it is still possible to use reg+reg addressing modes,   it's just much more difficult.  For a discussion of a possible   workaround and solution, see the comments in pa.c before the   function record_unscaled_index_insn_codes.  *//* Accept either REG or SUBREG where a register is valid.  */  #define RTX_OK_FOR_BASE_P(X)					\  ((REG_P (X) && REG_OK_FOR_BASE_P (X))				\   || (GET_CODE (X) == SUBREG && REG_P (SUBREG_REG (X))		\       && REG_OK_FOR_BASE_P (SUBREG_REG (X))))#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)    	\{							\  if (CONSTANT_ADDRESS_P (X))				\    goto ADDR;						\  if (RTX_OK_FOR_BASE_P (X))				\    goto ADDR;						\  if (TARGET_AM33					\      && GET_CODE (X) == POST_INC			\      && RTX_OK_FOR_BASE_P (XEXP (X, 0))		\      && (MODE == SImode || MODE == SFmode || MODE == HImode))\    goto ADDR;						\  if (GET_CODE (X) == PLUS)				\    {							\      rtx base = 0, index = 0;				\      if (REG_P (XEXP (X, 0))				\	  && REG_OK_FOR_BASE_P (XEXP (X, 0)))		\	base = XEXP (X, 0), index = XEXP (X, 1);	\      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 && index != 0)			\	{						\	  if (GET_CODE (index) == CONST_INT)		\	    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.   */#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)  \{ rtx orig_x = (X);				\  (X) = 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) == POST_INC) \    goto 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/* Tell final.c how to eliminate redundant test instructions.  *//* Here we define machine-dependent flags and fields in cc_status   (see `conditions.h').  No extra ones are needed for the VAX.  *//* Store in cc_status the expressions   that the condition codes will describe   after execution of an instruction whose pattern is EXP.   Do not alter them if the instruction would not alter the cc's.  */#define CC_OVERFLOW_UNUSABLE 0x200#define CC_NO_CARRY CC_NO_OVERFLOW#define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP, INSN)/* 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:							\    /* Zeros are extremely cheap.  */					\    if (INTVAL (RTX) == 0 && OUTER_CODE == SET)				\      return 0;								\    /* If it fits in 8 bits, then it's still relatively cheap.  */	\    if (INT_8_BITS (INTVAL (RTX)))					\      return 1;								\    /* This is the "base" cost, includes constants where either the	\       upper or lower 16bits are all zeros.  */				\    if (INT_16_BITS (INTVAL (RTX))					\	|| (INTVAL (RTX) & 0xffff) == 0					\	|| (INTVAL (RTX) & 0xffff0000) == 0)				\      return 2;								\    return 4;								\  /* These are more costly than a CONST_INT, but we can relax them,	\     so they're less costly than a CONST_DOUBLE.  */			\  case CONST:								\  case LABEL_REF:							\  case SYMBOL_REF:							\    return 6;								\  /* We don't optimize CONST_DOUBLEs well nor do we relax them well,	\     so their cost is very high.  */					\  case CONST_DOUBLE:							\    return 8;#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \  ((CLASS1 == CLASS2 && (CLASS1 == ADDRESS_REGS || CLASS1 == DATA_REGS)) ? 2 :\   ((CLASS1 == ADDRESS_REGS || CLASS1 == DATA_REGS) && \    (CLASS2 == ADDRESS_REGS || CLASS2 == DATA_REGS)) ? 4 : \   (CLASS1 == SP_REGS && CLASS2 == ADDRESS_REGS) ? 2 : \   (CLASS1 == ADDRESS_REGS && CLASS2 == SP_REGS) ? 4 : \   ! TARGET_AM33 ? 6 : \   (CLASS1 == SP_REGS || CLASS2 == SP_REGS) ? 6 : \   (CLASS1 == CLASS2 && CLASS1 == EXTENDED_REGS) ? 6 : \   (CLASS1 == EXTENDED_REGS || CLASS2 == EXTENDED_REGS) ? 4 : \   4)#define ADDRESS_COST(X) mn10300_address_cost((X), 0)/* A crude cut at RTX_COSTS for the MN10300.  *//* Provide the costs of a rtl expression.  This is in the body of a   switch on CODE.  */#define RTX_COSTS(RTX,CODE,OUTER_CODE) \  case UMOD:		\  case UDIV:		\  case MOD:		\  case DIV:		\    return 8;		\  case MULT:		\    return 8;/* Nonzero if access to memory by bytes or half words is no faster   than accessing full words.  */#define SLOW_BYTE_ACCESS 1/* Dispatch tables on the mn10300 are extremely expensive in terms of code   and readonly data size.  So we crank up the case threshold value to   encourage a series of if/else comparisons to implement many small switch   statements.  In theory, this value could be increased much more if we   were solely optimizing for space, but we keep it "reasonable" to avoid   serious code efficiency lossage.  */#define CASE_VALUES_THRESHOLD 6#define NO_FUNCTION_CSE/* According expr.c, a value of around 6 should minimize code size, and   for the MN10300 series, that's our primary concern.  */#define MOVE_RATIO 6#define TEXT_SECTION_ASM_OP "\t.section .text"#define DATA_SECTION_ASM_OP "\t.section .data"#define BSS_SECTION_ASM_OP "\t.section .bss"/* Output at beginning/end of assembler file.  */#undef ASM_FILE_START#define ASM_FILE_START(FILE) asm_file_start(FILE)#define ASM_COMMENT_START "#"/* Output to assembler file text saying following lines   may contain character constants, extra white space, comments, etc.  */#define ASM_APP_ON "#APP\n"/* Output to assembler file text saying following lines   no longer contain unusual constructs.  */#define ASM_APP_OFF "#NO_APP\n"/* This says how to output the assembler to define a global   uninitialized but not common symbol.   Try to use asm_output_bss to implement this macro.  */#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \  asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))/* Globalizing directive for a label.  */#define GLOBAL_ASM_OP "\t.global "/* This is how to output a reference to a user-level label named NAME.   `assemble_name' uses this.  */#undef ASM_OUTPUT_LABELREF#define ASM_OUTPUT_LABELREF(FILE, NAME) \  fprintf (FILE, "_%s", (*targetm.strip_name_encoding) (NAME))/* Store in OUTPUT a string (made with alloca) containing   an assembler-name for a local static variable named NAME.   LABELNO is an integer which is different for each call.  */#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)	\( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\  sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))/* This is how we tell the assembler that two symbols have the same value.  */#define ASM_OUTPUT_DEF(FILE,NAME1,NAME2) \  do { assemble_name(FILE, NAME1); 	 \       fputs(" = ", FILE);		 \       assemble_name(FILE, NAME2);	 \       fputc('\n', FILE); } 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 \{ "d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3", "ap", "sp", \  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7" \}#define ADDITIONAL_REGISTER_NAMES \{ {"r8",  4}, {"r9",  5}, {"r10", 6}, {"r11", 7}, \  {"r12", 0}, {"r13", 1}, {"r14", 2}, {"r15", 3}, \  {"e0", 10}, {"e1", 11}, {"e2", 12}, {"e3", 13}, \  {"e4", 14}, {"e5", 15}, {"e6", 16}, {"e7", 17} \}/* Print an instruction operand X on file FILE.   look in mn10300.c for details */#define PRINT_OPERAND(FILE, X, CODE)  print_operand(FILE,X,CODE)/* Print a memory operand whose address is X, on file FILE.   This uses a function in output-vax.c.  */#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)#define ASM_OUTPUT_REG_POP(FILE,REGNO)/* This is how to output an element of a case-vector that is absolute.  */#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \  fprintf (FILE, "\t%s .L%d\n", ".long", VALUE)/* This is how to output an element of a case-vector that is relative.  */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \  fprintf (FILE, "\t%s .L%d-.L%d\n", ".long", VALUE, REL)#define ASM_OUTPUT_ALIGN(FILE,LOG)	\  if ((LOG) != 0)			\    fprintf (FILE, "\t.align %d\n", (LOG))/* We don't have to worry about dbx compatibility for the mn10300.  */#define DEFAULT_GDB_EXTENSIONS 1/* Use dwarf2 debugging info by default.  */#undef PREFERRED_DEBUGGING_TYPE#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG#define DWARF2_ASM_LINE_DEBUG_INFO 1/* GDB always assumes the current function's frame begins at the value   of the stack pointer upon entry to the current function.  Accessing   local variables and parameters passed on the stack is done using the   base of the frame + an offset provided by GCC.   For functions which have frame pointers this method works fine;   the (frame pointer) == (stack pointer at function entry) and GCC provides   an offset relative to the frame pointer.   This loses for functions without a frame pointer; GCC provides an offset   which is relative to the stack pointer after adjusting for the function's   frame size.  GDB would prefer the offset to be relative to the value of   the stack pointer at the function's entry.  Yuk!  */#define DEBUGGER_AUTO_OFFSET(X) \  ((GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0) \    + (frame_pointer_needed \       ? 0 : -initial_offset (FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM)))#define DEBUGGER_ARG_OFFSET(OFFSET, X) \  ((GET_CODE (X) == PLUS ? OFFSET : 0) \    + (frame_pointer_needed \       ? 0 : -initial_offset (ARG_POINTER_REGNUM, STACK_POINTER_REGNUM)))/* Specify the machine mode that this machine uses   for the index in the tablejump instruction.  */#define CASE_VECTOR_MODE Pmode/* 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 LOAD_EXTEND_OP(MODE) ZERO_EXTEND/* This flag, if defined, says the same insns that convert to a signed fixnum   also convert validly to an unsigned one.  */#define FIXUNS_TRUNC_LIKE_FIX_TRUNC/* Max number of bytes we can move from memory to memory   in one reasonably fast instruction.  */#define MOVE_MAX	4/* Define if shifts truncate the shift count   which implies one can omit a sign-extension or zero-extension   of a shift count.  */#define SHIFT_COUNT_TRUNCATED 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/* 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 byte address (for indexing purposes)   so give the MEM rtx a byte's mode.  */#define FUNCTION_MODE QImode/* The assembler op to get a word.  */#define FILE_ASM_OP "\t.file\n"

⌨️ 快捷键说明

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