v850.h

来自「gcc3.2.1源代码」· C头文件 代码 · 共 1,558 行 · 第 1/4 页

H
1,558
字号
									\        case DATA_AREA_SDA:						\	  if (is_const)		                        		\	    rosdata_section ();						\	  else								\	    sdata_section ();						\	  break;							\									\        default:							\          if (is_const)							\	    const_section ();						\	  else								\	    data_section ();						\	  break;							\        }								\    }									\  else if (TREE_CODE (EXP) == STRING_CST)				\    {									\      if (! flag_writable_strings)					\	const_section ();						\      else								\	data_section ();						\    }									\									\  else									\    const_section ();							\									\} while (0)/* A C statement or statements to switch to the appropriate section   for output of RTX in mode MODE.  You can assume that RTX is some   kind of constant in RTL.  The argument MODE is redundant except in   the case of a `const_int' rtx.  Select the section by calling   `text_section' or one of the alternatives for other sections.   Do not define this macro if you put all constants in the read-only   data section.  *//* #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) *//* Output at beginning/end of assembler file.  */#undef ASM_FILE_START#define ASM_FILE_START(FILE) asm_file_start(FILE)#define ASM_COMMENT_START "#"/* 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"#undef  USER_LABEL_PREFIX#define USER_LABEL_PREFIX "_"/* When assemble_integer is used to emit the offsets for a switch   table it can encounter (TRUNCATE:HI (MINUS:SI (LABEL_REF:SI) (LABEL_REF:SI))).   output_addr_const will normally barf at this, but it is OK to omit   the truncate and just emit the difference of the two labels.  The   .hword directive will automatically handle the truncation for us.  */#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL)		\  if (GET_CODE (x) == TRUNCATE)				\    output_addr_const (FILE, XEXP (X, 0));		\  else							\    goto FAIL;/* This says how to output the assembler to define a global   uninitialized but not common symbol.  */#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \  asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))#undef  ASM_OUTPUT_ALIGNED_BSS #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \  v850_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)/* This says how to output the assembler to define a global   uninitialized, common symbol. */#undef  ASM_OUTPUT_ALIGNED_COMMON#undef  ASM_OUTPUT_COMMON#define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \     v850_output_common (FILE, DECL, NAME, SIZE, ALIGN)/* This says how to output the assembler to define a local   uninitialized symbol. */#undef  ASM_OUTPUT_ALIGNED_LOCAL#undef  ASM_OUTPUT_LOCAL#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \     v850_output_local (FILE, DECL, NAME, SIZE, ALIGN)     /* 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.global ", FILE);		\      assemble_name (FILE, NAME);		\      fputs ("\n", FILE);			\    }						\  while (0)/* This is how to output a reference to a user-level label named NAME.   `assemble_name' uses this.  */#undef ASM_OUTPUT_LABELREF#define ASM_OUTPUT_LABELREF(FILE, NAME)           \  do {                                            \  const char* real_name;                          \  STRIP_NAME_ENCODING (real_name, (NAME));        \  asm_fprintf (FILE, "%U%s", real_name);          \  } 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)))/* This is how we tell the assembler that two symbols have the same value.  */#define ASM_OUTPUT_DEF(FILE,NAME1,NAME2) \  do { assemble_name(FILE, NAME1); 	 \       fputs(" = ", FILE);		 \       assemble_name(FILE, NAME2);	 \       fputc('\n', FILE); } while (0)/* 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",  "sp",  "gp",  "r5",  "r6" , "r7",		\   "r8",  "r9", "r10", "r11", "r12", "r13", "r14", "r15",		\  "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",		\  "r24", "r25", "r26", "r27", "r28", "r29",  "ep", "r31",		\  ".fp", ".ap"}#define ADDITIONAL_REGISTER_NAMES					\{ { "zero",	0 },							\  { "hp",	2 },							\  { "r3",	3 },							\  { "r4",	4 },							\  { "tp",	5 },							\  { "fp",	29 },							\  { "r30",	30 },							\  { "lp",	31} }/* Print an instruction operand X on file FILE.   look in v850.c for details */#define PRINT_OPERAND(FILE, X, CODE)  print_operand (FILE, X, CODE)#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \  ((CODE) == '.')/* Print a memory operand whose address is X, on file FILE.   This uses a function in output-vax.c.  */#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)#define ASM_OUTPUT_REG_POP(FILE,REGNO)/* This is how to output an element of a case-vector that is absolute.  */#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \  asm_fprintf (FILE, "\t%s .L%d\n",					\	       (TARGET_BIG_SWITCH ? ".long" : ".short"), 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, "\t%s .L%d-.L%d\n",					\	   (TARGET_BIG_SWITCH ? ".long" : ".short"),			\	   VALUE, REL)#define ASM_OUTPUT_ALIGN(FILE, LOG)	\  if ((LOG) != 0)			\    fprintf (FILE, "\t.align %d\n", (LOG))/* We don't have to worry about dbx compatibility for the v850.  */#define DEFAULT_GDB_EXTENSIONS 1/* Use stabs debugging info by default.  */#undef PREFERRED_DEBUGGING_TYPE#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG/* Define to use software floating point emulator for REAL_ARITHMETIC and   decimal <-> binary conversion. */#define REAL_ARITHMETIC/* Specify the machine mode that this machine uses   for the index in the tablejump instruction.  */#define CASE_VECTOR_MODE (TARGET_BIG_SWITCH ? SImode : HImode)/* Define this if the case instruction drops through after the table   when the index is out of range.  Don't define it if the case insn   jumps to the default label instead.  *//* #define CASE_DROPS_THROUGH *//* Define as C expression which evaluates to nonzero if the tablejump   instruction expects the table to contain offsets from the address of the   table.   Do not define this if the table should contain absolute addresses. */#define CASE_VECTOR_PC_RELATIVE 1/* The switch instruction requires that the jump table immediately follow   it. */#define JUMP_TABLES_IN_TEXT_SECTION 1/* svr4.h defines this assuming that 4 byte alignment is required.  */#undef ASM_OUTPUT_BEFORE_CASE_LABEL#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \  ASM_OUTPUT_ALIGN ((FILE), (TARGET_BIG_SWITCH ? 2 : 1));#define WORD_REGISTER_OPERATIONS/* Byte and short loads sign extend the value to a word.  */#define LOAD_EXTEND_OP(MODE) SIGN_EXTEND/* This flag, if defined, says the same insns that convert to a signed fixnum   also convert validly to an unsigned one.  */#define FIXUNS_TRUNC_LIKE_FIX_TRUNC/* Max number of bytes we can move from memory to memory   in one reasonably fast instruction.  */#define MOVE_MAX	4/* Define if shifts truncate the shift count   which implies one can omit a sign-extension or zero-extension   of a shift count.  */#define SHIFT_COUNT_TRUNCATED 1/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits   is done just by pretending it is already truncated.  */#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1#define STORE_FLAG_VALUE 1/* Specify the machine mode that pointers have.   After generation of rtl, the compiler makes no further distinction   between pointers and any other objects of this machine mode.  */#define Pmode SImode/* A function address in a call instruction   is a byte address (for indexing purposes)   so give the MEM rtx a byte's mode.  */#define FUNCTION_MODE QImode/* Tell compiler we want to support GHS pragmas */#define REGISTER_TARGET_PRAGMAS(PFILE) do {				  \  cpp_register_pragma (PFILE, "ghs", "interrupt", ghs_pragma_interrupt);  \  cpp_register_pragma (PFILE, "ghs", "section",   ghs_pragma_section);    \  cpp_register_pragma (PFILE, "ghs", "starttda",  ghs_pragma_starttda);   \  cpp_register_pragma (PFILE, "ghs", "startsda",  ghs_pragma_startsda);   \  cpp_register_pragma (PFILE, "ghs", "startzda",  ghs_pragma_startzda);   \  cpp_register_pragma (PFILE, "ghs", "endtda",    ghs_pragma_endtda);	  \  cpp_register_pragma (PFILE, "ghs", "endsda",    ghs_pragma_endsda);	  \  cpp_register_pragma (PFILE, "ghs", "endzda",    ghs_pragma_endzda);	  \} while (0)/* enum GHS_SECTION_KIND is an enumeration of the kinds of sections that   can appear in the "ghs section" pragma.  These names are used to index   into the GHS_default_section_names[] and GHS_current_section_names[]   that are defined in v850.c, and so the ordering of each must remain   consistant.    These arrays give the default and current names for each kind of    section defined by the GHS pragmas.  The current names can be changed   by the "ghs section" pragma.  If the current names are null, use    the default names.  Note that the two arrays have different types.   For the *normal* section kinds (like .data, .text, etc.) we do not   want to explicitly force the name of these sections, but would rather   let the linker (or at least the back end) choose the name of the    section, UNLESS the user has force a specific name for these section   kinds.  To accomplish this set the name in ghs_default_section_names   to null.  */enum GHS_section_kind{   GHS_SECTION_KIND_DEFAULT,  GHS_SECTION_KIND_TEXT,  GHS_SECTION_KIND_DATA,   GHS_SECTION_KIND_RODATA,  GHS_SECTION_KIND_BSS,  GHS_SECTION_KIND_SDATA,  GHS_SECTION_KIND_ROSDATA,  GHS_SECTION_KIND_TDATA,  GHS_SECTION_KIND_ZDATA,  GHS_SECTION_KIND_ROZDATA,  COUNT_OF_GHS_SECTION_KINDS  /* must be last */};/* The following code is for handling pragmas supported by the   v850 compiler produced by Green Hills Software.  This is at   the specific request of a customer.  */typedef struct data_area_stack_element{  struct data_area_stack_element * prev;  v850_data_area                   data_area; /* Current default data area.  */} data_area_stack_element;/* Track the current data area set by the   data area pragma (which can be nested).  */extern data_area_stack_element * data_area_stack;/* Names of the various data areas used on the v850.  */extern union tree_node * GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];extern union tree_node * GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];/* The assembler op to start the file.  */#define FILE_ASM_OP "\t.file\n"/* Enable the register move pass to improve code.  */#define ENABLE_REGMOVE_PASS/* Implement ZDA, TDA, and SDA */#define EP_REGNUM 30	/* ep register number */#define ENCODE_SECTION_INFO(DECL)				\  do								\    {								\      if (TREE_CODE (DECL) == VAR_DECL				\          && (TREE_STATIC (DECL) || DECL_EXTERNAL (DECL)))	\	v850_encode_data_area (DECL);				\    }								\  while (0)#define ZDA_NAME_FLAG_CHAR '@'#define TDA_NAME_FLAG_CHAR '%'#define SDA_NAME_FLAG_CHAR '&'#define ZDA_NAME_P(NAME) (*(NAME) == ZDA_NAME_FLAG_CHAR)#define TDA_NAME_P(NAME) (*(NAME) == TDA_NAME_FLAG_CHAR)#define SDA_NAME_P(NAME) (*(NAME) == SDA_NAME_FLAG_CHAR)#define ENCODED_NAME_P(SYMBOL_NAME)    \  (   ZDA_NAME_P (SYMBOL_NAME)         \   || TDA_NAME_P (SYMBOL_NAME)         \   || SDA_NAME_P (SYMBOL_NAME))#define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \     (VAR) = (SYMBOL_NAME) + (ENCODED_NAME_P (SYMBOL_NAME) || *(SYMBOL_NAME) == '*')/* Define this if you have defined special-purpose predicates in the   file `MACHINE.c'.  This macro is called within an initializer of an   array of structures.  The first field in the structure is the name   of a predicate and the second field is an array of rtl codes.  For   each predicate, list all rtl codes that can be in expressions   matched by the predicate.  The list should have a trailing comma.  */#define PREDICATE_CODES							\{ "reg_or_0_operand",		{ REG, SUBREG, CONST_INT, CONST_DOUBLE }}, \{ "reg_or_int5_operand",	{ REG, SUBREG, CONST_INT }},		\{ "call_address_operand",	{ REG, SYMBOL_REF }},			\{ "movsi_source_operand",	{ LABEL_REF, SYMBOL_REF, CONST_INT,	\				  CONST_DOUBLE, CONST, HIGH, MEM,	\				  REG, SUBREG }},			\{ "special_symbolref_operand",	{ SYMBOL_REF }},			\{ "power_of_two_operand",	{ CONST_INT }},				\{ "pattern_is_ok_for_prologue",	{ PARALLEL }},				\{ "pattern_is_ok_for_epilogue",	{ PARALLEL }},				\{ "register_is_ok_for_epilogue",{ REG }},				\{ "not_power_of_two_operand",	{ CONST_INT }},  #endif /* ! GCC_V850_H */

⌨️ 快捷键说明

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