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

📄 1750a.h

📁 gcc编译工具没有什么特别
💻 H
📖 第 1 页 / 共 4 页
字号:
	    in_section = in_text;				\	    break;						\	  case Static:						\	    in_section = in_data;				\	    break;						\	  case Konst:						\	    in_section = in_readonly_data;			\	    break;						\	}							\    }		/* Function that switches to the read-only data section (optional) */#define READONLY_DATA_SECTION	const_section/* Output before program init section */#define INIT_SECTION_ASM_OP "\n\tinit     ; init_section\n"/* Output before program text section */#define TEXT_SECTION_ASM_OP "\n\tnormal   ; text_section\n"/* Output before writable data.   1750 Note: This is actually read-only data. The copying from read-only   to writable memory is done elsewhere (in ASM_FILE_END.) */#define DATA_SECTION_ASM_OP "\n\tkonst    ; data_section\n"/* How to refer to registers in assembler output.   This sequence is indexed by compiler's hard-register-number (see above).  */#define REGISTER_NAMES \ { "0", "1", "2", "3", "4", "5", "6", "7", \   "8", "9","10","11","12","13","14","15" }/* How to renumber registers for dbx and gdb. */#define DBX_REGISTER_NUMBER(REGNO) (REGNO)/******************  Assembler output formatting  **********************/#define ASM_IDENTIFY_GCC(FILE)  fputs ("; gcc2_compiled:\n", FILE)#define ASM_COMMENT_START  ";"#define ASM_OUTPUT_FUNNAM(FILE,NAME)	\	fprintf(FILE,"%s\n",NAME)#define ASM_OUTPUT_OPCODE(FILE,PTR)  do {		\	while (*(PTR) != '\0' && *(PTR) != ' ') {	\	    putc (*(PTR), FILE);			\	    (PTR)++;					\	  }						\	while (*(PTR) == ' ')				\	    (PTR)++;					\	putc ('\t', FILE);				\	program_counter += 2;				\     } while (0)#define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL)	\	fprintf(FILE,"%s\n",NAME)/* 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.  *//* 1750 note: Labels are prefixed with a 'K'. This is because handling   has been changed for labels to be output in the "Constants" section   (named "Konst"), and special initialization code takes care of copying   the Const-section data into the writable data section (named "Static").   In the Static section we therefore have the true label names (i.e.   not prefixed with 'K').  */#define ASM_OUTPUT_LABEL(FILE,NAME)	\  do {  if (NAME[0] == '.') {					\	   fprintf(stderr,"Oops! label %s can't begin with '.'\n",NAME); \	   abort();						\	}							\	else {							\	   check_section(Konst);				\	   fprintf(FILE,"K%s\n",NAME);				\	   fflush(FILE);					\	   datalbl[++datalbl_ndx].name = (char *)xstrdup (NAME);\	   datalbl[datalbl_ndx].size = 0;			\	   label_pending = 1;					\	}							\  } 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 {		\	   fprintf (FILE, "\tglobal  %s\t; export\n", NAME);	\  } 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)		\	do {							\	  if (strcmp(PREFIX,"LC") == 0) {			\	     label_pending = 1;					\	     datalbl[++datalbl_ndx].name = (char *) malloc (9); \	     sprintf(datalbl[datalbl_ndx].name,"LC%d",NUM);	\	     datalbl[datalbl_ndx].size = 0;			\	     check_section(Konst);				\	     fprintf(FILE,"K%s%d\n",PREFIX,NUM);		\	  }							\	  else if (find_jmplbl(NUM) < 0) {			\	     jmplbl[++jmplbl_ndx].num = NUM;			\	     jmplbl[jmplbl_ndx].pc = program_counter;		\	     fprintf(FILE, "%s%d\n", PREFIX, NUM);		\	  }							\	  fflush(FILE);						\	} while (0)/* 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)/* Output at the end of a jump table.   1750: To be uncommented when we can put jump tables in Konst.     #define ASM_OUTPUT_CASE_END(FILE,NUM,INSN)      \	fprintf (FILE, "\tnormal\t; case_end\n") *//* Currently, it is not possible to put jump tables in section Konst.   This is because there is a one-to-one relation between sections Konst   and Static (i.e., all Konst data are copied to Static, and the order   of data is the same between the two sections.) However, jump tables are   not copied to Static, which destroys the equivalence between Konst and   Static. When a more intelligent Konst-to-Static copying mechanism is   implemented (i.e. one that excludes the copying of jumptables), then   ASM_OUTPUT_CASE_END shall be defined, and JUMP_LABELS_IN_TEXT_SECTION   shall be undefined.   */#define JUMP_TABLES_IN_TEXT_SECTION 1/* This is how to output an assembler line defining a 1750A `float'   constant.  */#define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE) 			\  do {								\      if (label_pending) {					\	 label_pending = 0;					\         sprintf (datalbl[datalbl_ndx].value, "%lf", (double) VALUE); \      }								\      datalbl[datalbl_ndx].size += 2;				\      fprintf (FILE, "\tdataf\t%lf\n",VALUE);			\  } while(0)/* This is how to output an assembler line defining a 1750A `double'    constant. */#define ASM_OUTPUT_THREE_QUARTER_FLOAT(FILE,VALUE)		\  do {								\      if (label_pending) {					\	 label_pending = 0;					\         sprintf (datalbl[datalbl_ndx].value, "%lf", VALUE);	\      }								\      datalbl[datalbl_ndx].size += 3;				\      fprintf(FILE,"\tdataef\t%lf\n",VALUE);			\  } while (0)/* This is how to output an assembler line defining a string constant.  */#define ASM_OUTPUT_ASCII(FILE, PTR, LEN)  do {		\	int i;								\	if (label_pending)						\	   label_pending = 0;						\	datalbl[datalbl_ndx].size += LEN;				\	for (i = 0; i < LEN; i++) {					\	  if ((i % 15) == 0) {						\	    if (i != 0)							\	      fprintf(FILE,"\n");					\	    fprintf(FILE,"\tdata\t");					\	  }								\	  else								\	    fprintf(FILE,",");						\	  if (PTR[i] >= 32 && PTR[i] < 127)				\	    fprintf(FILE,"'%c'",PTR[i]);				\	  else								\	    fprintf(FILE,"%d",PTR[i]);					\	}								\	fprintf(FILE,"\n");						\  } while (0)/* This is how to output an assembler line defining a `char', `short', or  `int' constant.   1750 NOTE: The reason why this macro also outputs `short' and `int'   constants is that for the 1750, BITS_PER_UNIT is 16 (as opposed to the   usual 8.) This behavior is different from the usual, where   ASM_OUTPUT_CHAR only outputs character constants. The name   of this macro should perhaps be `ASM_OUTPUT_QUARTER_INT' or so. */#define ASM_OUTPUT_CHAR(FILE,VALUE)  do {	  \	if (label_pending) 						\	   label_pending = 0;						\	datalbl[datalbl_ndx].size++;					\	fprintf(FILE, "\tdata\t");					\	output_addr_const(FILE, VALUE); 				\	fprintf(FILE, "\n");						\  } while (0)/* This is how to output an assembler line defining a `long int' constant.   1750 NOTE: The reason why this macro outputs `long' instead of `short'   constants is that for the 1750, BITS_PER_UNIT is 16 (as opposed to the   usual 8.) The name of this macro should perhaps be `ASM_OUTPUT_HALF_INT'. */#define ASM_OUTPUT_SHORT(FILE,VALUE) do {	  \	if (label_pending)						\	   label_pending = 0;						\	datalbl[datalbl_ndx].size += 2;					\	fprintf(FILE, "\tdatal\t%d\n",INTVAL(VALUE));			\  } while (0)/* This is how to output an assembler line for a numeric constant byte.  */#define ASM_OUTPUT_BYTE(FILE,VALUE) do {	  \	if (label_pending)						\	   label_pending = 0;						\	datalbl[datalbl_ndx].size++;					\	fprintf(FILE, "\tdata\t#%x\n", VALUE);				\  } 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, "\tPSHM R%s,R%s\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, "\tPOPM R%s,R%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, "\tdata\tL%d ;addr_vec_elt\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, "\tdata\tL%d-L%d ;addr_diff_elt\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,"; in ASM_OUTPUT_ALIGN: pwr_of_2_bytcnt=%d\n",LOG)#define ASM_OUTPUT_SKIP(FILE,SIZE)	\   fprintf(FILE,"; in ASM_OUTPUT_SKIP: size=%d\n",SIZE)/* This says how to output an assembler line   to define a global common symbol.  */#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  do {	\	check_section(Static);					  \	fprintf (FILE, "\tcommon  %s,%d\n", NAME, SIZE);	  \     } while (0)#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME)  do {		\	fprintf (FILE, "\tglobal  %s\t; import\n", NAME);	\     }  while (0)/* This says how to output an assembler line   to define a local common symbol.  */#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  do {  \	check_section (Static);					\	fprintf(FILE,"%s \tblock   %d\t; local common\n",NAME,SIZE);	\     } while (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 ASM_OUTPUT_CONSTRUCTOR(FILE, NAME)  do {	\	fprintf(FILE, "\tinit\n\t"); assemble_name(FILE, NAME); \        fprintf(FILE,"  ;constructor\n"); } while (0)#define ASM_OUTPUT_DESTRUCTOR(FILE, NAME)  do {	\	fprintf(FILE, "\tinit\n\t"); assemble_name(FILE, NAME); \        fprintf(FILE,"  ;destructor\n"); } while (0)/* 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.   1750 note:  there are three special CODE characters:        'D', 'E': print a reference to a floating point constant (D=double,		  E=single precision) label name	'F': print a label defining a floating-point constant value	'J': print the absolute value of a negative INT_CONST	     (this is used in LISN/CISN/MISN/SISP and others)	'Q': print a 1750 Base-Register-with-offset instruction's operands *//* 1750A: see file aux-output.c */#define PRINT_OPERAND(FILE, X, CODE)  print_operand(FILE,X,CODE)#define PRINT_OPERAND_ADDRESS(FILE, ADDR)  print_operand_address(FILE,ADDR)

⌨️ 快捷键说明

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