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

📄 i960.h

📁 gcc编译工具没有什么特别
💻 H
📖 第 1 页 / 共 5 页
字号:
#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. */#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE)			\{ if (write_symbols == SDB_DEBUG) {				\    fprintf ((FILE), "\t.ln	%d\n",				\	     (sdb_begin_function_line				\	      ? (LINE) - sdb_begin_function_line : 1));		\  } else if (write_symbols == DBX_DEBUG) {			\	fprintf((FILE),"\t.stabd	68,0,%d\n",(LINE));	\  } }/* 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)		\{ fputs ("\t.globl ", FILE);			\  assemble_name (FILE, NAME);			\  fputs ("\n", FILE); }/* The prefix to add to user-visible assembler symbols. */#define USER_LABEL_PREFIX "_"/* 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 `long double'   constant.  */#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) i960_output_long_double(FILE, VALUE)/* This is how to output an assembler line defining a `double' constant.  */#define ASM_OUTPUT_DOUBLE(FILE,VALUE)  i960_output_double(FILE, VALUE)/* This is how to output an assembler line defining a `float' constant.  */#define ASM_OUTPUT_FLOAT(FILE,VALUE)  i960_output_float(FILE, 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.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))#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \  fprintf (FILE, "\tst\t%s,(sp)\n\taddo\t4,sp,sp\n", 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, "\tsubo\t4,sp,sp\n\tld\t(sp),%s\n", 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.word L%d\n", VALUE)/* This is how to output an element of a case-vector that is relative.  */#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)	\  fprintf (FILE, "\t.align %d\n", (LOG))#define ASM_OUTPUT_SKIP(FILE,SIZE)  \  fprintf (FILE, "\t.space %d\n", (SIZE))/* This says how to output an assembler line   to define a global common symbol.  *//* For common objects, output unpadded size... gld960 & lnk960 both   have code to align each common object at link time.  Also, if size   is 0, treat this as a declaration, not a definition - i.e.,   do nothing at all.  */#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)	\{ if ((SIZE) != 0)					\    {							\      fputs (".globl ", (FILE)),			\      assemble_name ((FILE), (NAME)),			\      fputs ("\n.comm ", (FILE)),			\      assemble_name ((FILE), (NAME)),			\      fprintf ((FILE), ",%d\n", (SIZE));		\    }							\}/* This says how to output an assembler line to define a local common symbol.   Output unpadded size, with request to linker to align as requested.   0 size should not be possible here.  */#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)  \( fputs (".bss\t", (FILE)),			\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), ",%d,%d\n", (SIZE),		\	   (floor_log2 ((ALIGN) / BITS_PER_UNIT))))/* A C statement (sans semicolon) to output to the stdio stream   FILE the assembler definition of uninitialized global DECL named   NAME whose size is SIZE bytes and alignment is ALIGN bytes.   Try to use asm_output_aligned_bss to implement this macro.  */#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN)	\  do {								\    fputs (".globl ", (FILE));					\    assemble_name ((FILE), (NAME));				\    fputs ("\n", (FILE));					\    ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN);		\  } while (0)/* Output text for an #ident directive.  */#define	ASM_OUTPUT_IDENT(FILE, STR)  fprintf(FILE, "\t# %s\n", STR);/* Align code to 8 byte boundary if TARGET_CODE_ALIGN is true.  */#define	LABEL_ALIGN_AFTER_BARRIER(LABEL) (TARGET_CODE_ALIGN ? 3 : 0)/* 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/* Output assembler code to FILE to initialize this source file's   basic block profiling info, if that has not already been done.  */#define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \{ fprintf (FILE, "\tld	LPBX0,g12\n");			\  fprintf (FILE, "\tcmpobne	0,g12,LPY%d\n",LABELNO);\  fprintf (FILE, "\tlda	LPBX0,g12\n");			\  fprintf (FILE, "\tcall	___bb_init_func\n");	\  fprintf (FILE, "LPY%d:\n",LABELNO); }/* Output assembler code to FILE to increment the entry-count for   the BLOCKNO'th basic block in this source file.  */#define BLOCK_PROFILER(FILE, BLOCKNO) \{ int blockn = (BLOCKNO);				\  fprintf (FILE, "\tld	LPBX2+%d,g12\n", 4 * blockn);	\  fprintf (FILE, "\taddo	g12,1,g12\n");		\  fprintf (FILE, "\tst	g12,LPBX2+%d\n", 4 * blockn); }/* 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.  */#define PRINT_OPERAND(FILE, X, CODE)  \  i960_print_operand (FILE, X, CODE);/* Print a memory address as an operand to reference that memory location.  */#define PRINT_OPERAND_ADDRESS(FILE, ADDR)	\  i960_print_operand_addr (FILE, ADDR)/* Output assembler code for a block containing the constant parts   of a trampoline, leaving space for the variable parts.  *//* On the i960, the trampoline contains three instructions:     ldconst _function, r4     ldconst static addr, g12     jump (r4)  */#define TRAMPOLINE_TEMPLATE(FILE)					\{									\  ASM_OUTPUT_INT (FILE, GEN_INT (0x8C203000));	\  ASM_OUTPUT_INT (FILE, GEN_INT (0x00000000));	\  ASM_OUTPUT_INT (FILE, GEN_INT (0x8CE03000));	\  ASM_OUTPUT_INT (FILE, GEN_INT (0x00000000));	\  ASM_OUTPUT_INT (FILE, GEN_INT (0x84212000));	\}/* Length in units of the trampoline for entering a nested function.  */#define TRAMPOLINE_SIZE 20/* Emit RTL insns to initialize the variable parts of a trampoline.   FNADDR is an RTX for the address of the function's pure code.   CXT is an RTX for the static chain value for the function.  */#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)			\{									\  emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 4)),	\		  FNADDR);						\  emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 12)),	\		  CXT);							\}/* Generate RTL to flush the register windows so as to make arbitrary frames   available.  */#define SETUP_FRAME_ADDRESSES()		\  emit_insn (gen_flush_register_windows ())#define BUILTIN_SETJMP_FRAME_VALUE hard_frame_pointer_rtx#if 0/* Promote char and short arguments to ints, when want compatibility with   the iC960 compilers.  *//* ??? In order for this to work, all users would need to be changed   to test the value of the macro at run time.  */#define PROMOTE_PROTOTYPES	TARGET_CLEAN_LINKAGE/* ??? This does not exist.  */#define PROMOTE_RETURN		TARGET_CLEAN_LINKAGE#endif/* Instruction type definitions.  Used to alternate instructions types for   better performance on the C series chips.  */enum insn_types { I_TYPE_REG, I_TYPE_MEM, I_TYPE_CTRL };/* Holds the insn type of the last insn output to the assembly file.  */extern enum insn_types i960_last_insn_type;/* Parse opcodes, and set the insn last insn type based on them.  */#define ASM_OUTPUT_OPCODE(FILE, INSN)	i960_scan_opcode (INSN)/* Table listing what rtl codes each predicate in i960.c will accept.  */#define PREDICATE_CODES \  {"fpmove_src_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,	\			  LABEL_REF, SUBREG, REG, MEM}},		\  {"arith_operand", {SUBREG, REG, CONST_INT}},				\  {"logic_operand", {SUBREG, REG, CONST_INT}},				\  {"fp_arith_operand", {SUBREG, REG, CONST_DOUBLE}},			\  {"signed_arith_operand", {SUBREG, REG, CONST_INT}},			\  {"literal", {CONST_INT}},						\  {"fp_literal_one", {CONST_DOUBLE}},					\  {"fp_literal_double", {CONST_DOUBLE}},				\  {"fp_literal", {CONST_DOUBLE}},					\  {"signed_literal", {CONST_INT}},					\  {"symbolic_memory_operand", {SUBREG, MEM}},				\  {"eq_or_neq", {EQ, NE}},						\  {"arith32_operand", {SUBREG, REG, LABEL_REF, SYMBOL_REF, CONST_INT,	\		       CONST_DOUBLE, CONST}},				\  {"power2_operand", {CONST_INT}},					\  {"cmplpower2_operand", {CONST_INT}},/* Define functions in i960.c and used in insn-output.c.  */extern char *i960_output_ldconst ();extern char *i960_output_call_insn ();extern char *i960_output_ret_insn ();extern char *i960_output_move_double ();extern char *i960_output_move_double_zero ();extern char *i960_output_move_quad ();extern char *i960_output_move_quad_zero ();/* Defined in reload.c, and used in insn-recog.c.  */extern int rtx_equal_function_value_matters;/* Output code to add DELTA to the first argument, and then jump to FUNCTION.   Used for C++ multiple inheritance.  */#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION)	\do {									\  int d = (DELTA);							\  if (d < 0 && d > -32)							\    fprintf (FILE, "\tsubo %d,g0,g0\n", -d);				\  else if (d > 0 && d < 32)						\    fprintf (FILE, "\taddo %d,g0,g0\n", d);				\  else									\    {									\      fprintf (FILE, "\tldconst %d,r5\n", d);				\      fprintf (FILE, "\taddo r5,g0,g0\n");				\    }									\  fprintf (FILE, "\tbx ");						\  assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0));	\  fprintf (FILE, "\n");							\} while (0);

⌨️ 快捷键说明

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