📄 mn10200.h
字号:
#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {}/* 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) 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)/* The mn10200 has a limited number of registers, so CSE of function addresses generally makes code worse due to register pressure. */#define NO_FUNCTION_CSE/* Compute the cost of computing a constant rtl expression RTX whose rtx-code is CODE. The body of this macro is a portion of a switch statement. If the code is computed here, return it with a return statement. Otherwise, break from the switch. */#define CONST_COSTS(RTX,CODE,OUTER_CODE) \ case CONST_INT: \ /* Zeros are extremely cheap. */ \ if (INTVAL (RTX) == 0) \ return 0; \ /* If it fits in 8 bits, then it's still relatively cheap. */ \ if (INT_8_BITS (INTVAL (RTX))) \ return 1; \ /* This is the "base" cost, includes constants where either the \ upper or lower 16bits are all zeros. */ \ if (INT_16_BITS (INTVAL (RTX)) \ || (INTVAL (RTX) & 0xffff) == 0 \ || (INTVAL (RTX) & 0xffff0000) == 0) \ return 2; \ return 4; \ /* These are more costly than a CONST_INT, but we can relax them, \ so they're less costly than a CONST_DOUBLE. */ \ case CONST: \ case LABEL_REF: \ case SYMBOL_REF: \ return 6; \ /* We don't optimize CONST_DOUBLEs well nor do we relax them well, \ so their cost is very high. */ \ case CONST_DOUBLE: \ return 8;/* Make moves between different classes more expensive than moves within the same class. */#define REGISTER_MOVE_COST(CLASS1, CLASS2) (CLASS1 != CLASS2 ? 4 : 2)/* Provide the costs of a rtl expression. This is in the body of a switch on CODE. ?!? This probably needs more work. The definitions below were first taken from the H8 port, then tweaked slightly to improve code density on various sample codes. */#define RTX_COSTS(RTX,CODE,OUTER_CODE) \ case MOD: \ case DIV: \ return 8; \ case MULT: \ return (GET_MODE (RTX) == SImode ? 20 : 8);/* 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 MN10200 series, code size our primary concern. */#define MOVE_RATIO 6#define TEXT_SECTION_ASM_OP "\t.section .text"#define DATA_SECTION_ASM_OP "\t.section .data"#define BSS_SECTION_ASM_OP "\t.section .bss"/* 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"/* This is how to output an assembler line defining a `double' constant. It is .dfloat or .gfloat, 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. Try to use asm_output_bss to implement this macro. */#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ asm_output_aligned_bss ((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 \{ "d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3"}/* Print an instruction operand X on file FILE. look in mn10200.c for details */#define PRINT_OPERAND(FILE, X, CODE) print_operand(FILE,X,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", ".long", 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", ".long", 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 mn10200. */#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/* GDB always assumes the current function's frame begins at the value of the stack pointer upon entry to the current function. Accessing local variables and parameters passed on the stack is done using the base of the frame + an offset provided by GCC. For functions which have frame pointers this method works fine; the (frame pointer) == (stack pointer at function entry) and GCC provides an offset relative to the frame pointer. This loses for functions without a frame pointer; GCC provides an offset which is relative to the stack pointer after adjusting for the function's frame size. GDB would prefer the offset to be relative to the value of the stack pointer at the function's entry. Yuk! */#define DEBUGGER_AUTO_OFFSET(X) \ ((GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0) \ + (frame_pointer_needed ? 0 : -total_frame_size ()))#define DEBUGGER_ARG_OFFSET(OFFSET, X) \ ((GET_CODE (X) == PLUS ? OFFSET : 0) \ + (frame_pointer_needed ? 0 : -total_frame_size ()))/* We need to prepend underscores. */#define ASM_OUTPUT_DWARF2_ADDR_CONST(FILE,ADDR) \ fprintf ((FILE), "\t%s\t_%s", UNALIGNED_WORD_ASM_OP, (ADDR)) /* 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 Pmode/* Dispatch tables on the mn10200 are extremely expensive in terms of code and readonly data size. So we crank up the case threshold value to encourage a series of if/else comparisons to implement many small switch statements. In theory, this value could be increased much more if we were solely optimizing for space, but we keep it "reasonable" to avoid serious code efficiency lossage. */#define CASE_VALUES_THRESHOLD 8/* Define if operations between registers always perform the operation on the full register even if a narrower mode is specified. */#define WORD_REGISTER_OPERATIONS/* We could define this either way. Using ZERO_EXTEND for QImode makes slightly fast and more compact code. */#define LOAD_EXTEND_OP(MODE) ZERO_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 2/* 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) (OUTPREC != 32)/* 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 PSImode/* 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/* Perform target dependent optabs initialization. */#define MODHI3_LIBCALL "__modhi3"#define DIVHI3_LIBCALL "__divhi3"#define INIT_TARGET_OPTABS \ do { \ sdiv_optab->handlers[(int) HImode].libfunc \ = gen_rtx (SYMBOL_REF, Pmode, DIVHI3_LIBCALL); \ smod_optab->handlers[(int) HImode].libfunc \ = gen_rtx (SYMBOL_REF, Pmode, MODHI3_LIBCALL); \ } while (0)/* The assembler op to get a word. */#define FILE_ASM_OP "\t.file\n"extern void asm_file_start ();extern void print_operand ();extern void print_operand_address ();extern void expand_prologue ();extern void expand_epilogue ();extern void notice_update_cc ();extern int call_address_operand ();extern enum reg_class secondary_reload_class ();extern char *emit_a_shift ();extern int current_function_needs_context;extern char *output_tst ();extern int extendpsi_operand ();extern int rtx_equal_function_value_matters;extern struct rtx_def *zero_dreg;extern struct rtx_def *zero_areg;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -