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

📄 tm-sparc.h

📁 这是完整的gcc源代码
💻 H
📖 第 1 页 / 共 4 页
字号:
	    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)		\	{ rtx x = cc_status.mdep; int know = cc_status.flags & CC_KNOW_HI_G1;	\	  CC_STATUS_INIT;					\	  if (x && know)					\	    { cc_status.mdep = x; cc_status.flags |= CC_KNOW_HI_G1; }		\	}							\    }								\  else if (GET_CODE (EXP) == PARALLEL				\	   && GET_CODE (XVECEXP (EXP, 0, 0)) == SET)		\    { if (SET_DEST (XVECEXP (EXP, 0, 0)) == cc0_rtx)		\	{ 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_SRC (XVECEXP (EXP, 0, 0))) == CALL) \	{ /* all bets are off */ CC_STATUS_INIT; }		\      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) \	{ rtx x = cc_status.mdep; int know = cc_status.flags & CC_KNOW_HI_G1;	\	  CC_STATUS_INIT;					\	  if (x && know)					\	    { cc_status.mdep = x; cc_status.flags |= CC_KNOW_HI_G1; }		\	}							\    }								\  else if (GET_CODE (EXP) == PARALLEL)				\  /* insn-peep has changed this insn beyond recognition     by NOTICE_UPDATE_CC.  However, we know it is either     a call or a branch with a delay slot filled, so we can     give up on knowing condition codes in any case.  */	\    { CC_STATUS_INIT; }						\  else if (GET_CODE (EXP) == CALL)				\    { /* all bets are off */ CC_STATUS_INIT; }			\}#define OUTPUT_JUMP(NORMAL, NO_OV, FLOAT)  \{ if (cc_prev_status.flags & CC_IN_FCCR)			\    return FLOAT;						\  if (cc_prev_status.flags & CC_NO_OVERFLOW)			\    return NO_OV;						\  return NORMAL; }/* 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 ".text"/* Output before writable data.  */#define DATA_SECTION_ASM_OP ".data"/* How to refer to registers in assembler output.   This sequence is indexed by compiler's hard-register-number (see above).  */#define REGISTER_NAMES \{"%g0", "%g1", "%g2", "%g3", "%g4", "%g5", "%g6", "%g7",		\ "%o0", "%o1", "%o2", "%o3", "%o4", "%o5", "%sp", "%o7",		\ "%l0", "%l1", "%l2", "%l3", "%l4", "%l5", "%l6", "%l7",		\ "%i0", "%i1", "%i2", "%i3", "%i4", "%i5", "%fp", "%i7",		\ "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7",		\ "%f8", "%f9", "%f10", "%f11", "%f12", "%f13", "%f14", "%f15",		\ "%f16", "%f17", "%f18", "%f19", "%f20", "%f21", "%f22", "%f23",	\ "%f24", "%f25", "%f26", "%f27", "%f28", "%f29", "%f30", "%f31"}	\/* How to renumber registers for dbx and gdb.  */#define DBX_REGISTER_NUMBER(REGNO) (REGNO)/* On Sun 4, this limit is 2048.  We use 1500 to be safe,   since the length can run past this up to a continuation point.  */#define DBX_CONTIN_LENGTH 1500/* This is how to output a note to DBX telling it the line number   to which the following sequence of instructions corresponds.   This is needed for SunOS 4.0, and should not hurt for 3.2   versions either.  */#define ASM_OUTPUT_SOURCE_LINE(file, line)		\  { static int sym_lineno = 1;				\    fprintf (file, ".stabn 68,0,%d,LM%d\nLM%d:\n",	\	     line, sym_lineno, sym_lineno);		\    sym_lineno += 1; }/* 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 (".global ", 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)					\  (isinf ((VALUE))							\   ? fprintf (FILE, "\t.double 0r%s99e999\n", ((VALUE) > 0 ? "" : "-")) \   : fprintf (FILE, "\t.double 0r%.20e\n", (VALUE)))/* This is how to output an assembler line defining a `float' constant.  */#define ASM_OUTPUT_FLOAT(FILE,VALUE)					\  (isinf ((VALUE))							\   ? fprintf (FILE, "\t.single 0r%s99e999\n", ((VALUE) > 0 ? "" : "-")) \   : fprintf (FILE, "\t.single 0r%.20e\n", (VALUE)))/* This is how to output an assembler line defining an `int' constant.  */#define ASM_OUTPUT_INT(FILE,VALUE)  \( fprintf (FILE, "\t.word "),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))/* Likewise for `char' and `short' constants.  */#define ASM_OUTPUT_SHORT(FILE,VALUE)  \( fprintf (FILE, "\t.half "),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))#define ASM_OUTPUT_CHAR(FILE,VALUE)  \( fprintf (FILE, "\t.byte "),			\  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, "\t.byte 0x%x\n", (VALUE))/* 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.word L%d\n", VALUE)/* This is how to output an element of a case-vector that is relative.   (SPARC does not use such vectors,   but we must define this macro anyway.)  */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)  \  fprintf (FILE, "\t.word 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, "\t.align %d\n", (1<<(LOG)))#define ASM_OUTPUT_SKIP(FILE,SIZE)  \  fprintf (FILE, "\t.skip %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 (".global ", (FILE)),			\  assemble_name ((FILE), (NAME)),		\  fputs ("\n.common ", (FILE)),			\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), ",%u,\"bss\"\n", (ROUNDED)))/* This says how to output an assembler line   to define a local common symbol.  */#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \( fputs ("\n.reserve ", (FILE)),			\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), ",%u,\"bss\"\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 SPARC, the CODE can be `r', meaning this is a register-only operand   and an immediate zero should be represented as `r0'.   It can also be `m', meaning that X is a memory reference but print   its address as a non-memory operand.   Codes C, N, F, I, and U are used for printing the opcodes of conditional   branches.  C prints the opcode for a given condition; N the negated opcode.   F prints the negated floating point opcode (different because of nans).   I prints the opcode that ignores the overflow bit, and U its negation.  */#define PRINT_OPERAND(FILE, X, CODE)  \{ if (GET_CODE (X) == REG)					\    fprintf (FILE, "%s", reg_names[REGNO (X)]);			\  else if ((CODE) == 'm')					\    output_address (XEXP (X, 0));				\  else if (GET_CODE (X) == MEM)					\    {								\      fputc ('[', FILE);					\      output_address (XEXP (X, 0));				\      fputc (']', FILE);					\    }								\  else if (GET_CODE (X) == CONST_DOUBLE)			\    abort ();							\  else if ((CODE) == 'r' && (X) == const0_rtx)			\    fprintf (FILE, "%%g0");					\  else if ((CODE) == 'C') switch (GET_CODE (X))			\    {								\    case EQ: fputs ("e", FILE); break;				\    case NE: fputs ("ne", FILE); break;				\    case GT: fputs ("g", FILE); break;				\    case GE: fputs ("ge", FILE); break;				\    case LT: fputs ("l", FILE); break;				\    case LE: fputs ("le", FILE); break;				\    case GTU: fputs ("gu", FILE); break;			\    case GEU: fputs ("geu", FILE); break;			\    case LTU: fputs ("lu", FILE); break;			\    case LEU: fputs ("leu", FILE); break;			\    }								\  else if ((CODE) == 'I') switch (GET_CODE (X))			\    {								\    case EQ: fputs ("e", FILE); break;				\    case NE: fputs ("ne", FILE); break;				\    case GE: fputs ("pos", FILE); break;			\    case LT: fputs ("neg", FILE); break;			\    default:							\       abort ();						\    }								\  else if ((CODE) == 'U') switch (GET_CODE (X))			\    {								\    case EQ: fputs ("ne", FILE); break;				\    case NE: fputs ("e", FILE); break;				\    case GE: fputs ("neg", FILE); break;			\    case LT: fputs ("pos", FILE); break;			\    default:							\       abort ();						\    }								\  else if ((CODE) == 'N') switch (GET_CODE (X))			\    {								\    case EQ: fputs ("ne", FILE); break;				\    case NE: fputs ("e", FILE); break;				\    case GT: fputs ("le", FILE); break;				\    case GE: fputs ("l", FILE); break;				\    case LT: fputs ("ge", FILE); break;				\    case LE: fputs ("g", FILE); break;				\    case GTU: fputs ("leu", FILE); break;			\    case GEU: fputs ("lu", FILE); break;			\    case LTU: fputs ("geu", FILE); break;			\    case LEU: fputs ("gu", FILE); break;			\    }								\  else if ((CODE) == 'F') switch (GET_CODE (X))			\    {								\    case EQ: fputs ("ne", FILE); break;				\    case NE: fputs ("e", FILE); break;				\    case GT: fputs ("ule", FILE); break;			\    case GE: fputs ("ul", FILE); break;				\    case LT: fputs ("uge", FILE); break;			\    case LE: fputs ("ug", FILE); break;				\    default: abort ();						\    }								\  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;					\  int offset = 0;						\  register rtx addr = ADDR;					\  if (GET_CODE (addr) == REG)					\    {								\      fprintf (FILE, "%s", reg_names[REGNO (addr)]);		\    }								\  else if (GET_CODE (addr) == PLUS)				\    {								\      if (GET_CODE (XEXP (addr, 0)) == CONST_INT)		\	offset = INTVAL (XEXP (addr, 0)), base = XEXP (addr, 1);\      else if (GET_CODE (XEXP (addr, 1)) == CONST_INT)		\	offset = INTVAL (XEXP (addr, 1)), base = XEXP (addr, 0);\      else							\	base = XEXP (addr, 0), index = XEXP (addr, 1);		\      fprintf (FILE, "%s", reg_names[REGNO (base)]);		\      if (index == 0)						\	fprintf (FILE, "%+d", offset);				\      else							\	fprintf (FILE, "+%s", reg_names[REGNO (index)]);	\    }								\  else								\    {								\      output_addr_const (FILE, addr);				\    }								\}

⌨️ 快捷键说明

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