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

📄 i860.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 4 页
字号:
#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" }/* 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)/* The prefix to add to user-visible assembler symbols.   This definition is overridden in i860/sysv4.h because under System V   Release 4, user-level symbols are *not* prefixed with underscores in   the generated assembly code.  */#define USER_LABEL_PREFIX "_"/* This is how to output an internal numbered label which   labels a jump table.  */#undef ASM_OUTPUT_CASE_LABEL#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE)		\do { ASM_OUTPUT_ALIGN ((FILE), 2);					\     (*targetm.asm_out.internal_label) ((FILE), PREFIX, NUM);		\   } while (0)/* 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)/* 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,%ssp,%ssp\n\t%sst.l %s%s,0(%ssp)\n",	\	i860_reg_prefix, i860_reg_prefix,				\	((REGNO) < 32 ? "" : "f"),					\	i860_reg_prefix, reg_names[REGNO],				\	i860_reg_prefix)/* 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(%ssp),%s%s\n\taddu 16,%ssp,%ssp\n",	\	((REGNO) < 32 ? "" : "f"),					\	i860_reg_prefix,						\	i860_reg_prefix, reg_names[REGNO],				\	i860_reg_prefix, i860_reg_prefix)/* 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, BODY, 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)))/* 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.   In the following comments, the term "constant address" is used frequently.   For an exact definition of what constitutes a "constant address" see the   output_addr_const routine in final.c   On the i860, the following target-specific special codes are recognized:	`r'	The operand can be anything, but if it is an immediate zero		value (either integer or floating point) then it will be		represented as `r0' or as `f0' (respectively).	`m'	The operand is a memory ref (to a constant address) but print		its address as a constant.	`L'	The operand is a numeric constant, a constant address, or		a memory ref to a constant address.  Print the correct		notation to yield the low part of the given value or		address or the low part of the address of the referred		to memory object.	`H'	The operand is a numeric constant, a constant address, or		a memory ref to a constant address.  Print the correct		notation to yield the high part of the given value or		address or the high part of the address of the referred		to memory object.	`h'	The operand is a numeric constant, a constant address, or		a memory ref to a constant address.  Either print the		correct notation to yield the plain high part of the		given value or address (or the plain high part of the		address of the memory object) or else print the correct		notation to yield the "adjusted" high part of the given		address (or of the address of the referred to memory object).		The choice of what to print depends upon whether the address		in question is relocatable or not.  If it is relocatable,		print the notation to get the adjusted high part.  Otherwise		just print the notation to get the plain high part.  Note		that "adjusted" high parts are generally used *only* when		the next following instruction uses the low part of the		address as an offset, as in `offset(reg)'.	`R'	The operand is a floating-pointer register.  Print the		name of the next following (32-bit) floating-point register.		(This is used when moving a value into just the most		significant part of a floating-point register pair.)	`?'	(takes no operand) Substitute the value of i860_reg_prefix		at this point.  The value of i860_reg_prefix is typically		a null string for most i860 targets, but for System V		Release 4 the i860 assembler syntax requires that all		names of registers be prefixed with a percent-sign, so		for SVR4, the value of i860_reg_prefix is initialized to		"%" in i860.c.*/extern const char *i860_reg_prefix;#define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '?')/* The following macro definition is overridden in i860v4.h   because the svr4 i860 assembler required a different syntax   for getting parts of constant/relocatable values.  */#define PRINT_OPERAND_PART(FILE, X, PART_CODE)				\  do { fprintf (FILE, "%s%%", PART_CODE);				\	output_address (X);						\  } while (0)#define OPERAND_LOW_PART	"l"#define OPERAND_HIGH_PART	"h"/* NOTE: All documentation available for the i860 sez that you must   use "ha" to get the relocated high part of a relocatable, but   reality sez different.  */#define OPERAND_HIGH_ADJ_PART	"ha"#define PRINT_OPERAND(FILE, X, CODE)					\{ if ((CODE) == '?')							\    fprintf (FILE, "%s", i860_reg_prefix);				\  else if (CODE == 'R')							\    fprintf (FILE, "%s%s", i860_reg_prefix, reg_names[REGNO (X) + 1]);	\  else if (GET_CODE (X) == REG)						\    fprintf (FILE, "%s%s", i860_reg_prefix, reg_names[REGNO (X)]);	\  else if ((CODE) == 'm')						\    output_address (XEXP (X, 0));					\  else if ((CODE) == 'L')						\    {									\      if (GET_CODE (X) == MEM)						\	PRINT_OPERAND_PART (FILE, XEXP (X, 0), OPERAND_LOW_PART);	\      else								\	PRINT_OPERAND_PART (FILE, X, OPERAND_LOW_PART);			\    }									\  else if ((CODE) == 'H')						\    {									\      if (GET_CODE (X) == MEM)						\	PRINT_OPERAND_PART (FILE, XEXP (X, 0), OPERAND_HIGH_PART);	\      else								\	PRINT_OPERAND_PART (FILE, X, OPERAND_HIGH_PART);		\    }									\  else if ((CODE) == 'h')						\    {									\      if (GET_CODE (X) == MEM)						\	PRINT_OPERAND_PART (FILE, XEXP (X, 0), OPERAND_HIGH_ADJ_PART);	\      else								\	PRINT_OPERAND_PART (FILE, X, OPERAND_HIGH_ADJ_PART);		\    }									\  else if (GET_CODE (X) == MEM)						\    output_address (XEXP (X, 0));					\  else if ((CODE) == 'r' && (X) == const0_rtx)				\    fprintf (FILE, "%sr0", i860_reg_prefix);				\  else if ((CODE) == 'r' && (X) == CONST0_RTX (GET_MODE (X)))		\    fprintf (FILE, "%sf0", i860_reg_prefix);				\  else if (GET_CODE (X) == CONST_DOUBLE)				\    fprintf (FILE, "0x%lx", sfmode_constant_to_ulong (X));		\  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 addr = ADDR;					\  if (GET_CODE (addr) == REG)					\    {								\      fprintf (FILE, "0(%s%s)",					\	i860_reg_prefix, reg_names[REGNO (addr)]);		\    }								\  else if (GET_CODE (addr) == CONST_DOUBLE			\            && GET_MODE (addr) == SFmode)			\    fprintf (FILE, "0x%lx", sfmode_constant_to_ulong (addr));	\  else if (GET_CODE (addr) == PLUS)				\    {								\      if ((GET_CODE (XEXP (addr, 0)) == CONST_INT)		\	  && (GET_CODE (XEXP (addr, 1)) == REG))		\	fprintf (FILE, "%d(%s%s)", INTVAL (XEXP (addr, 0)),	\	    i860_reg_prefix, reg_names[REGNO (XEXP (addr, 1))]);\      else if ((GET_CODE (XEXP (addr, 1)) == CONST_INT)		\	  && (GET_CODE (XEXP (addr, 0)) == REG))		\	fprintf (FILE, "%d(%s%s)", INTVAL (XEXP (addr, 1)),	\	    i860_reg_prefix, reg_names[REGNO (XEXP (addr, 0))]);\      else if ((GET_CODE (XEXP (addr, 0)) == REG)		\	  && (GET_CODE (XEXP (addr, 1)) == REG))		\	fprintf (FILE, "%s%s(%s%s)",				\	    i860_reg_prefix, reg_names[REGNO (XEXP (addr, 0))],	\	    i860_reg_prefix, reg_names[REGNO (XEXP (addr, 1))]);\      else							\	output_addr_const (FILE, addr);				\    }								\  else								\    {								\      output_addr_const (FILE, addr);				\    }								\}/* Optionally define this if you have added predicates to   `MACHINE.c'.  This macro is called within an initializer of an   array of structures.  The first field in the structure is the   name of a predicate and the second field is an array of rtl   codes.  For each predicate, list all rtl codes that can be in   expressions matched by the predicate.  The list should have a   trailing comma.  Here is an example of two entries in the list   for a typical RISC machine:   #define PREDICATE_CODES \     {"gen_reg_rtx_operand", {SUBREG, REG}},  \     {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}},   Defining this macro does not affect the generated code (however,   incorrect definitions that omit an rtl code that may be matched   by the predicate can cause the compiler to malfunction).    Instead, it allows the table built by `genrecog' to be more   compact and efficient, thus speeding up the compiler.  The most   important predicates to include in the list specified by this   macro are thoses used in the most insn patterns.  */#define PREDICATE_CODES							\   {"reg_or_0_operand",		{REG, SUBREG, CONST_INT}},		\   {"arith_operand",		{REG, SUBREG, CONST_INT}},		\   {"logic_operand",		{REG, SUBREG, CONST_INT}},		\   {"shift_operand",		{REG, SUBREG, CONST_INT}},		\   {"compare_operand",		{REG, SUBREG, CONST_INT}},		\   {"arith_const_operand",	{CONST_INT}},				\   {"logic_const_operand",	{CONST_INT}},				\   {"bte_operand",		{REG, SUBREG, CONST_INT}},		\   {"indexed_operand",		{MEM}},					\   {"load_operand",		{MEM}},					\   {"small_int",		{CONST_INT}},				\   {"logic_int",		{CONST_INT}},				\   {"call_insn_operand",	{MEM}},/* Define the information needed to generate branch insns.  This is stored   from the compare operation.  Note that we can't use "rtx" here since it   hasn't been defined!  */extern struct rtx_def *i860_compare_op0, *i860_compare_op1;

⌨️ 快捷键说明

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