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

📄 v850.h

📁 linux下编程用 编译软件
💻 H
📖 第 1 页 / 共 3 页
字号:
} while (0)/* Go to LABEL if ADDR (a legitimate address expression)   has an effect that depends on the machine mode it is used for.  */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)  {}/* Nonzero if the constant value X is a legitimate general operand.   It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */#define LEGITIMATE_CONSTANT_P(X)					\  (GET_CODE (X) == CONST_DOUBLE						\   || !(GET_CODE (X) == CONST						\	&& GET_CODE (XEXP (X, 0)) == PLUS				\	&& GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF		\	&& GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT		\	&& ! CONST_OK_FOR_K (INTVAL (XEXP (XEXP (X, 0), 1)))))/* 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 the VAX.  *//* 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 CC_OVERFLOW_UNUSABLE 0x200#define CC_NO_CARRY CC_NO_OVERFLOW#define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP, INSN)/* Nonzero if access to memory by bytes or half words is no faster   than accessing full words.  */#define SLOW_BYTE_ACCESS 1/* According expr.c, a value of around 6 should minimize code size, and   for the V850 series, that's our primary concern.  */#define MOVE_RATIO 6/* Indirect calls are expensive, never turn a direct call   into an indirect call.  */#define NO_FUNCTION_CSE/* The four different data regions on the v850.  */typedef enum {  DATA_AREA_NORMAL,  DATA_AREA_SDA,  DATA_AREA_TDA,  DATA_AREA_ZDA} v850_data_area;/* A list of names for sections other than the standard two, which are   `in_text' and `in_data'.  You need not define this macro on a   system with no other sections (that GCC needs to use).  */#undef	EXTRA_SECTIONS#define EXTRA_SECTIONS in_tdata, in_sdata, in_zdata, \ in_rozdata, in_rosdata, in_sbss, in_zbss, in_zcommon, in_scommon/* One or more functions to be defined in `varasm.c'.  These   functions should do jobs analogous to those of `text_section' and   `data_section', for your additional sections.  Do not define this   macro if you do not define `EXTRA_SECTIONS'.  */#undef	EXTRA_SECTION_FUNCTIONS/* This could be done a lot more cleanly using ANSI C....  */#define EXTRA_SECTION_FUNCTIONS						\void									\sdata_section ()							\{									\  if (in_section != in_sdata)						\    {									\      fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP);		\      in_section = in_sdata;						\    }									\}									\									\void									\rosdata_section ()							\{									\  if (in_section != in_rosdata)						\    {									\      fprintf (asm_out_file, "%s\n", ROSDATA_SECTION_ASM_OP);		\      in_section = in_sdata;						\    }									\}									\									\void									\sbss_section ()								\{									\  if (in_section != in_sbss)						\    {									\      fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP);		\      in_section = in_sbss;						\    }									\}									\									\void									\tdata_section ()							\{									\  if (in_section != in_tdata)						\    {									\      fprintf (asm_out_file, "%s\n", TDATA_SECTION_ASM_OP);		\      in_section = in_tdata;						\    }									\}									\									\void									\zdata_section ()							\{									\  if (in_section != in_zdata)						\    {									\      fprintf (asm_out_file, "%s\n", ZDATA_SECTION_ASM_OP);		\      in_section = in_zdata;						\    }									\}									\									\void									\rozdata_section ()							\{									\  if (in_section != in_rozdata)						\    {									\      fprintf (asm_out_file, "%s\n", ROZDATA_SECTION_ASM_OP);		\      in_section = in_rozdata;						\    }									\}									\									\void									\zbss_section ()								\{									\  if (in_section != in_zbss)						\    {									\      fprintf (asm_out_file, "%s\n", ZBSS_SECTION_ASM_OP);		\      in_section = in_zbss;						\    }									\}#define TEXT_SECTION_ASM_OP  "\t.section .text"#define DATA_SECTION_ASM_OP  "\t.section .data"#define BSS_SECTION_ASM_OP   "\t.section .bss"#define SDATA_SECTION_ASM_OP "\t.section .sdata,\"aw\""#define SBSS_SECTION_ASM_OP  "\t.section .sbss,\"aw\""#define ZDATA_SECTION_ASM_OP "\t.section .zdata,\"aw\""#define ZBSS_SECTION_ASM_OP  "\t.section .zbss,\"aw\""#define TDATA_SECTION_ASM_OP "\t.section .tdata,\"aw\""#define ROSDATA_SECTION_ASM_OP "\t.section .rosdata,\"a\""#define ROZDATA_SECTION_ASM_OP "\t.section .rozdata,\"a\""#define SCOMMON_ASM_OP 	       "\t.scomm\t"#define ZCOMMON_ASM_OP 	       "\t.zcomm\t"#define TCOMMON_ASM_OP 	       "\t.tcomm\t"#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 "_"#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL)  \  if (! v850_output_addr_const_extra (FILE, X)) \     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)     /* Globalizing directive for a label.  */#define GLOBAL_ASM_OP "\t.global "#define ASM_PN_FORMAT "%s___%lu"/* 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) \  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 %s.L%d-.L%d%s\n",				\	   (TARGET_BIG_SWITCH ? ".long" : ".short"),			\	   (! TARGET_BIG_SWITCH && TARGET_V850E ? "(" : ""),		\	   VALUE, REL,							\	   (! TARGET_BIG_SWITCH && TARGET_V850E ? ")>>1" : ""))#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/* 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 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/* 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() do {				\  c_register_pragma ("ghs", "interrupt", ghs_pragma_interrupt);	\  c_register_pragma ("ghs", "section",   ghs_pragma_section);	\  c_register_pragma ("ghs", "starttda",  ghs_pragma_starttda);	\  c_register_pragma ("ghs", "startsda",  ghs_pragma_startsda);	\  c_register_pragma ("ghs", "startzda",  ghs_pragma_startzda);	\  c_register_pragma ("ghs", "endtda",    ghs_pragma_endtda);	\  c_register_pragma ("ghs", "endsda",    ghs_pragma_endsda);	\  c_register_pragma ("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   consistent.    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 SYMBOL_FLAG_ZDA		(SYMBOL_FLAG_MACH_DEP << 0)#define SYMBOL_FLAG_TDA		(SYMBOL_FLAG_MACH_DEP << 1)#define SYMBOL_FLAG_SDA		(SYMBOL_FLAG_MACH_DEP << 2)#define SYMBOL_REF_ZDA_P(X)	((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_ZDA) != 0)#define SYMBOL_REF_TDA_P(X)	((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_TDA) != 0)#define SYMBOL_REF_SDA_P(X)	((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_SDA) != 0)#endif /* ! GCC_V850_H */

⌨️ 快捷键说明

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