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

📄 tm-m88k.h

📁 这是完整的gcc源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
/* 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 *//* 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 4/* Nonzero if access to memory by bytes is slow and undesirable.  */#define SLOW_BYTE_ACCESS 0/* 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/* 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 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/* 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) \  case CONST_INT:						\    if ((unsigned) INTVAL (RTX) < 0x10000) return 1;		\  case CONST:							\  case LABEL_REF:						\  case SYMBOL_REF:						\    return 2;							\  case CONST_DOUBLE:						\    return 4;/* Tell emit-rtl.c how to initialize special values on a per-function bass.  */extern int optimize;extern struct rtx_def *cc0_reg_rtx;typedef struct { struct rtx_def *ccr; } cc_status_mdep;#define CC_STATUS_MDEP cc_status_mdep#define INIT_EMIT_MDEP \{								\  cc0_reg_rtx = gen_rtx (REG, SImode, 25);			\}/* Tell final.c how to eliminate redundant test instructions.  *//* Here we define machine-dependent flags and fields in cc_status   (see `conditions.h').  */#define CC_IN_FCCR 04000/* 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 NOTICE_UPDATE_CC(EXP, INSN) \{ if (GET_CODE (EXP) == SET)					\    { if (GET_CODE (SET_DEST (EXP)) == CC0)			\	{ cc_status.flags = 0;					\	  cc_status.value1 = SET_DEST (EXP);			\	  cc_status.value2 = SET_SRC (EXP);			\	}							\      else if (GET_CODE (SET_DEST (EXP)) == REG)		\	{ if ((cc_status.value1					\	       && reg_overlap_mentioned_p (SET_DEST (EXP), cc_status.value1))) \	    cc_status.value1 = 0;				\	  if ((cc_status.value2					\	      && reg_overlap_mentioned_p (SET_DEST (EXP), cc_status.value2))) \	    cc_status.value2 = 0;				\	}							\      else if (GET_CODE (SET_DEST (EXP)) == MEM)		\	{ CC_STATUS_INIT; }					\    }								\  else if (GET_CODE (EXP) == PARALLEL				\	   && GET_CODE (XVECEXP (EXP, 0, 0)) == SET)		\    { if (GET_CODE (SET_DEST (XVECEXP (EXP, 0, 0))) == CC0)	\	{ cc_status.flags = 0;					\	  cc_status.value1 = SET_DEST (XVECEXP (EXP, 0, 0));	\	  cc_status.value2 = SET_SRC (XVECEXP (EXP, 0, 0));	\	}							\      else if (GET_CODE (SET_DEST (XVECEXP (EXP, 0, 0))) == REG) \	{ if ((cc_status.value1					\	       && reg_overlap_mentioned_p (SET_DEST (XVECEXP (EXP, 0, 0)), cc_status.value1))) \	    cc_status.value1 = 0;				\	  if ((cc_status.value2					\	       && reg_overlap_mentioned_p (SET_DEST (XVECEXP (EXP, 0, 0)), cc_status.value2))) \	    cc_status.value2 = 0;				\	}							\      else if (GET_CODE (SET_DEST (XVECEXP (EXP, 0, 0))) == MEM) \	{ CC_STATUS_INIT; }					\    }								\  else if (GET_CODE (EXP) == CALL)				\    { /* all bets are off */ CC_STATUS_INIT; }			\  if (cc_status.value1 && GET_CODE (cc_status.value1) == REG	\      && cc_status.value2					\      && reg_overlap_mentioned_p (cc_status.value1, cc_status.value2))	\    printf ("here!\n", cc_status.value2 = 0);			\}/* Control the assembler format that we output.  *//* Output at beginning of assembler file.  */#define ASM_FILE_START(FILE)/* Output to assembler file text saying following lines   may contain character constants, extra white space, comments, etc.  */#define ASM_APP_ON ""/* Output to assembler file text saying following lines   no longer contain unusual constructs.  */#define ASM_APP_OFF ""/* Output before read-only data.  */#define TEXT_SECTION_ASM_OP "\ttext"/* Output before writable data.  */#define DATA_SECTION_ASM_OP "\tdata"/* How to refer to registers in assembler output.   This sequence is indexed by compiler's hard-register-number (see above).  */#define REGISTER_NAMES \{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9",		\ "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19",	\ "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29",	\ "r30", "r31"}/* How to renumber registers for dbx and gdb.  */#define DBX_REGISTER_NUMBER(REGNO) (REGNO)/* This is how to output the definition of a user-level label named NAME,   such as the label on a static function or variable NAME.  */#define ASM_OUTPUT_LABEL(FILE,NAME)	\  do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)/* This is how to output a command to make the user-level label named NAME   defined for reference from other files.  */#define ASM_GLOBALIZE_LABEL(FILE,NAME)	\  do { fputs ("\tglobal\t", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)/* This is how to output a reference to a user-level label named NAME.   `assemble_name' uses this.  */#define ASM_OUTPUT_LABELREF(FILE,NAME)	\  fprintf (FILE, "_%s", NAME)/* This is how to output an internal numbered label where   PREFIX is the class of label and NUM is the number within the class.  */#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\  fprintf (FILE, "@%s%d:\n", PREFIX, NUM)/* This is how to store into the string LABEL   the symbol_ref name of an internal numbered label where   PREFIX is the class of label and NUM is the number within the class.   This is suitable for output with `assemble_name'.  */#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)	\  sprintf (LABEL, "*@%s%d", PREFIX, NUM)/* This is how to output an assembler line defining a `double' constant.  */#define ASM_OUTPUT_DOUBLE(FILE,VALUE)  \  fprintf (FILE, "\tdouble %.20e\n", (VALUE))/* This is how to output an assembler line defining a `float' constant.  */#define ASM_OUTPUT_FLOAT(FILE,VALUE)  \  fprintf (FILE, "\tfloat %.12e\n", (VALUE))/* This is how to output an assembler line defining an `int' constant.  */#define ASM_OUTPUT_INT(FILE,VALUE)  \( fprintf (FILE, "\tword "),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))/* Likewise for `short' and `char' constants.  */#define ASM_OUTPUT_SHORT(FILE,VALUE)  \( fprintf (FILE, "\thalf "),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))#define ASM_OUTPUT_CHAR(FILE,VALUE)  \( fprintf (FILE, "\tbyte "),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))/* This is how to output an assembler line for a numeric constant byte.  */#define ASM_OUTPUT_BYTE(FILE,VALUE)  \  fprintf (FILE, "\tbyte 0x%x\n", (VALUE))#define ASM_OUTPUT_ASCII(FILE, P, SIZE)  \  output_ascii (FILE, P, SIZE)#define ASM_OUTPUT_ADDR_VEC_PROLOGUE(FILE, MODE, LEN)	\  fprintf (FILE, "\tjmp r1\n");/* 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@L%d\n", VALUE)/* This is how to output an element of a case-vector that is relative.   (the m88000 does not use such vectors,   but we must define this macro anyway.)  */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)  \  fprintf (FILE, "\tword @L%d-@L%d\n", VALUE, REL)/* This is how to output an assembler line   that says to advance the location counter   to a multiple of 2**LOG bytes.  */#define ASM_OUTPUT_ALIGN(FILE,LOG)	\  if ((LOG) != 0)			\    fprintf (FILE, "\talign %d\n", 1<<(LOG))#define ASM_OUTPUT_SKIP(FILE,SIZE)  \  fprintf (FILE, "\tzero %u\n", (SIZE))/* This says how to output an assembler line   to define a global common symbol.  */#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \( fputs ("\tcomm ", (FILE)),			\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), ",%u\n", (ROUNDED)))/* This says how to output an assembler line   to define a local common symbol.  */#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \( fprintf ((FILE), "\talign %d\n", (SIZE) <= 4 ? 4 : 8),	\  assemble_name ((FILE), (NAME)),				\  fprintf ((FILE), ":\n\tzero %u\n", (ROUNDED)))/* 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)))/* Define the parentheses used to group arithmetic operations   in assembler code.  */#define ASM_OPEN_PAREN "("#define ASM_CLOSE_PAREN ")"/* Define results of standard character escape sequences.  */#define TARGET_BELL 007#define TARGET_BS 010#define TARGET_TAB 011#define TARGET_NEWLINE 012#define TARGET_VT 013#define TARGET_FF 014#define TARGET_CR 015/* Print operand X (an rtx) in assembler syntax to file FILE.   CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.   For `%' followed by punctuation, CODE is the punctuation and X is null.   On the m88000, the CODE can be `r', meaning this is a register-only operand   and an immediate zero should be represented as `r0'.  */#define PRINT_OPERAND(FILE, X, CODE)  \{ if (GET_CODE (X) == REG)						\    fprintf (FILE, "%s", reg_names[REGNO (X)]);				\  else if (GET_CODE (X) == MEM)						\    output_address (XEXP (X, 0));					\  else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode)	\    { union { double d; int i[2]; } u;					\      union { float f; int i; } u1;					\      u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X);	\      u1.f = u.d;							\      if (CODE == 'f')							\	fprintf (FILE, "0r%.9g", u1.f);					\      else								\	fprintf (FILE, "0x%x", u1.i); }					\  else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != DImode)	\    { union { double d; int i[2]; } u;					\      u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X);	\      fprintf (FILE, "0r%.20g", u.d); }					\  else if ((CODE) == 'r' && (X) == const0_rtx)				\    fprintf (FILE, "r0");						\  else { output_addr_const (FILE, X); }}/* Print a memory address as an operand to reference that memory location.  */#define PRINT_OPERAND_ADDRESS(FILE, ADDR)  \{ register rtx base, index = 0;						\  register rtx addr = ADDR;						\  register rtx reg0, reg1;						\  switch (GET_CODE (addr))						\    {									\    case REG:								\      fprintf (FILE, "r0,%s", reg_names[REGNO (addr)]);			\      break;								\    case PLUS:								\      reg0 = XEXP (addr, 0);						\      reg1 = XEXP (addr, 1);						\      if (GET_CODE (reg0) == MULT)					\	{ rtx tmp = reg0; reg0 = reg1; reg1 = tmp; }			\      if (REG_P (reg0))							\	if (REG_P (reg1))						\	  fprintf (FILE, "%s,%s",					\		   reg_names[REGNO (reg0)],				\		   reg_names[REGNO (reg1)]);				\	else if (GET_CODE (reg1) == CONST_INT)				\	  {								\	    int offset = INTVAL (reg1);					\	    fprintf (FILE, "%s,%d", reg_names[REGNO (reg0)], offset);	\	  }								\	else if (GET_CODE (reg1) == MULT)				\	  fprintf (FILE, "%s[%s]",					\		   reg_names[REGNO (reg0)],				\		   reg_names[REGNO (XEXP (reg1, 0))]);			\	else fatal ("bad XEXP (1) to PRINT_OPERAND_ADDRESS");		\      else fatal ("unknown PLUS case in PRINT_OPERAND_ADDRESS");	\      break;								\    case MULT:								\      fprintf (FILE, "r0[%s]", reg_names[REGNO (XEXP (addr, 0))]);	\      break;								\    default:								\      fprintf (FILE, "r0,");						\      output_addr_const (FILE, addr);					\    }}

⌨️ 快捷键说明

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