📄 m32r.h
字号:
significant de-optimization. *//* #define ENABLE_REGMOVE_PASS *//* A C statement (sans semicolon) to update the integer variable COST based on the relationship between INSN that is dependent on DEP_INSN through the dependence LINK. The default is to make no adjustment to COST. This can be used for example to specify to the scheduler that an output- or anti-dependence does not incur the same cost as a data-dependence. *//* #define ADJUST_COST(INSN,LINK,DEP_INSN,COST) \ (COST) = m32r_adjust_cost (INSN, LINK, DEP_INSN, COST) *//* A C statement (sans semicolon) to update the integer scheduling priority `INSN_PRIORITY(INSN)'. Reduce the priority to execute the INSN earlier, increase the priority to execute INSN later. Do not define this macro if you do not need to adjust the scheduling priorities of insns. *//* #define ADJUST_PRIORITY (INSN) *//* Macro to determine whether the Haifa scheduler is used. */#ifdef HAIFA#define HAIFA_P 1#else#define HAIFA_P 0#endif/* Indicate how many instructions can be issued at the same time. This is 1/2 of a lie. The m32r can issue only 1 long insn at once, but 2. However doing so allows the scheduler to group the two short insns together. */#define ISSUE_RATE 2/* When the `length' insn attribute is used, this macro specifies the value to be assigned to the address of the first insn in a function. If not specified, 0 is used. */#define FIRST_INSN_ADDRESS m32r_first_insn_address ()/* Section selection. */#define TEXT_SECTION_ASM_OP "\t.section .text"#define DATA_SECTION_ASM_OP "\t.section .data"#define RODATA_SECTION_ASM_OP "\t.section .rodata"#define BSS_SECTION_ASM_OP "\t.section .bss"#define SDATA_SECTION_ASM_OP "\t.section .sdata"#define SBSS_SECTION_ASM_OP "\t.section .sbss"/* This one is for svr4.h. */#undef CONST_SECTION_ASM_OP#define CONST_SECTION_ASM_OP "\t.section .rodata"/* 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_sdata, in_sbss, in_const, in_ctors, in_dtors/* 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#define EXTRA_SECTION_FUNCTIONS \CONST_SECTION_FUNCTION \CTORS_SECTION_FUNCTION \DTORS_SECTION_FUNCTION \SDATA_SECTION_FUNCTION \SBSS_SECTION_FUNCTION#define SDATA_SECTION_FUNCTION \void \sdata_section () \{ \ if (in_section != in_sdata) \ { \ fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \ in_section = in_sdata; \ } \} \#define SBSS_SECTION_FUNCTION \void \sbss_section () \{ \ if (in_section != in_sbss) \ { \ fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP); \ in_section = in_sbss; \ } \} \/* A C statement or statements to switch to the appropriate section for output of EXP. You can assume that EXP is either a `VAR_DECL' node or a constant of some sort. RELOC indicates whether the initial value of EXP requires link-time relocations. */extern void m32r_select_section ();#undef SELECT_SECTION#define SELECT_SECTION(EXP, RELOC) m32r_select_section ((EXP), (RELOC))/* 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. */#undef SELECT_RTX_SECTION/* Define this macro if jump tables (for tablejump insns) should be output in the text section, along with the assembler instructions. Otherwise, the readonly data section is used. This macro is irrelevant if there is no separate readonly data section. *//*#define JUMP_TABLES_IN_TEXT_SECTION*//* Define this macro if references to a symbol must be treated differently depending on something about the variable or function named by the symbol (such as what section it is in). The macro definition, if any, is executed immediately after the rtl for DECL or other node is created. The value of the rtl will be a `mem' whose address is a `symbol_ref'. The usual thing for this macro to do is to store a flag in the `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified name string in the `symbol_ref' (if one bit is not enough information). */#define SDATA_FLAG_CHAR '@'/* Small objects are recorded with no prefix for space efficiency since they'll be the most common. This isn't the case if the user passes -mmodel={medium|large} and one could choose to not mark symbols that are the default, but that complicates things. *//*#define SMALL_FLAG_CHAR '#'*/#define MEDIUM_FLAG_CHAR '%'#define LARGE_FLAG_CHAR '&'#define SDATA_NAME_P(NAME) (*(NAME) == SDATA_FLAG_CHAR)/*#define SMALL_NAME_P(NAME) (*(NAME) == SMALL_FLAG_CHAR)*/#define SMALL_NAME_P(NAME) (! ENCODED_NAME_P (NAME) && ! LIT_NAME_P (NAME))#define MEDIUM_NAME_P(NAME) (*(NAME) == MEDIUM_FLAG_CHAR)#define LARGE_NAME_P(NAME) (*(NAME) == LARGE_FLAG_CHAR)/* For string literals, etc. */#define LIT_NAME_P(NAME) ((NAME)[0] == '*' && (NAME)[1] == '.')#define ENCODED_NAME_P(SYMBOL_NAME) \(SDATA_NAME_P (SYMBOL_NAME) \ /*|| SMALL_NAME_P (SYMBOL_NAME)*/ \ || MEDIUM_NAME_P (SYMBOL_NAME) \ || LARGE_NAME_P (SYMBOL_NAME))#define ENCODE_SECTION_INFO(DECL) m32r_encode_section_info (DECL)/* Decode SYM_NAME and store the real name part in VAR, sans the characters that encode section info. Define this macro if ENCODE_SECTION_INFO alters the symbol's name string. *//* Note that we have to handle symbols like "%*start". */#define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME) \do { \ (VAR) = (SYMBOL_NAME) + ENCODED_NAME_P (SYMBOL_NAME); \ (VAR) += *(VAR) == '*'; \} while (0)/* PIC *//* The register number of the register used to address a table of static data addresses in memory. In some cases this register is defined by a processor's ``application binary interface'' (ABI). When this macro is defined, RTL is generated for this register once, as with the stack pointer and frame pointer registers. If this macro is not defined, it is up to the machine-dependent files to allocate such a register (if necessary). *//*#define PIC_OFFSET_TABLE_REGNUM 12*//* Define this macro if the register defined by PIC_OFFSET_TABLE_REGNUM is clobbered by calls. Do not define this macro if PIC_OFFSET_TABLE_REGNUM is not defined. *//* This register is call-saved on the M32R. *//*#define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED*//* By generating position-independent code, when two different programs (A and B) share a common library (libC.a), the text of the library can be shared whether or not the library is linked at the same address for both programs. In some of these environments, position-independent code requires not only the use of different addressing modes, but also special code to enable the use of these addressing modes. The FINALIZE_PIC macro serves as a hook to emit these special codes once the function is being compiled into assembly code, but not before. (It is not done before, because in the case of compiling an inline function, it would lead to multiple PIC prologues being included in functions which used inline functions and were compiled to assembly language.) *//*#define FINALIZE_PIC m32r_finalize_pic ()*//* A C expression that is nonzero if X is a legitimate immediate operand on the target machine when generating position independent code. You can assume that X satisfies CONSTANT_P, so you need not check this. You can also assume `flag_pic' is true, so you need not check it either. You need not define this macro if all constants (including SYMBOL_REF) can be immediate operands when generating position independent code. *//*#define LEGITIMATE_PIC_OPERAND_P(X)*//* Control the assembler format that we output. *//* Output at beginning of assembler file. */#define ASM_FILE_START(FILE) m32r_asm_file_start (FILE)/* A C string constant describing how to begin a comment in the target assembler language. The compiler assumes that the comment will end at the end of the line. */#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 ""/* Output to assembler file text saying following lines no longer contain unusual constructs. */#define ASM_APP_OFF ""/* This is how to output an assembler line defining a `char' constant. */#define ASM_OUTPUT_CHAR(FILE, VALUE) \do { \ fprintf (FILE, "\t.byte\t"); \ output_addr_const (FILE, (VALUE)); \ fprintf (FILE, "\n"); \} while (0)/* This is how to output an assembler line defining a `short' constant. */#define ASM_OUTPUT_SHORT(FILE, VALUE) \do { \ fprintf (FILE, "\t.hword\t"); \ output_addr_const (FILE, (VALUE)); \ fprintf (FILE, "\n"); \} while (0)/* This is how to output an assembler line defining an `int' constant. We also handle symbol output here. */#define ASM_OUTPUT_INT(FILE, VALUE) \do { \ fprintf (FILE, "\t.word\t"); \ output_addr_const (FILE, (VALUE)); \ fprintf (FILE, "\n"); \} while (0)/* This is how to output an assembler line defining a `float' constant. */#define ASM_OUTPUT_FLOAT(FILE, VALUE) \do { \ long t; \ char str[30]; \ REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \ fprintf (FILE, "\t.word\t0x%lx %s %s\n", \ t, ASM_COMMENT_START, str); \} while (0)/* This is how to output an assembler line defining a `double' constant. */#define ASM_OUTPUT_DOUBLE(FILE, VALUE) \do { \ long t[2]; \ char str[30]; \ REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \ REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \ fprintf (FILE, "\t.word\t0x%lx %s %s\n\t.word\t0x%lx\n", \ t[0], ASM_COMMENT_START, str, t[1]); \} while (0)/* This is how to output an assembler line for a numeric constant byte. */#define ASM_OUTPUT_BYTE(FILE, VALUE) \ fprintf (FILE, "\t%s\t0x%x\n", ASM_BYTE_OP, (VALUE))/* The assembler's parentheses characters. */#define ASM_OPEN_PAREN "("#define ASM_CLOSE_PAREN ")"/* 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. *//* On the M32R we need to ensure the next instruction starts on a 32 bit boundary [the previous insn must either be 2 16 bit insns or 1 32 bit]. */#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\t", 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)); \ asm_fprintf (FILE, "%U%s", real_name); \} while (0) /* If -Os, don't force line number labels to begin at the beginning of the word; we still want the assembler to try to put things in parallel, should that be possible. For m32r/d, instructions are never in parallel (other than with a nop) and the simulator and stub both handle a breakpoint in the middle of a word so don't ever force line number labels to begin at the beginning of a word. */#undef ASM_OUTPUT_SOURCE_LINE#define ASM_OUTPUT_SOURCE_LINE(file, line) \do \ { \ static int sym_lineno = 1; \ fprintf (file, ".stabn 68,0,%d,.LM%d-", \ line, sym_lineno); \ assemble_name (file, \ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\ fprintf (file, \ (optimize_size || TARGET_M32R) \ ? "\n\t.debugsym .LM%d\n" \ : "\n.LM%d:\n", \ sym_lineno); \ sym_lineno += 1; \ } \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 ea
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -