📄 v850.h
字号:
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"/* 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 "_"#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 "/* 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) \ asm_fprintf (FILE, "%U%s", (*targetm.strip_name_encoding) (NAME))/* 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) \ 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 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#define MULDI3_LIBCALL "__muldi3"#define UCMPDI2_LIBCALL "__ucmpdi2"#define CMPDI2_LIBCALL "__cmpdi2"#define NEGDI2_LIBCALL "__negdi2"#define INIT_TARGET_OPTABS \ do \ { \ cmp_optab->handlers[(int) DImode].libfunc \ = init_one_libfunc (CMPDI2_LIBCALL); \ ucmp_optab->handlers[(int) DImode].libfunc \ = init_one_libfunc (UCMPDI2_LIBCALL); \ neg_optab->handlers[(int) DImode].libfunc \ = init_one_libfunc (NEGDI2_LIBCALL); \ } \ while (0)/* 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 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 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 }}, \{ "reg_or_int9_operand", { REG, SUBREG, CONST_INT }}, \{ "reg_or_const_operand", { REG, 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 }}, \{ "pattern_is_ok_for_dispose", { PARALLEL }}, \{ "pattern_is_ok_for_prepare", { PARALLEL }}, \{ "register_is_ok_for_dispose", { REG }}, \{ "not_power_of_two_operand", { CONST_INT }}, #endif /* ! GCC_V850_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -