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

📄 convex.h

📁 gcc编译工具没有什么特别
💻 H
📖 第 1 页 / 共 4 页
字号:
   For aggressively RISCy machines, only one insn format is allowed, so   this macro should be a constant.  The value of this macro only matters   for valid addresses.  */#define ADDRESS_COST(RTX) 0/* Specify the cost of a branch insn; roughly the number of extra insns that   should be added to avoid a branch.  */#define BRANCH_COST 0/* Adjust the cost of dependences. */#define ADJUST_COST(INSN,LINK,DEP,COST) 				\{									\  /* Antidependencies don't block issue. */				\  if (REG_NOTE_KIND (LINK) != 0)					\    (COST) = 0;								\  /* C38 situations where delay depends on context */			\  else if (TARGET_C38							\	   && GET_CODE (PATTERN (INSN)) == SET				\	   && GET_CODE (PATTERN (DEP)) == SET)				\    {									\      enum attr_type insn_type = get_attr_type (INSN);			\      enum attr_type dep_type = get_attr_type (DEP);			\      /* index register must be ready one cycle early */		\      if (insn_type == TYPE_MLDW || insn_type == TYPE_MLDL		\          || (insn_type == TYPE_MST					\	      && reg_mentioned_p (SET_DEST (PATTERN (DEP)),		\				  SET_SRC (PATTERN (INSN)))))		\	(COST) += 1;							\      /* alu forwarding off alu takes two */				\      if (dep_type == TYPE_ALU						\	  && insn_type != TYPE_ALU					\	  && ! (insn_type == TYPE_MST					\		&& SET_DEST (PATTERN (DEP)) == SET_SRC (PATTERN (INSN)))) \	(COST) += 1;							\    }									\}/* Convex uses Vax or IEEE floats.   Follow the host format. */#define TARGET_FLOAT_FORMAT HOST_FLOAT_FORMAT/* But must prevent real.c from constructing Vax dfloats */#define REAL_VALUE_ATOF(X,S) atof (X)extern double atof();/* Check a `double' value for validity for a particular machine mode.  */#define CHECK_FLOAT_VALUE(MODE, D, OVERFLOW) \   OVERFLOW = check_float_value (MODE, &D, OVERFLOW)/* Tell final.c how to eliminate redundant test instructions.  *//* Here we define machine-dependent flags and fields in cc_status   (see `conditions.h').  No extra ones are needed for convex.  *//* 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)  {}/* Control the assembler format that we output.  *//* Output at beginning of assembler file.  */#if _IEEE_FLOAT_#define ASM_FILE_START(FILE)  fprintf (FILE, ";NO_APP\n.fpmode ieee\n")#else#define ASM_FILE_START(FILE)  fprintf (FILE, ";NO_APP\n.fpmode native\n")#endif/* Output to assembler file text saying following lines   may contain character constants, extra white space, comments, etc.  */#define ASM_APP_ON ";APP\n"/* Output to assembler file text saying following lines   no longer contain unusual constructs.  */#define ASM_APP_OFF ";NO_APP\n"/* Alignment with Convex's assembler goes like this:   .text can be .aligned up to a halfword.   .data and .bss can be .aligned up to a longword.   .lcomm is not supported, explicit declarations in .bss must be used instead.   We get alignment for word and longword .text data by conventionally   using .text 2 for word-aligned data and .text 3 for longword-aligned   data.  This requires that the data's size be a multiple of its alignment,   which seems to be always true.  *//* Output before read-only data.  */#define TEXT_SECTION_ASM_OP (current_section_is_text = 1, ".text")/* Output before writable data.  */#define DATA_SECTION_ASM_OP (current_section_is_text = 0, ".data") /* Output before uninitialized data.  */#define BSS_SECTION_ASM_OP (current_section_is_text = 0, ".bss") /* 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 (current_section_is_text && (LOG) > 1)				\    fprintf (FILE, ".text %d\n", LOG);					\  else if (current_section_is_text)					\    fprintf (FILE, ".text\n.align %d\n", 1 << (LOG));			\  else									\    fprintf (FILE, ".align %d\n", 1 << (LOG))/* How to refer to registers in assembler output.   This sequence is indexed by compiler's hard-register-number (see above).  */#define REGISTER_NAMES							\{									\  "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", 			\  "sp", "a1", "a2", "a3", "a4", "a5", "ap", "fp",			\}/* This is BSD, so it wants DBX format.  */#define DBX_DEBUGGING_INFO/* How to renumber registers for dbx and gdb. */#define DBX_REGISTER_NUMBER(REGNO) (REGNO)/* Do not break .stabs pseudos into continuations.  */#define DBX_CONTIN_LENGTH 0/* This is the char to use for continuation (in case we need to turn   continuation back on).  */#define DBX_CONTIN_CHAR '?'/* Don't use stab extensions until GDB v4 port is available for convex. */#define DEFAULT_GDB_EXTENSIONS 0#define DBX_NO_XREFS/* 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)	\  do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)/* 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)/* Put case tables in .text 2, where they will be word-aligned */#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \  ASM_OUTPUT_ALIGN (FILE, 2); \  ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM)#define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \  ASM_OUTPUT_ALIGN (FILE, 1)/* 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) \  outfloat (FILE, VALUE, "%.17e", "\tds.d ", "\n")/* This is how to output an assembler line defining a `float' constant.  */#define ASM_OUTPUT_FLOAT(FILE,VALUE) \  outfloat (FILE, VALUE, "%.9e", "\tds.s ", "\n")/* This is how to output an assembler line defining an `int' constant.  */#define ASM_OUTPUT_INT(FILE,VALUE)  \{									\  fprintf (FILE, "\tds.w ");						\  output_addr_const (FILE, simplify_for_convex (VALUE));		\  fprintf (FILE, "\n");							\}/* Likewise for a `long long int' constant.  */#define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE)  \{									\  if (GET_CODE (VALUE) == CONST_DOUBLE)					\    fprintf (FILE, "\tds.w %d,%d\n",					\	     const_double_high_int (VALUE), const_double_low_int (VALUE)); \  else if (GET_CODE (VALUE) == CONST_INT)				\    {									\      int val = INTVAL (VALUE);						\      fprintf (FILE, "\tds.w %d,%d\n", val < 0 ? -1 : 0, val);		\    }									\  else									\    abort ();								\}/* Likewise for `char' and `short' constants.  */#define ASM_OUTPUT_SHORT(FILE,VALUE)  \( fprintf (FILE, "\tds.h "),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))#define ASM_OUTPUT_CHAR(FILE,VALUE)  \( fprintf (FILE, "\tds.b "),			\  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, "\tds.b %#x\n", (VALUE))/* This is how to output a string */#define ASM_OUTPUT_ASCII(FILE,STR,SIZE) do {				\  int i;								\  fprintf ((FILE), "\tds.b \"");					\  for (i = 0; i < (SIZE); i++) {					\      register int c = (STR)[i] & 0377;					\      if (c >= ' ' && c < 0177 && c != '\\' && c != '"')		\	  putc (c, (FILE));						\      else								\	  fprintf ((FILE), "\\%03o", c);}				\  fprintf ((FILE), "\"\n");} while (0)/* This is how to output an insn to push a register on the stack.   It need not be very fast code.  */#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  	\   fprintf (FILE, "\tpsh.%c %s\n",		\	    S_REGNO_P (REGNO) ? 'l' : 'w',	\	    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, "\tpop.%c %s\n",		\	    S_REGNO_P (REGNO) ? 'l' : 'w',	\	    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, "\tds.w L%d\n", VALUE)/* This is how to output an element of a case-vector that is relative.     (not used on Convex) */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)  \  fprintf (FILE, "\tds.w L%d-L%d\n", VALUE, REL)/* This is how to output an assembler line   that says to advance the location counter by SIZE bytes.  */#define ASM_OUTPUT_SKIP(FILE,SIZE)  \  fprintf (FILE, "\tds.b %u(0)\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)  \( bss_section (),				\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), ":\tbs.b %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)))/* Output an arg count before function entries. */#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)	\  asm_declare_function_name (FILE, NAME, DECL)/* 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 an instruction operand X on file FILE.   CODE is the code from the %-spec that requested printing this operand;   if `%z3' was used to print operand 3, then CODE is 'z'. */#define PRINT_OPERAND(FILE, X, CODE)  \    print_operand (FILE, X, CODE)/* Print a memory operand whose address is X, on file FILE. */#define PRINT_OPERAND_ADDRESS(FILE, ADDR)				\    print_operand_address (FILE, ADDR)/* Do not put out GNU stabs for constructors and destructors.   ld bounces them.  */#define FASCIST_ASSEMBLER/* __gcc_cleanup is loader-aliased to __ap$do_registered_functions if we   are linking against standard libc, 0 if old (-traditional) libc. */#define EXIT_BODY \{									\  extern void __gcc_cleanup ();						\  if (__gcc_cleanup != _cleanup)					\    __gcc_cleanup ();							\  _cleanup ();								\}/* Header for convex.c.   Here at the end so we can use types defined above. */extern int target_cpu;extern int current_section_is_text;extern enum reg_class regno_reg_class[];extern enum reg_class reg_class_from_letter[];extern char regno_ok_for_index_p_base[];#define regno_ok_for_index_p (regno_ok_for_index_p_base + 1)extern int const_double_low_int ();extern int const_double_high_int ();extern char *output_cmp ();extern char *output_condjump ();extern char *output_call ();extern void gen_ap_for_call ();extern int check_float_value ();extern void asm_declare_function_name ();

⌨️ 快捷键说明

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