📄 v850.h
字号:
/* This is how to output an assembler line defining a `double' constant. It is .double or .float, depending. */#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \do { char dstr[30]; \ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \ fprintf (FILE, "\t.double %s\n", dstr); \ } while (0)/* This is how to output an assembler line defining a `float' constant. */#define ASM_OUTPUT_FLOAT(FILE, VALUE) \do { char dstr[30]; \ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \ fprintf (FILE, "\t.float %s\n", dstr); \ } 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.hword "), \ 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))/* Define the parentheses used to group arithmetic operations in assembler code. */#define ASM_OPEN_PAREN "("#define ASM_CLOSE_PAREN ")"/* 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 { \ char* real_name; \ STRIP_NAME_ENCODING (real_name, (NAME)); \ fprintf (FILE, "_%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 DBX_REGISTER_NUMBER(REGNO) REGNO/* 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/* Specify the tree operation to be used to convert reals to integers. */#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR/* 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/* This is the kind of divide that is easiest to do in the general case. */#define EASY_DIV_EXPR TRUNC_DIV_EXPR/* 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/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS is a valid machine specific attribute for DECL. The attributes in ATTRIBUTES have previously been assigned to DECL. */#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \ v850_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS)/* A C statement that assigns default attributes to a newly created DECL. */#define SET_DEFAULT_DECL_ATTRIBUTES(decl, attr) \ v850_set_default_decl_attr (decl)/* Tell compiler we want to support GHS pragmas */#define HANDLE_PRAGMA(get, unget, name) v850_handle_pragma (get, unget, name)enum v850_pragma_state{ V850_PS_START, V850_PS_SHOULD_BE_DONE, V850_PS_BAD, V850_PS_MAYBE_SECTION_NAME, V850_PS_EXPECTING_EQUALS, V850_PS_EXPECTING_SECTION_ALIAS, V850_PS_MAYBE_COMMA};enum v850_pragma_type{ V850_PT_UNKNOWN, V850_PT_INTERRUPT, V850_PT_SECTION, V850_PT_START_SECTION, V850_PT_END_SECTION};/* 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 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_STATIC (DECL) || DECL_EXTERNAL (DECL)) \ && TREE_CODE (DECL) == VAR_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 \{ "ep_memory_operand", { MEM }}, \{ "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 }}, /* Note, due to dependency and search path conflicts, prototypes involving the FILE, rtx or tree types cannot be included here. They are included at the start of v850.c */ extern void asm_file_start ();extern void print_operand ();extern void print_operand_address ();extern int function_arg_partial_nregs ();extern int const_costs ();extern char * output_move_double ();extern char * output_move_single ();extern int ep_memory_operand ();extern int reg_or_0_operand ();extern int reg_or_int5_operand ();extern int call_address_operand ();extern int movsi_source_operand ();extern int power_of_two_operand ();extern int not_power_of_two_operand ();extern int special_symbolref_operand ();extern void v850_reorg ();extern void notice_update_cc ();extern int v850_valid_machine_decl_attribute ();extern int v850_interrupt_function_p ();extern int pattern_is_ok_for_prologue ();extern int pattern_is_ok_for_epilogue ();extern int register_is_ok_for_epilogue ();extern char * construct_save_jarl ();extern char * construct_restore_jr ();extern void override_options PROTO ((void));extern int compute_register_save_size PROTO ((long *));extern int compute_frame_size PROTO ((int, long *));extern void expand_prologue PROTO ((void));extern void expand_epilogue PROTO ((void));extern void v850_output_aligned_bss ();extern void v850_output_common ();extern void v850_output_local ();extern void sdata_section PROTO ((void));extern void rosdata_section PROTO ((void));extern void sbss_section PROTO ((void));extern void tdata_section PROTO ((void));extern void zdata_section PROTO ((void));extern void rozdata_section PROTO ((void));extern void zbss_section PROTO ((void));extern int v850_handle_pragma PROTO ((int (*)(void), void (*)(int), char *));extern void v850_encode_data_area ();extern void v850_set_default_decl_attr ();extern v850_data_area v850_get_data_area ();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -