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

📄 romp.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
#define ADDRESS_COST(RTX)				\  ((GET_CODE (RTX) == SYMBOL_REF			\    && ! CONSTANT_POOL_ADDRESS_P (RTX))			\   || GET_CODE (RTX) == LABEL_REF			\   || (GET_CODE (RTX) == CONST				\       && ! constant_pool_address_operand (RTX, Pmode))	\   || (GET_CODE (RTX) == PLUS				\       && ((GET_CODE (XEXP (RTX, 1)) == SYMBOL_REF	\	    && ! CONSTANT_POOL_ADDRESS_P (XEXP (RTX, 0))) \	   || GET_CODE (XEXP (RTX, 1)) == LABEL_REF	\	   || GET_CODE (XEXP (RTX, 1)) == CONST)))/* Adjust the length of an INSN.  LENGTH is the currently-computed length and   should be adjusted to reflect any required changes.  This macro is used when   there is some systematic length adjustment required that would be difficult   to express in the length attribute.   On the ROMP, there are two adjustments:  First, a 2-byte insn in the delay   slot of a CALL (including floating-point operations) actually takes four   bytes.  Second, we have to make the worst-case alignment assumption for   address vectors.  */#define ADJUST_INSN_LENGTH(X,LENGTH)					\  if (GET_CODE (X) == INSN && GET_CODE (PATTERN (X)) == SEQUENCE	\      && GET_CODE (XVECEXP (PATTERN (X), 0, 0)) != JUMP_INSN		\      && get_attr_length (XVECEXP (PATTERN (X), 0, 1)) == 2)		\    (LENGTH) += 2;							\  else if (GET_CODE (X) == JUMP_INSN && GET_CODE (PATTERN (X)) == ADDR_VEC) \    (LENGTH) += 2;/* Tell final.c how to eliminate redundant test instructions.  *//* Here we define machine-dependent flags and fields in cc_status   (see `conditions.h').  *//* Set if condition code (really not-Z) is stored in `test bit'.  */#define CC_IN_TB	 01000/* Set if condition code is set by an unsigned compare. */#define	CC_UNSIGNED        02000/* 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(BODY,INSN) \  update_cc (BODY, INSN)/* Control the assembler format that we output.  *//* Output at beginning of assembler file.  */#define ASM_FILE_START(FILE)				\{ extern char *version_string;				\  char *p;						\							\  fprintf (FILE, "\t.globl .oVncs\n\t.set .oVncs,0\n") ; \  fprintf (FILE, "\t.globl .oVgcc");			\  for (p = version_string; *p != ' ' && *p != 0; p++)	\    fprintf (FILE, "%c", *p);				\  fprintf (FILE, "\n\t.set .oVgcc");			\  for (p = version_string; *p != ' ' && *p != 0; p++)	\    fprintf (FILE, "%c", *p);				\  fprintf (FILE, ",0\n");				\}/* Output to assembler file text saying following lines   may contain character constants, extra white space, comments, etc.  */#define ASM_APP_ON ""/* Output to assembler file text saying following lines   no longer contain unusual constructs.  */#define ASM_APP_OFF ""/* Output before instructions and read-only data.  */#define TEXT_SECTION_ASM_OP ".text"/* Output before writable data.  */#define DATA_SECTION_ASM_OP ".data"/* How to refer to registers in assembler output.   This sequence is indexed by compiler's hard-register-number (see above).  */#define REGISTER_NAMES \{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9",	\ "r10", "r11", "r12", "r13", "r14", "r15", "ap",		\ "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7" }/* How to renumber registers for dbx and gdb.  */#define DBX_REGISTER_NUMBER(REGNO) (REGNO)/* 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 ("\t.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)/* This is how to output a label for a jump table.  Arguments are the same as   for ASM_OUTPUT_INTERNAL_LABEL, except the insn for the jump table is   passed. */#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN)	\{ ASM_OUTPUT_ALIGN (FILE, 2); ASM_OUTPUT_INTERNAL_LABEL (FILE, 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 `double' constant.  */#define ASM_OUTPUT_DOUBLE(FILE,VALUE)		\  fprintf (FILE, "\t.double 0d%.20e\n", (VALUE))/* This is how to output an assembler line defining a `float' constant.   WARNING:  Believe it or not, the ROMP assembler has a bug in its   handling of single-precision floating-point values making it impossible   to output such values in the expected way.  Therefore, it must be output   in hex.  THIS WILL NOT WORK IF CROSS-COMPILING FROM A MACHINE THAT DOES   NOT USE IEEE-FORMAT FLOATING-POINT, but there is nothing that can be done   about it short of fixing the assembler.  */#define ASM_OUTPUT_FLOAT(FILE,VALUE)		\  do { union { int i; float f; } u_i_f;		\       u_i_f.f = (VALUE);			\       fprintf (FILE, "\t.long 0x%x\n", u_i_f.i);\     } while (0)/* This is how to output an assembler line defining an `int' constant.  */#define ASM_OUTPUT_INT(FILE,VALUE)  \( fprintf (FILE, "\t.long "),			\  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))/* This is how to output code to push a register on the stack.   It need not be very fast code.  */#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \  fprintf (FILE, "\tsis r1,4\n\tsts %s,0(r1)\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, "\tls r1,0(r1)\n\tais r1,4\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.long L%d\n", VALUE)/* This is how to output an element of a case-vector that is relative.   Don't define this if it is not supported. *//* #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, 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)	\  if ((LOG) != 0)			\    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.  */#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \( fputs (".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.  */#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED)	\( fputs (".lcomm ", (FILE)),				\  assemble_name ((FILE), (NAME)),			\  fprintf ((FILE), ",%d\n", (SIZE)))/* 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/* 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)  print_operand (FILE, X, CODE)/* Define which CODE values are valid.  */#define PRINT_OPERAND_PUNCT_VALID_P(CODE)	\  ((CODE) == '.' || (CODE) == '#')/* Print a memory address as an operand to reference that memory location.  */#define PRINT_OPERAND_ADDRESS(FILE, ADDR)			\{ register rtx addr = ADDR;					\  register rtx base = 0, offset = addr;				\  if (GET_CODE (addr) == REG)					\    base = addr, offset = const0_rtx;				\  else if (GET_CODE (addr) == PLUS				\	   && GET_CODE (XEXP (addr, 0)) == REG)			\    base = XEXP (addr, 0), offset = XEXP (addr, 1);		\  else if (GET_CODE (addr) == SYMBOL_REF			\	   && CONSTANT_POOL_ADDRESS_P (addr))			\    {								\      offset = GEN_INT (get_pool_offset (addr) + 12);  \      base = gen_rtx (REG, SImode, 14);				\    }								\  else if (GET_CODE (addr) == CONST				\	   && GET_CODE (XEXP (addr, 0)) == PLUS			\	   && GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST_INT	\	   && GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF	\	   && CONSTANT_POOL_ADDRESS_P (XEXP (XEXP (addr, 0), 0))) \    {								\      offset = plus_constant (XEXP (XEXP (addr, 0), 1),		\			      (get_pool_offset (XEXP (XEXP (addr, 0), 0)) \			       + 12));				\      base = gen_rtx (REG, SImode, 14);				\    }								\  output_addr_const (FILE, offset);				\  if (base)							\    fprintf (FILE, "(%s)", reg_names [REGNO (base)]);		\}/* Define the codes that are matched by predicates in aux-output.c.  */#define PREDICATE_CODES \  {"zero_memory_operand", {SUBREG, MEM}},			\  {"short_memory_operand", {SUBREG, MEM}},			\  {"symbolic_memory_operand", {SUBREG, MEM}},			\  {"current_function_operand", {MEM}},				\  {"constant_pool_address_operand", {SUBREG, CONST}},		\  {"romp_symbolic_operand", {LABEL_REF, SYMBOL_REF, CONST}},	\  {"constant_operand", {LABEL_REF, SYMBOL_REF, PLUS, CONST, CONST_INT}}, \  {"reg_or_cint_operand", {SUBREG, REG, CONST_INT}},		\  {"reg_or_any_cint_operand", {SUBREG, REG, CONST_INT}},	\  {"short_cint_operand", {CONST_INT}},				\  {"reg_or_D_operand", {SUBREG, REG, CONST_INT}},		\  {"reg_or_add_operand", {SUBREG, REG, LABEL_REF, SYMBOL_REF,	\			  PLUS, CONST, CONST_INT}}, 		\  {"reg_or_and_operand", {SUBREG, REG, CONST_INT}},		\  {"reg_or_mem_operand", {SUBREG, REG, MEM}},			\  {"reg_or_nonsymb_mem_operand", {SUBREG, REG, MEM}},		\  {"romp_operand", {SUBREG, MEM, REG, CONST_INT, CONST, LABEL_REF, \		    SYMBOL_REF, CONST_DOUBLE}},			\  {"reg_0_operand", {REG}},					\  {"reg_15_operand", {REG}},					\  {"float_binary", {PLUS, MINUS, MULT, DIV}},			\  {"float_unary", {NEG, ABS}},					\  {"float_conversion", {FLOAT_TRUNCATE, FLOAT_EXTEND, FLOAT, FIX}},/* Define functions defined in aux-output.c and used in templates.  */extern char *output_in_line_mul ();extern char *output_fpop ();

⌨️ 快捷键说明

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