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

📄 ip2k.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0#define CUMULATIVE_ARGS	int#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \  ((CUM) = 0)#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)/* All arguments are passed on stack - do nothing here.  */#define FUNCTION_ARG_REGNO_P(R) 0#define FUNCTION_VALUE(VALTYPE, FUNC) 				\   ((TYPE_MODE (VALTYPE) == QImode)				\    ? gen_rtx_REG (TYPE_MODE (VALTYPE), REG_RESULT + 1)	\    : gen_rtx_REG (TYPE_MODE (VALTYPE), REG_RESULT))/* Because functions returning 'char' actually widen to 'int', we have to   use $81 as the return location if we think we only have a 'char'.  */#define LIBCALL_VALUE(MODE)  gen_rtx_REG ((MODE), REG_RESULT)#define FUNCTION_VALUE_REGNO_P(N) ((N) == REG_RESULT)#define DEFAULT_PCC_STRUCT_RETURN 0#define EPILOGUE_USES(REGNO) 0/*  Hmmm.  We don't actually like constants as addresses - they always need    to be loaded to a register, except for function calls which take an    address by immediate value.  But changing this to zero had negative    effects, causing the compiler to get very confused....  */#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)#define MAX_REGS_PER_ADDRESS 1#ifdef REG_OK_STRICT#  define GO_IF_LEGITIMATE_ADDRESS(MODE, OPERAND, ADDR)	\{							\  if (legitimate_address_p ((MODE), (OPERAND), 1))	\    goto ADDR;						\}#else#  define GO_IF_LEGITIMATE_ADDRESS(MODE, OPERAND, ADDR)	\{							\  if (legitimate_address_p ((MODE), (OPERAND), 0))	\    goto ADDR;						\}#endif#define REG_OK_FOR_BASE_STRICT_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))#define REG_OK_FOR_BASE_NOSTRICT_P(X) 	\  (REGNO (X) >= FIRST_PSEUDO_REGISTER 	\   || (REGNO (X) == REG_FP)		\   || (REGNO (X) == REG_VFP)		\   || (REGNO (X) == REG_AP)		\   || REG_OK_FOR_BASE_STRICT_P(X))#ifdef REG_OK_STRICT#  define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_STRICT_P (X)#else#  define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_NOSTRICT_P (X)#endif#define REG_OK_FOR_INDEX_P(X) 0#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)		\do { rtx orig_x = (X);					\  (X) = legitimize_address ((X), (OLDX), (MODE), 0);	\  if ((X) != orig_x && memory_address_p ((MODE), (X)))	\    goto WIN;						\} while (0)/* Is X a legitimate register to reload, or is it a pseudo stack-temp   that is problematic for push_reload() ?  */#define LRA_REG(X)						\  (! (reg_equiv_memory_loc[REGNO (X)]				\      && (reg_equiv_address[REGNO (X)]				\	  || num_not_at_initial_offset)))/* Given a register X that failed the LRA_REG test, replace X   by its memory equivalent, find the reloads needed for THAT memory   location and substitute that back for the higher-level reload   that we're conducting...  *//* WARNING: we reference 'ind_levels' and 'insn' which are local variables   in find_reloads_address (), where the LEGITIMIZE_RELOAD_ADDRESS macro   expands.  */#define FRA_REG(X,MODE,OPNUM,TYPE)					\do {									\  rtx tem = make_memloc ((X), REGNO (X));				\									\  if (! strict_memory_address_p (GET_MODE (tem), XEXP (tem, 0)))	\    {									\      /* Note that we're doing address in address - cf. ADDR_TYPE  */	\      find_reloads_address (GET_MODE (tem), &tem, XEXP (tem, 0),	\ 			    &XEXP (tem, 0), (OPNUM),			\			    ADDR_TYPE (TYPE), ind_levels, insn);	\    }									\  (X) = tem;								\} while (0)/* For the IP2K, we want to be clever about picking IP vs DP for a   base pointer since IP only directly supports a zero displacement.   (Note that we have modified all the HI patterns to correctly handle   IP references by manipulating iph:ipl as we fetch the pieces).  */#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND,WIN)		     \{									     \  if (GET_CODE (X) == PLUS						     \      && REG_P (XEXP (X, 0))						     \      && GET_CODE (XEXP (X, 1)) == CONST_INT)				     \    {									     \      int disp = INTVAL (XEXP (X, 1));					     \      int fit = (disp >= 0 && disp <= (127 - 2 * GET_MODE_SIZE (MODE)));     \      rtx reg = XEXP (X, 0);						     \      if (!fit)								     \	{								     \          push_reload ((X), NULL_RTX, &(X),				     \		       NULL, MODE_BASE_REG_CLASS (MODE), GET_MODE (X),	     \		       VOIDmode, 0, 0, OPNUM, TYPE);			     \	  goto WIN;							     \	}								     \      if (reg_equiv_memory_loc[REGNO (reg)]				     \          && (reg_equiv_address[REGNO (reg)] || num_not_at_initial_offset))  \        {								     \	  rtx mem = make_memloc (reg, REGNO (reg));			     \	  if (! strict_memory_address_p (GET_MODE (mem), XEXP (mem, 0)))     \	    {								     \	      /* Note that we're doing address in address - cf. ADDR_TYPE  */\               find_reloads_address (GET_MODE (mem), &mem, XEXP (mem, 0),    \ 			            &XEXP (mem, 0), (OPNUM),		     \			            ADDR_TYPE (TYPE), (IND), insn);	     \	    }								     \          push_reload (mem, NULL, &XEXP (X, 0), NULL,			     \		       GENERAL_REGS, Pmode, VOIDmode, 0, 0,		     \		       OPNUM, TYPE);					     \          push_reload (X, NULL, &X, NULL,				     \		       MODE_BASE_REG_CLASS (MODE), GET_MODE (X), VOIDmode,   \		       0, 0, OPNUM, TYPE);				     \	  goto WIN;							     \	}								     \   }									     \}#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)		\    do {							\	if (ip2k_mode_dependent_address (ADDR)) goto LABEL;	\    } while (0)#define LEGITIMATE_CONSTANT_P(X) 1#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) 7#define MEMORY_MOVE_COST(MODE,CLASS,IN) 6#define SLOW_BYTE_ACCESS 0#define NO_FUNCTION_CSE#define TEXT_SECTION_ASM_OP ".text"#define DATA_SECTION_ASM_OP ".data"#define JUMP_TABLES_IN_TEXT_SECTION 1#define ASM_COMMENT_START " ; "#define ASM_APP_ON "/* #APP */\n"#define ASM_APP_OFF "/* #NOAPP */\n"#define ASM_OUTPUT_DOUBLE(STREAM, VALUE) \  fprintf ((STREAM), ".double %.20e\n", (VALUE))#define ASM_OUTPUT_FLOAT(STREAM, VALUE) \  asm_output_float ((STREAM), (VALUE))#define ASM_OUTPUT_INT(FILE, VALUE)			\ ( fprintf ((FILE), "\t.long "),			\   output_addr_const ((FILE), (VALUE)),			\   fputs ("\n", (FILE)))#define ASM_OUTPUT_SHORT(FILE,VALUE) \  asm_output_short ((FILE), (VALUE))#define ASM_OUTPUT_CHAR(FILE,VALUE) \  asm_output_char ((FILE), (VALUE))#define ASM_OUTPUT_BYTE(FILE,VALUE) \  asm_output_byte ((FILE), (VALUE))#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) \  ((C) == '\n' || ((C) == '$'))#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED)	\do {							\     fputs ("\t.comm ", (STREAM));			\     assemble_name ((STREAM), (NAME));			\     fprintf ((STREAM), ",%d\n", (int)(SIZE));		\} while (0)#define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED)	\do {							\     fputs ("\t.lcomm ", (STREAM));			\     assemble_name ((STREAM), (NAME));			\     fprintf ((STREAM), ",%d\n", (int)(SIZE));		\} while (0)#undef WEAK_ASM_OP#define WEAK_ASM_OP	".weak"#undef ASM_DECLARE_FUNCTION_SIZE#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)		\  do {								\    if (!flag_inhibit_size_directive)				\      ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME);			\  } while (0)#define ESCAPES \"\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\\0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"/* A table of bytes codes used by the ASM_OUTPUT_ASCII and   ASM_OUTPUT_LIMITED_STRING macros.  Each byte in the table   corresponds to a particular byte value [0..255].  For any   given byte value, if the value in the corresponding table   position is zero, the given character can be output directly.   If the table value is 1, the byte must be output as a \ooo   octal escape.  If the tables value is anything else, then the   byte value should be output as a \ followed by the value   in the table.  Note that we can use standard UN*X escape   sequences for many control characters, but we don't use   \a to represent BEL because some svr4 assemblers (e.g. on   the i386) don't know about that.  Also, we don't use \v   since some versions of gas, such as 2.2 did not accept it.  *//* Globalizing directive for a label.  */#define GLOBAL_ASM_OP ".global\t"#define REGISTER_NAMES	{					\  "$00","$01","$02","$03","iph","ipl","sph","spl",		\  "pch","pcl","wreg","status","dph","dpl","$0e","mulh",		\  "$10","$11","$12","$13","$14","$15","$16","$17",		\  "$18","$19","$1a","$1b","$1c","$1d","$1e","$1f",		\  "$20","$21","$22","$23","$24","$25","$26","$27",		\  "$28","$29","$2a","$2b","$2c","$2d","$2e","$2f",		\  "$30","$31","$32","$33","$34","$35","$36","$37",		\  "$38","$39","$3a","$3b","$3c","$3d","$3e","$3f",		\  "$40","$41","$42","$43","$44","$45","$46","$47",		\  "$48","$49","$4a","$4b","$4c","$4d","$4e","$4f",		\  "$50","$51","$52","$53","$54","$55","$56","$57",		\  "$58","$59","$5a","$5b","$5c","$5d","$5e","$5f",		\  "$60","$61","$62","$63","$64","$65","$66","$67",		\  "$68","$69","$6a","$6b","$6c","$6d","$6e","$6f",		\  "$70","$71","$72","$73","$74","$75","$76","$77",		\  "$78","$79","$7a","$7b","$7c","$7d","callh","calll",		\  "$80","$81","$82","$83","$84","$85","$86","$87",		\  "$88","$89","$8a","$8b","$8c","$8d","$8e","$8f",		\  "$90","$91","$92","$93","$94","$95","$96","$97",		\  "$98","$99","$9a","$9b","$9c","$9d","$9e","$9f",		\  "$a0","$a1","$a2","$a3","$a4","$a5","$a6","$a7",		\  "$a8","$a9","$aa","$ab","$ac","$ad","$ae","$af",		\  "$b0","$b1","$b2","$b3","$b4","$b5","$b6","$b7",		\  "$b8","$b9","$ba","$bb","$bc","$bd","$be","$bf",		\  "$c0","$c1","$c2","$c3","$c4","$c5","$c6","$c7",		\  "$c8","$c9","$ca","$cb","$cc","$cd","$ce","$cf",		\  "$d0","$d1","$d2","$d3","$d4","$d5","$d6","$d7",		\  "$d8","$d9","$da","$db","$dc","$dd","$de","$df",		\  "$e0","$e1","$e2","$e3","$e4","$e5","$e6","$e7",		\  "$e8","$e9","$ea","$eb","$ec","$ed","$ee","$ef",		\  "$f0","$f1","$f2","$f3","$f4","$f5","$f6","$f7",		\  "$f8","$f9","$fa","$fb","$fc","$fd","$fe","$ff",		\  "vfph","vfpl","vaph","vapl"}#define PRINT_OPERAND(STREAM, X, CODE) \  print_operand ((STREAM), (X), (CODE))#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \  ((CODE) == '<' || (CODE) == '>')#define PRINT_OPERAND_ADDRESS(STREAM, X) print_operand_address(STREAM, X)/* Since register names don't have a prefix, we must preface all   user identifiers with the '_' to prevent confusion.  */#undef USER_LABEL_PREFIX#define USER_LABEL_PREFIX "_"#define LOCAL_LABEL_PREFIX ".L"#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL)		\  asm_fprintf ((STREAM), "\tpage\t%L%d\n\tjmp\t%L%d\n", (VALUE), (VALUE))/* elfos.h presumes that we will want switch/case dispatch tables aligned.   This is not so for the ip2k.  */#undef ASM_OUTPUT_CASE_LABEL#undef ASM_OUTPUT_ADDR_VEC_ELT#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE)				\  asm_fprintf ((STREAM), "\tpage\t%L%d\n\tjmp\t%L%d\n", (VALUE), (VALUE))#define ASM_OUTPUT_ALIGN(STREAM, POWER) \  fprintf ((STREAM), "\t.align %d\n", (POWER))/* Since instructions are 16 bit word addresses, we should lie and claim that   the dispatch vectors are in QImode.  Otherwise the offset into the jump   table will be scaled by the MODE_SIZE.  */#define CASE_VECTOR_MODE QImode#undef WORD_REGISTER_OPERATIONS#define MOVE_MAX 1#define MOVE_RATIO		3/* MOVE_RATIO is the number of move instructions that is better than a   block move.  Make this small on the IP2k, since the code size grows very   large with each move.  */#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1#define Pmode HImode#define FUNCTION_MODE HImode#define DOLLARS_IN_IDENTIFIERS 0extern int ip2k_reorg_in_progress;/* Flag if we're in the middle of IP2k-specific reorganization.  */extern int ip2k_reorg_completed;/* Flag if we've completed our IP2k-specific reorganization.  If we have   then we allow quite a few more tricks than before.  */extern int ip2k_reorg_split_dimode;extern int ip2k_reorg_split_simode;extern int ip2k_reorg_split_qimode;extern int ip2k_reorg_split_himode;/* Flags for various split operations that we run in sequence.  */extern int ip2k_reorg_merge_qimode;/* Flag to indicate that it's safe to merge QImode operands.  */#define TRAMPOLINE_TEMPLATE(FILE) abort ()#define TRAMPOLINE_SIZE 4#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)			\{									\  emit_move_insn (gen_rtx_MEM (HImode, plus_constant ((TRAMP), 2)),	\		   	   CXT);    					\  emit_move_insn (gen_rtx_MEM (HImode, plus_constant ((TRAMP), 6)),	\			   FNADDR);					\}/* 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.  */#define NOTICE_UPDATE_CC(EXP, INSN) (void)(0)/* Output assembler code to FILE to increment profiler label # LABELNO   for profiling a function entry.  */#define FUNCTION_PROFILER(FILE, LABELNO)  \  fprintf ((FILE), "/* profiler %d */", (LABELNO))#undef ENDFILE_SPEC#undef LINK_SPEC#undef STARTFILE_SPEC#if defined(__STDC__) || defined(ALMOST_STDC)#define AS2(a,b,c) #a "\t" #b "," #c#define AS1(a,b) #a "\t" #b#else#define AS1(a,b) "a	b"#define AS2(a,b,c) "a	b,c"#endif#define OUT_AS1(a,b) output_asm_insn (AS1 (a,b), operands)#define OUT_AS2(a,b,c) output_asm_insn (AS2 (a,b,c), operands)#define CR_TAB "\n\t"#define PREDICATE_CODES					\  {"ip2k_ip_operand", {MEM}},				\  {"ip2k_short_operand", {MEM}},			\  {"ip2k_gen_operand", {MEM, REG, SUBREG}},		\  {"ip2k_nonptr_operand", {REG, SUBREG}},		\  {"ip2k_ptr_operand", {REG, SUBREG}},			\  {"ip2k_split_dest_operand", {REG, SUBREG, MEM}}, 	\  {"ip2k_sp_operand", {REG}},				\  {"ip2k_nonsp_reg_operand", {REG, SUBREG}}, 		\  {"ip2k_symbol_ref_operand", {SYMBOL_REF}}, 		\  {"ip2k_binary_operator", {PLUS, MINUS, MULT, DIV,	\			    UDIV, MOD, UMOD, AND, IOR,	\			    XOR, COMPARE, ASHIFT,	\			    ASHIFTRT, LSHIFTRT}},	\  {"ip2k_unary_operator", {NEG, NOT, SIGN_EXTEND,	\			   ZERO_EXTEND}},		\  {"ip2k_unsigned_comparison_operator", {LTU, GTU, NE,	\					 EQ, LEU, GEU}},\  {"ip2k_signed_comparison_operator", {LT, GT, LE, GE}},#define DWARF2_DEBUGGING_INFO 1#define DWARF2_ASM_LINE_DEBUG_INFO	1#define DBX_REGISTER_NUMBER(REGNO)	(REGNO)/* Miscellaneous macros to describe machine specifics.  */#define IS_PSEUDO_P(R)	(REGNO (R) >= FIRST_PSEUDO_REGISTER)/* Default calculations would cause DWARF address sizes to be 2 bytes,   but the Harvard architecture of the IP2k and the word-addressed 64k   of instruction memory causes us to want a 32-bit "address" field.  */#undef DWARF2_ADDR_SIZE#define DWARF2_ADDR_SIZE	4

⌨️ 快捷键说明

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