📄 m68hc11.h
字号:
has an effect that depends on the machine mode it is used for. */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \{ \ if (GET_CODE (ADDR) == PRE_DEC || GET_CODE (ADDR) == POST_DEC \ || GET_CODE (ADDR) == PRE_INC || GET_CODE (ADDR) == POST_INC) \ goto 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. */#define NOTICE_UPDATE_CC(EXP, INSN) \ m68hc11_notice_update_cc ((EXP), (INSN))/* Move costs between classes of registers */#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ (m68hc11_register_move_cost (MODE, CLASS1, CLASS2))/* Move cost between register and memory. - Move to a 16-bit register is reasonable, - Move to a soft register can be expensive. */#define MEMORY_MOVE_COST(MODE,CLASS,IN) \ m68hc11_memory_move_cost ((MODE),(CLASS),(IN))/* A C expression for the cost of a branch instruction. A value of 1 is the default; other values are interpreted relative to that. Pretend branches are cheap because GCC generates sub-optimal code for the default value. */#define BRANCH_COST 0/* Nonzero if access to memory by bytes is slow and undesirable. */#define SLOW_BYTE_ACCESS 0/* It is as good to call a constant function address as to call an address kept in a register. */#define NO_FUNCTION_CSE/* Try a machine-dependent way of reloading an illegitimate address operand. If we find one, push the reload and jump to WIN. This macro is used in only one place: `find_reloads_address' in reload.c. For M68HC11, we handle large displacements of a base register by splitting the addend across an addhi3 insn. For M68HC12, the 64K offset range is available. */#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN) \do { \ /* We must recognize output that we have already generated ourselves. */ \ if (GET_CODE (X) == PLUS \ && GET_CODE (XEXP (X, 0)) == PLUS \ && GET_CODE (XEXP (XEXP (X, 0), 0)) == REG \ && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT \ && GET_CODE (XEXP (X, 1)) == CONST_INT) \ { \ push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL, \ BASE_REG_CLASS, GET_MODE (X), VOIDmode, 0, 0, \ OPNUM, TYPE); \ goto WIN; \ } \ if (GET_CODE (X) == PLUS \ && GET_CODE (XEXP (X, 0)) == REG \ && GET_CODE (XEXP (X, 1)) == CONST_INT \ && !VALID_CONSTANT_OFFSET_P (XEXP (X, 1), MODE)) \ { \ HOST_WIDE_INT val = INTVAL (XEXP (X, 1)); \ HOST_WIDE_INT low, high; \ high = val & (~0x0FF); \ low = val & 0x00FF; \ if (low >= 256-15) { high += 16; low -= 16; } \ /* Reload the high part into a base reg; leave the low part \ in the mem directly. */ \ \ X = gen_rtx_PLUS (Pmode, \ gen_rtx_PLUS (Pmode, XEXP (X, 0), \ GEN_INT (high)), \ GEN_INT (low)); \ \ push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL, \ BASE_REG_CLASS, GET_MODE (X), VOIDmode, 0, 0, \ OPNUM, TYPE); \ goto WIN; \ } \} while (0)/* Defining the Output Assembler Language. *//* A default list of other sections which we might be "in" at any given time. For targets that use additional sections (e.g. .tdesc) you should override this definition in the target-specific file which includes this file. *//* Output before read-only data. */#define TEXT_SECTION_ASM_OP ("\t.sect\t.text")/* Output before writable data. */#define DATA_SECTION_ASM_OP ("\t.sect\t.data")/* Output before uninitialized data. */#define BSS_SECTION_ASM_OP ("\t.sect\t.bss")/* Define the pseudo-ops used to switch to the .ctors and .dtors sections. Same as config/elfos.h but don't mark these section SHF_WRITE since there is no shared library problem. */#undef CTORS_SECTION_ASM_OP#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"a\""#undef DTORS_SECTION_ASM_OP#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"a\""#define TARGET_ASM_CONSTRUCTOR m68hc11_asm_out_constructor#define TARGET_ASM_DESTRUCTOR m68hc11_asm_out_destructor/* Comment character */#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 "; Begin inline assembler code\n#APP\n"/* Output to assembler file text saying following lines no longer contain unusual constructs. */#define ASM_APP_OFF "; End of inline assembler code\n#NO_APP\n"/* Write the extra assembler code needed to declare a function properly. Some svr4 assemblers need to also have something extra said about the function's return value. We allow for that here. For 68HC12 we mark functions that return with 'rtc'. The linker will ensure that a 'call' is really made (instead of 'jsr'). The debugger needs this information to correctly compute the stack frame. For 68HC11/68HC12 we also mark interrupt handlers for gdb to compute the correct stack frame. */#undef ASM_DECLARE_FUNCTION_NAME#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do \ { \ fprintf (FILE, "%s", TYPE_ASM_OP); \ assemble_name (FILE, NAME); \ putc (',', FILE); \ fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ putc ('\n', FILE); \ \ if (current_function_far) \ { \ fprintf (FILE, "\t.far\t"); \ assemble_name (FILE, NAME); \ putc ('\n', FILE); \ } \ else if (current_function_interrupt \ || current_function_trap) \ { \ fprintf (FILE, "\t.interrupt\t"); \ assemble_name (FILE, NAME); \ putc ('\n', FILE); \ } \ ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ ASM_OUTPUT_LABEL(FILE, NAME); \ } \ while (0)/* Output #ident as a .ident. *//* output external reference */#define ASM_OUTPUT_EXTERNAL(FILE,DECL,NAME) \ {fputs ("\t; extern\t", FILE); \ assemble_name (FILE, NAME); \ fputs ("\n", FILE);}/* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number (see above). */#define REGISTER_NAMES \{ "x", "d", "y", "sp", "pc", "a", "b", "ccr", "z", \ "*_.frame", "*_.tmp", "*_.z", "*_.xy", "*fake clobber", \ SOFT_REG_NAMES, "*sframe", "*ap"}/* Print an instruction operand X on file FILE. CODE is the code from the %-spec for printing this operand. If `%z3' was used to print operand 3, then CODE is 'z'. */#define PRINT_OPERAND(FILE, X, CODE) \ print_operand (FILE, X, CODE)/* Print a memory operand whose address is X, on file FILE. */#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ print_operand_address (FILE, ADDR)/* This is how to output an insn to push/pop a register on the stack. It need not be very fast code. Don't define because we don't know how to handle that with the STATIC_CHAIN_REGNUM (soft register). Saving the static chain must be made inside FUNCTION_PROFILER. */#undef ASM_OUTPUT_REG_PUSH#undef ASM_OUTPUT_REG_POP/* 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\tL%d-L%d\n", integer_asm_op (2, TRUE), VALUE, REL)/* 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\t.L%d\n", integer_asm_op (2, TRUE), VALUE)/* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. */#define ASM_OUTPUT_ALIGN(FILE,LOG) \ do { \ if ((LOG) > 1) \ fprintf ((FILE), "%s\n", ALIGN_ASM_OP); \ } while (0)/* Assembler Commands for Exception Regions. *//* Default values provided by GCC should be ok. Assuming that DWARF-2 frame unwind info is ok for this platform. */#undef PREFERRED_DEBUGGING_TYPE#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG/* For the support of memory banks we need addresses that indicate the page number. */#define DWARF2_ADDR_SIZE 4/* SCz 2003-07-08: Don't use as dwarf2 .file/.loc directives because the linker is doing relaxation and it does not adjust the debug_line sections when it shrinks the code. This results in invalid addresses when debugging. This does not bless too much the HC11/HC12 as most applications are embedded and small, hence a reasonable debug info. This problem is known for binutils 2.13, 2.14 and mainline. */#undef HAVE_AS_DWARF2_DEBUG_LINE/* The prefix for local labels. You should be able to define this as an empty string, or any arbitrary string (such as ".", ".L%", etc) without having to make any other changes to account for the specific definition. Note it is a string literal, not interpreted by printf and friends. */#define LOCAL_LABEL_PREFIX "."/* The prefix for immediate operands. */#define IMMEDIATE_PREFIX "#"#define GLOBAL_ASM_OP "\t.globl\t"/* Miscellaneous Parameters. *//* Specify the machine mode that this machine uses for the index in the tablejump instruction. */#define CASE_VECTOR_MODE Pmode/* 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 2/* MOVE_RATIO is the number of move instructions that is better than a block move. Make this small on 6811, since the code size grows very large with each move. */#define MOVE_RATIO 3/* 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 HImode/* 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 QImodeextern int debug_m6811;extern int z_replacement_completed;extern int current_function_interrupt;extern int current_function_trap;extern int current_function_far;extern GTY(()) rtx m68hc11_compare_op0;extern GTY(()) rtx m68hc11_compare_op1;extern GTY(()) rtx m68hc11_soft_tmp_reg;extern GTY(()) rtx ix_reg;extern GTY(()) rtx iy_reg;extern GTY(()) rtx d_reg;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -