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

📄 arm.h

📁 GUN开源阻止下的编译器GCC
💻 H
📖 第 1 页 / 共 5 页
字号:
	   ASM_COMMENT_START, version_string, ARM_OS_NAME);		  \  fprintf (STREAM,"%srfp\t.req\t%sr9\n", REGISTER_PREFIX, REGISTER_PREFIX); \  fprintf (STREAM,"%ssl\t.req\t%sr10\n", REGISTER_PREFIX, REGISTER_PREFIX); \  fprintf (STREAM,"%sfp\t.req\t%sr11\n", REGISTER_PREFIX, REGISTER_PREFIX); \  fprintf (STREAM,"%sip\t.req\t%sr12\n", REGISTER_PREFIX, REGISTER_PREFIX); \  fprintf (STREAM,"%ssp\t.req\t%sr13\n", REGISTER_PREFIX, REGISTER_PREFIX); \  fprintf (STREAM,"%slr\t.req\t%sr14\n", REGISTER_PREFIX, REGISTER_PREFIX); \  fprintf (STREAM,"%spc\t.req\t%sr15\n", REGISTER_PREFIX, REGISTER_PREFIX); \}#define ASM_APP_ON  ""#define ASM_APP_OFF  ""/* Switch to the text or data segment.  */#define TEXT_SECTION_ASM_OP  ".text"#define DATA_SECTION_ASM_OP  ".data"#define REGISTER_PREFIX ""#define USER_LABEL_PREFIX "_"#define LOCAL_LABEL_PREFIX ""/* The assembler's names for the registers.  */#ifndef REGISTER_NAMES#define REGISTER_NAMES  \{				                   \  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",  \  "r8", "r9", "sl", "fp", "ip", "sp", "lr", "pc",  \  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",  \  "cc", "sfp", "afp"				   \}#endif#ifndef ADDITIONAL_REGISTER_NAMES#define ADDITIONAL_REGISTER_NAMES		\{						\  {"a1", 0},					\  {"a2", 1},					\  {"a3", 2},					\  {"a4", 3},					\  {"v1", 4},					\  {"v2", 5},					\  {"v3", 6},					\  {"v4", 7},					\  {"v5", 8},					\  {"v6", 9},					\  {"rfp", 9}, /* Gcc used to call it this */	\  {"sb", 9},					\  {"v7", 10},					\  {"r10", 10},					\  {"r11", 11},	/* fp */			\  {"r12", 12},	/* ip */			\  {"r13", 13},	/* sp */			\  {"r14", 14},	/* lr */			\  {"r15", 15}	/* pc */			\}#endif/* Arm Assembler barfs on dollars */#define DOLLARS_IN_IDENTIFIERS 0#define NO_DOLLAR_IN_LABEL/* DBX register number for a given compiler register number */#define DBX_REGISTER_NUMBER(REGNO)  (REGNO)/* Generate DBX debugging information.  riscix.h will undefine this because   the native assembler does not support stabs. */#define DBX_DEBUGGING_INFO  1/* Acorn dbx moans about continuation chars, so don't use any.  */#ifndef DBX_CONTIN_LENGTH#define DBX_CONTIN_LENGTH  0#endif/* Output a source filename for the debugger. RISCiX dbx insists that the   ``desc'' field is set to compiler version number >= 315 (sic).  */#define DBX_OUTPUT_MAIN_SOURCE_FILENAME(STREAM,NAME) 			\do {									\  fprintf (STREAM, ".stabs \"%s\",%d,0,315,%s\n", (NAME), N_SO,		\	   &ltext_label_name[1]);					\  text_section ();							\  ASM_OUTPUT_INTERNAL_LABEL (STREAM, "Ltext", 0);			\} while (0)  /* Output a label definition.  */#define ASM_OUTPUT_LABEL(STREAM,NAME)  \  arm_asm_output_label ((STREAM), (NAME))/* Output a function label definition.  */#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \    ASM_OUTPUT_LABEL(STREAM, NAME)/* Output a globalising directive for a label.  */#define ASM_GLOBALIZE_LABEL(STREAM,NAME)  \  (fprintf (STREAM, "\t.global\t"),	  \   assemble_name (STREAM, NAME),	  \   fputc ('\n',STREAM))                   \/* Output a reference to a label.  */#define ASM_OUTPUT_LABELREF(STREAM,NAME)  \  fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, NAME)/* Make an internal label into a string.  */#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM)  \  sprintf (STRING, "*%s%d", PREFIX, NUM)/* Output an internal label definition.  */#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM)  \  do                                    	      	   		\    {						      	   		\      char *s = (char *) alloca (11 + strlen (PREFIX));	   		\      extern int arm_target_label, arm_ccfsm_state;	   		\      extern rtx arm_target_insn;					\						           		\      if (arm_ccfsm_state == 3 && arm_target_label == (NUM)   		\	&& !strcmp (PREFIX, "L"))					\	{								\	  arm_ccfsm_state = 0;				        	\	  arm_target_insn = NULL;					\	}								\	strcpy (s, "*");				      		\	sprintf (&s[strlen (s)], "%s%d", (PREFIX), (NUM));   		\	arm_asm_output_label (STREAM, s);		                \    } while (0)/* Nothing special is done about jump tables *//* #define ASM_OUTPUT_CASE_LABEL(STREAM,PREFIX,NUM,TABLE)   *//* #define ASM_OUTPUT_CASE_END(STREAM,NUM,TABLE)	    *//* Construct a private name.  */#define ASM_FORMAT_PRIVATE_NAME(OUTVAR,NAME,NUMBER)  \  ((OUTVAR) = (char *) alloca (strlen (NAME) + 10),  \   sprintf ((OUTVAR), "%s.%d", (NAME), (NUMBER)))/* Output a push or a pop instruction (only used when profiling).  */#define ASM_OUTPUT_REG_PUSH(STREAM,REGNO) \  fprintf(STREAM,"\tstmfd\t%ssp!,{%s%s}\n", \	  REGISTER_PREFIX, REGISTER_PREFIX, reg_names[REGNO])#define ASM_OUTPUT_REG_POP(STREAM,REGNO) \  fprintf(STREAM,"\tldmfd\t%ssp!,{%s%s}\n", \	  REGISTER_PREFIX, REGISTER_PREFIX, reg_names[REGNO])/* Output a relative address. Not needed since jump tables are absolute   but we must define it anyway.  */#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,VALUE,REL)  \  fputs ("- - - ASM_OUTPUT_ADDR_DIFF_ELT called!\n", STREAM)/* Output an element of a dispatch table.  */#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE)  \   fprintf (STREAM, "\t.word\tL%d\n", VALUE)/* Output various types of constants.  For real numbers we output hex, with   a comment containing the "human" value, this allows us to pass NaN's which   the riscix assembler doesn't understand (it also makes cross-assembling   less likely to fail). */#define ASM_OUTPUT_LONG_DOUBLE(STREAM,VALUE)				\do { char dstr[30];							\     long l[3];								\     arm_increase_location (12);					\     REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l);			\     REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr);			\     if (sizeof (int) == sizeof (long))					\       fprintf (STREAM, "\t.long 0x%x,0x%x,0x%x\t%s long double %s\n",	\		l[2], l[1], l[0], ASM_COMMENT_START, dstr);		\     else								\       fprintf (STREAM, "\t.long 0x%lx,0x%lx,0x%lx\t%s long double %s\n",\		l[0], l[1], l[2], ASM_COMMENT_START, dstr);		\   } while (0)    #define ASM_OUTPUT_DOUBLE(STREAM, VALUE)  				\do { char dstr[30];							\     long l[2];								\     arm_increase_location (8);						\     REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l);				\     REAL_VALUE_TO_DECIMAL (VALUE, "%.14g", dstr);			\     if (sizeof (int) == sizeof (long))					\       fprintf (STREAM, "\t.long 0x%x, 0x%x\t%s double %s\n", l[0],	\		l[1], ASM_COMMENT_START, dstr);				\     else								\       fprintf (STREAM, "\t.long 0x%lx, 0x%lx\t%s double %s\n", l[0],	\		l[1], ASM_COMMENT_START, dstr);				\   } while (0)#define ASM_OUTPUT_FLOAT(STREAM, VALUE)					\do { char dstr[30];							\     long l;								\     arm_increase_location (4);						\     REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);				\     REAL_VALUE_TO_DECIMAL (VALUE, "%.7g", dstr);			\     if (sizeof (int) == sizeof (long))					\       fprintf (STREAM, "\t.word 0x%x\t%s float %s\n", l,		\		ASM_COMMENT_START, dstr);				\     else								\       fprintf (STREAM, "\t.word 0x%lx\t%s float %s\n", l,		\		ASM_COMMENT_START, dstr);				\   } while (0);#define ASM_OUTPUT_INT(STREAM, EXP)	\  (fprintf (STREAM, "\t.word\t"),	\   output_addr_const (STREAM, (EXP)),	\   arm_increase_location (4),		\   fputc ('\n', STREAM))#define ASM_OUTPUT_SHORT(STREAM, EXP)  \  (fprintf (STREAM, "\t.short\t"),     \   output_addr_const (STREAM, (EXP)),  \   arm_increase_location (2),          \   fputc ('\n', STREAM))#define ASM_OUTPUT_CHAR(STREAM, EXP)  \  (fprintf (STREAM, "\t.byte\t"),      \   output_addr_const (STREAM, (EXP)),  \   arm_increase_location (1),          \   fputc ('\n', STREAM))#define ASM_OUTPUT_BYTE(STREAM, VALUE)  \  (fprintf (STREAM, "\t.byte\t%d\n", VALUE),  \   arm_increase_location (1))#define ASM_OUTPUT_ASCII(STREAM, PTR, LEN)  \  output_ascii_pseudo_op ((STREAM), (unsigned char *)(PTR), (LEN))/* Output a gap.  In fact we fill it with nulls.  */#define ASM_OUTPUT_SKIP(STREAM, NBYTES)  \  (arm_increase_location (NBYTES),              \   fprintf (STREAM, "\t.space\t%d\n", NBYTES))/* Align output to a power of two.  Horrible /bin/as.  */#define ASM_OUTPUT_ALIGN(STREAM, POWER)  \  do                                                           \    {                                                          \      register int amount = 1 << (POWER);                      \      extern int arm_text_location;			       \                                                               \      if (amount == 2)                                         \	fprintf (STREAM, "\t.even\n");                         \      else                                                     \	fprintf (STREAM, "\t.align\t%d\n", amount - 4);        \                                                               \      if (in_text_section ())                                  \	arm_text_location = ((arm_text_location + amount - 1)  \			     & ~(amount - 1));                 \    } while (0)/* Output a common block */#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED)  		\  (fprintf (STREAM, "\t.comm\t"), 		     			\   assemble_name ((STREAM), (NAME)),		     			\   fprintf(STREAM, ", %d\t%s %d\n", ROUNDED, ASM_COMMENT_START, SIZE))/* Output a local common block.  /bin/as can't do this, so hack a `.space' into   the bss segment.  Note that this is *bad* practice.  */#define ASM_OUTPUT_LOCAL(STREAM,NAME,SIZE,ROUNDED)  \  output_lcomm_directive (STREAM, NAME, SIZE, ROUNDED)/* Output a source line for the debugger.  *//* #define ASM_OUTPUT_SOURCE_LINE(STREAM,LINE) *//* Output a #ident directive.  */#define ASM_OUTPUT_IDENT(STREAM,STRING)  \  fprintf (STREAM,"- - - ident %s\n",STRING)/* The assembler's parentheses characters.  */#define ASM_OPEN_PAREN "("#define ASM_CLOSE_PAREN ")"/* Target characters.  */#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/* Only perform branch elimination (by making instructions conditional) if   we're optimising.  Otherwise it's of no use anyway.  */#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)  \  if (optimize)					    \    final_prescan_insn (INSN, OPVEC, NOPERANDS)#ifndef ASM_COMMENT_START#define ASM_COMMENT_START "@"#endif#define PRINT_OPERAND_PUNCT_VALID_P(CODE)	\  ((CODE) == '?' || (CODE) == '|' || (CODE) == '@')/* Output an operand of an instruction.  */#define PRINT_OPERAND(STREAM, X, CODE)  \  arm_print_operand (STREAM, X, CODE)#define ARM_SIGN_EXTEND(x)  ((HOST_WIDE_INT)		\  (HOST_BITS_PER_WIDE_INT <= 32 ? (x)			\   : (((x) & (unsigned HOST_WIDE_INT) 0xffffffff) |	\      (((x) & (unsigned HOST_WIDE_INT) 0x80000000)	\       ? ((~ (HOST_WIDE_INT) 0)				\	  & ~ (unsigned HOST_WIDE_INT) 0xffffffff)	\       : 0))))/* Output the address of an operand.  */#define PRINT_OPERAND_ADDRESS(STREAM,X)  \{									\    int is_minus = GET_CODE (X) == MINUS;				\									\    if (GET_CODE (X) == REG)						\	fprintf (STREAM, "[%s%s, #0]", REGISTER_PREFIX,			\		 reg_names[REGNO (X)]);					\    else if (GET_CODE (X) == PLUS || is_minus)				\      {									\	rtx base = XEXP (X, 0);						\	rtx index = XEXP (X, 1);					\	char *base_reg_name;						\	HOST_WIDE_INT offset = 0;					\	if (GET_CODE (base) != REG)					\	  {								\	    /* Ensure that BASE is a register (one of them must be). */	\	    rtx temp = base;						\	    base = index;						\	    index = temp;						\	  }								\	base_reg_name = reg_names[REGNO (base)];			\	switch (GET_CODE (index))					\	  {								\	  case CONST_INT:						\	    offset = INTVAL (index);					\	    if (is_minus)						\	      offset = -offset;						\	    fprintf (STREAM, "[%s%s, #%d]", REGISTER_PREFIX,		\		     base_reg_name, offset);				\	    break;							\									\	  case REG:							\	    fprintf (STREAM, "[%s%s, %s%s%s]", REGISTER_PREFIX,		\		     base_reg_name, is_minus ? "-" : "",		\		     REGISTER_PREFIX, reg_names[REGNO (index)] );	\	    break;							\									\	  case MULT:							\	  case ASHIFTRT:						\	  case LSHIFTRT:						\	  case ASHIFT:							\	  case ROTATERT

⌨️ 快捷键说明

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