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

📄 i860.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 4 页
字号:
/* 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, "\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,%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)))/* 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.   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 char *i860_reg_prefix;extern unsigned long sfmode_constant_to_ulong ();#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%x", 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 base, index = 0;					\  int offset = 0;						\  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%x", 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);				\    }								\}/* The following #defines are used when compiling the routines in   libgcc1.c.  Since the i860 calling conventions require single   precision floats to be passed in the floating-point registers   (rather than in the general registers) we have to build the   libgcc1.c routines in such a way that they know the actual types   of their formal arguments and the actual types of their return   values.  Otherwise, gcc will generate calls to the libgcc1.c   routines, passing arguments in the floating-point registers,   but the libgcc1.c routines will expect their arguments on the   stack (where the i860 calling conventions require structs &   unions to be passed).  */#define FLOAT_VALUE_TYPE	float#define INTIFY(FLOATVAL)	(FLOATVAL)#define FLOATIFY(INTVAL)	(INTVAL)#define FLOAT_ARG_TYPE		float/* 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;/* Declare things which are defined in i860.c but called from   insn-output.c.  */extern unsigned long sfmode_constant_to_ulong ();extern char *output_load ();extern char *output_store ();extern char *output_move_double ();extern char *output_fp_move_double ();extern char *output_block_move ();extern char *output_delay_insn ();extern char *output_delayed_branch ();extern void output_load_address ();

⌨️ 快捷键说明

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