tm-i860.h

来自「这是完整的gcc源代码」· C头文件 代码 · 共 1,232 行 · 第 1/3 页

H
1,232
字号
/* Max number of bytes we can move from memory to memory   in one reasonably fast instruction.  */#define MOVE_MAX 16/* Nonzero if access to memory by bytes is slow and undesirable.  */#define SLOW_BYTE_ACCESS 0/* This is System V, so it wants sdb format.  */#define DBX_DEBUGGING_INFO/* 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 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 (INTVAL (RTX) == 0)					\      return 0;							\    if (INTVAL (RTX) < 0x2000 && INTVAL (RTX) >= -0x2000) return 1; \  case CONST:							\  case LABEL_REF:						\  case SYMBOL_REF:						\    return 2;							\  case CONST_DOUBLE:						\    return 2 * GET_MODE_SIZE (GET_MODE (RTX)) / UNITS_PER_WORD;/* Tell final.c how to eliminate redundant test instructions.  *//* Here we define machine-dependent flags and fields in cc_status   (see `conditions.h').  *//* This holds the value sourcing h%r31.  We keep this info   around so that mem/mem ops, such as increment and decrement,   etc, can be performed reasonably.  */#define CC_STATUS_MDEP rtx#define CC_STATUS_MDEP_INIT (cc_status.mdep = 0)/* On the i860, each comparison tests just one condition,   so only that condition can be remembered.   We don't need GT, GE, GTU and GEU because CC_REVERSED can handle them.  */#define CC_ONLY_EQ 0100#define CC_ONLY_LE 0200#define CC_ONLY_LT 0400#define CC_ONLY_LEU 02000#define CC_ONLY_LTU 04000#define CC_CONDITION_MASK 07700/* Non-zero to invert the sense of the condition code.  */#define CC_NEGATED 010000/* Nonzero if we know the value of h%r31.  */#define CC_KNOW_HI_R31 0100000/* Nonzero if h%r31 is actually ha%something, rather than h%something.  */#define CC_HI_R31_ADJ 0200000/* 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.  *//* On the i860, only compare insns set a useful condition code.  */#define NOTICE_UPDATE_CC(EXP, INSN) \{ cc_status.flags &= (CC_KNOW_HI_R31 | CC_HI_R31_ADJ);	\  cc_status.value1 = 0; cc_status.value2 = 0; }/* Control the assembler format that we output.  *//* Output at beginning of assembler file.  *//* The .file command should always begin the output.  */#define ASM_FILE_START(FILE)#if 0#define ASM_FILE_START(FILE)				\  do { sdbout_filename ((FILE), main_input_filename);	\       if (optimize) ASM_FILE_START_1 (FILE);		\     } while (0)#endif#define ASM_FILE_START_1(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 \{"r0", "r1", "sp", "fp", "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",								\ "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)/* 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)/* Likewise, for function names.  The difference is that we output a no-op   just before the beginning of the function, to ensure that there does not   appear to be a delayed branch there.   Such a thing would confuse interrupt recovery.  */#define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \  do { fprintf (FILE, "\tnop\n"); ASM_OUTPUT_LABEL (FILE,NAME); } 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 (".globl ", 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 output an internal numbered label which   labels a jump table.  */#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,JUMPTABLE)	\  fprintf (FILE, ".data\n\t.align 4\n.%s%d:\n", PREFIX, NUM)/* Output at the end of a jump table.  */#define ASM_OUTPUT_CASE_END(FILE,NUM,INSN)	\  fprintf (FILE, ".text\n")/* 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)#define ASCII_DATA_ASM_OP ".byte"#define	ASM_OUTPUT_ASCII(f, p, size)	\{ register int i;			\  int inside;				\  inside = FALSE;			\  for (i = 0; i < size; i++) {		\    if (i % 64 == 0) {			\      if (i != 0) {			\	if (inside)			\	  putc('"', f);			\	putc('\n', f);			\	inside = FALSE;			\      }					\      fprintf(f, "%s ", ASCII_DATA_ASM_OP);	\    }					\    if (p[i] < 32 || p[i] == '\\' || p[i] == '"' || p[i] == 127) {	\      if (inside) {			\	putc('"', f);			\	inside = FALSE;			\      }					\      if (i % 64 != 0)			\	putc(',', f);			\      fprintf(f, "%d", p[i]);		\    } else {				\      if (!inside) {			\	if (i % 64 != 0)			\	  putc(',', f);			\	putc('"', f);			\	inside = TRUE;			\      }					\      putc(p[i], f);			\    }					\  }					\  if (inside)				\    putc('"', f);			\  putc('\n', f);			\}/* This is how to output an assembler line defining a `double' constant.  */#define ASM_OUTPUT_DOUBLE(FILE,VALUE)  \  fprintf (FILE, "\t.double %.20e\n", (VALUE))/* This is how to output an assembler line defining a `float' constant.  */#define ASM_OUTPUT_FLOAT(FILE,VALUE)  \  fprintf (FILE, "\t.float %.12e\n", (VALUE))/* This is how to output an assembler line defining an `int' constant.  */#define ASM_OUTPUT_INT(FILE,VALUE)  \( fprintf (FILE, "\t.long "),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))/* Likewise for `char' and `short' constants.  */#define ASM_OUTPUT_SHORT(FILE,VALUE)  \( fprintf (FILE, "\t.short "),			\  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 code to push a register on the stack.   It need not be very fast code.  */#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \  fprintf (FILE, "\taddu -16,sp,sp\n\t%sst.l %s,0(sp)\n",	\	   ((REGNO) < 32 ? "" : "f"), reg_names[REGNO])/* This is how to output an insn to pop a register from the stack.   It need not be very fast code.  */#define ASM_OUTPUT_REG_POP(FILE,REGNO)  \  fprintf (FILE, "\t%sld.l 0(sp),%s\n\taddu 16,sp,sp\n",	\	   ((REGNO) < 32 ? "" : "f"), reg_names[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.long .L%d\n", VALUE)/* This is how to output an element of a case-vector that is relative.   (The i860 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.blkb %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 (".comm ", (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)  \( fputs (".lcomm ", (FILE)),			\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), ",%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/* This assumes the compiler is running on a little-endian machine.   The support for the other case is left for version 2,   since there is nothing in version 1 to indicate the sex of the host.  */#define PRINT_OPERAND_EXTRACT_FLOAT(X)					\      u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X);/* 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 i860, 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 this is a memory ref,   but print its address as a constant.  */#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)						\    output_address (XEXP (X, 0));					\  else if ((CODE) == 'r' && (X) == const0_rtx)				\    fprintf (FILE, "r0");						\  else if ((CODE) == 'r' && (X) == CONST0_RTX (GET_MODE (X)))		\    fprintf (FILE, "f0");						\  else if (GET_CODE (X) == CONST_DOUBLE)				\    {									\      if (GET_MODE (X) == SFmode)					\	{ union { double d; int i[2]; } u;				\	  union { float f; int i; } u1;					\	  PRINT_OPERAND_EXTRACT_FLOAT (X);				\	  u1.f = u.d;							\          fprintf (FILE, "0x%x", u1.i); }				\      else								\        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, "0(%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);		\      if (index != 0)						\	fprintf (FILE, "%s", reg_names[REGNO (index)]);		\      else							\	fprintf (FILE, "%d", offset);				\      fprintf (FILE, "(%s)", reg_names[REGNO (base)]);		\    }								\  else								\    {								\/* ??? this may be wrong.  */  \      output_addr_const (FILE, addr);				\    }								\}

⌨️ 快捷键说明

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