📄 avr.h
字号:
{ \ if (reg_equiv_address[REGNO (XEXP (X, 0))] != 0) \ { \ int regno = REGNO (XEXP (X, 0)); \ rtx mem = make_memloc (X, regno); \ push_reload (XEXP (mem,0), NULL, &XEXP (mem,0), NULL, \ POINTER_REGS, Pmode, VOIDmode, 0, 0, \ 1, ADDR_TYPE (TYPE)); \ push_reload (mem, NULL_RTX, &XEXP (X, 0), NULL, \ BASE_POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \ OPNUM, TYPE); \ goto WIN; \ } \ push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL, \ BASE_POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \ OPNUM, TYPE); \ goto WIN; \ } \ else if (! (frame_pointer_needed && XEXP (X,0) == frame_pointer_rtx)) \ { \ push_reload (X, NULL_RTX, &X, NULL, \ POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \ OPNUM, TYPE); \ goto WIN; \ } \ } \} while(0)#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) \ goto LABEL#define LEGITIMATE_CONSTANT_P(X) 1#define REGISTER_MOVE_COST(MODE, FROM, TO) ((FROM) == STACK_REG ? 6 \ : (TO) == STACK_REG ? 12 \ : 2)#define MEMORY_MOVE_COST(MODE,CLASS,IN) ((MODE)==QImode ? 2 : \ (MODE)==HImode ? 4 : \ (MODE)==SImode ? 8 : \ (MODE)==SFmode ? 8 : 16)#define BRANCH_COST 0#define SLOW_BYTE_ACCESS 0#define NO_FUNCTION_CSE#define TEXT_SECTION_ASM_OP "\t.text"#define DATA_SECTION_ASM_OP "\t.data"#define BSS_SECTION_ASM_OP "\t.section .bss"/* Define the pseudo-ops used to switch to the .ctors and .dtors sections. There are no shared libraries on this target, and these sections are placed in the read-only program memory, so they are not writable. */#undef CTORS_SECTION_ASM_OP#define CTORS_SECTION_ASM_OP "\t.section .ctors,\"a\",@progbits"#undef DTORS_SECTION_ASM_OP#define DTORS_SECTION_ASM_OP "\t.section .dtors,\"a\",@progbits"#define TARGET_ASM_CONSTRUCTOR avr_asm_out_ctor#define TARGET_ASM_DESTRUCTOR avr_asm_out_dtor#define EXTRA_SECTIONS in_progmem#define EXTRA_SECTION_FUNCTIONS \ \void \progmem_section (void) \{ \ if (in_section != in_progmem) \ { \ fprintf (asm_out_file, \ "\t.section .progmem.gcc_sw_table, \"%s\", @progbits\n", \ AVR_MEGA ? "a" : "ax"); \ /* Should already be aligned, this is just to be safe if it isn't. */ \ fprintf (asm_out_file, "\t.p2align 1\n"); \ in_section = in_progmem; \ } \}#define READONLY_DATA_SECTION data_section#define JUMP_TABLES_IN_TEXT_SECTION 0#define ASM_COMMENT_START " ; "#define ASM_APP_ON "/* #APP */\n"#define ASM_APP_OFF "/* #NOAPP */\n"/* Switch into a generic section. */#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section#define ASM_OUTPUT_ASCII(FILE, P, SIZE) gas_output_ascii (FILE,P,SIZE)#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '\n' \ || ((C) == '$'))#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \do { \ fputs ("\t.comm ", (STREAM)); \ assemble_name ((STREAM), (NAME)); \ fprintf ((STREAM), ",%lu,1\n", (unsigned long)(SIZE)); \} while (0)#define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED) \ asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED))#define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \do { \ fputs ("\t.lcomm ", (STREAM)); \ assemble_name ((STREAM), (NAME)); \ fprintf ((STREAM), ",%d\n", (int)(SIZE)); \} while (0)#undef TYPE_ASM_OP#undef SIZE_ASM_OP#undef WEAK_ASM_OP#define TYPE_ASM_OP "\t.type\t"#define SIZE_ASM_OP "\t.size\t"#define WEAK_ASM_OP "\t.weak\t"/* Define the strings used for the special svr4 .type and .size directives. These strings generally do not vary from one system running svr4 to another, but if a given system (e.g. m88k running svr) needs to use different pseudo-op names for these, they may be overridden in the file which includes this one. */#undef TYPE_OPERAND_FMT#define TYPE_OPERAND_FMT "@%s"/* The following macro defines the format used to output the second operand of the .type assembler directive. Different svr4 assemblers expect various different forms for this operand. The one given here is just a default. You may need to override it in your machine- specific tm.h file (depending upon the particulars of your assembler). */#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \do { \ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ ASM_OUTPUT_LABEL (FILE, NAME); \} while (0)#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ do { \ if (!flag_inhibit_size_directive) \ ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ } while (0)#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \do { \ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ size_directive_output = 0; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ { \ size_directive_output = 1; \ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, \ int_size_in_bytes (TREE_TYPE (DECL))); \ } \ ASM_OUTPUT_LABEL(FILE, NAME); \} while (0)#undef ASM_FINISH_DECLARE_OBJECT#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \do { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ HOST_WIDE_INT size; \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ && ! AT_END && TOP_LEVEL \ && DECL_INITIAL (DECL) == error_mark_node \ && !size_directive_output) \ { \ size_directive_output = 1; \ size = int_size_in_bytes (TREE_TYPE (DECL)); \ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } while (0)#define ESCAPES \"\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\\0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"/* A table of bytes codes used by the ASM_OUTPUT_ASCII and ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table corresponds to a particular byte value [0..255]. For any given byte value, if the value in the corresponding table position is zero, the given character can be output directly. If the table value is 1, the byte must be output as a \ooo octal escape. If the tables value is anything else, then the byte value should be output as a \ followed by the value in the table. Note that we can use standard UN*X escape sequences for many control characters, but we don't use \a to represent BEL because some svr4 assemblers (e.g. on the i386) don't know about that. Also, we don't use \v since some versions of gas, such as 2.2 did not accept it. */#define STRING_LIMIT ((unsigned) 64)#define STRING_ASM_OP "\t.string\t"/* Some svr4 assemblers have a limit on the number of characters which can appear in the operand of a .string directive. If your assembler has such a limitation, you should define STRING_LIMIT to reflect that limit. Note that at least some svr4 assemblers have a limit on the actual number of bytes in the double-quoted string, and that they count each character in an escape sequence as one byte. Thus, an escape sequence like \377 would count as four bytes. If your target assembler doesn't support the .string directive, you should define this to zero. *//* Globalizing directive for a label. */#define GLOBAL_ASM_OP ".global\t"#define ASM_WEAKEN_LABEL(FILE, NAME) \ do \ { \ fputs ("\t.weak\t", (FILE)); \ assemble_name ((FILE), (NAME)); \ fputc ('\n', (FILE)); \ } \ while (0)#define SUPPORTS_WEAK 1#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \sprintf (STRING, "*.%s%lu", PREFIX, (unsigned long)(NUM))#define HAS_INIT_SECTION 1#define REGISTER_NAMES { \ "r0","r1","r2","r3","r4","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","r30","r31", \ "__SPL__","__SPH__","argL","argH"}#define FINAL_PRESCAN_INSN(insn, operand, nop) final_prescan_insn (insn, operand,nop)#define PRINT_OPERAND(STREAM, X, CODE) print_operand (STREAM, X, CODE)#define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '~')#define PRINT_OPERAND_ADDRESS(STREAM, X) print_operand_address(STREAM, X)#define USER_LABEL_PREFIX ""#define ASSEMBLER_DIALECT AVR_ENHANCED#define ASM_OUTPUT_REG_PUSH(STREAM, REGNO) \{ \ if (REGNO > 31) \ abort (); \ fprintf (STREAM, "\tpush\tr%d", REGNO); \}#define ASM_OUTPUT_REG_POP(STREAM, REGNO) \{ \ if (REGNO > 31) \ abort (); \ fprintf (STREAM, "\tpop\tr%d", REGNO); \}#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ avr_output_addr_vec_elt(STREAM, VALUE)#define ASM_OUTPUT_CASE_LABEL(STREAM, PREFIX, NUM, TABLE) \ progmem_section (), (*targetm.asm_out.internal_label) (STREAM, PREFIX, NUM)#define ASM_OUTPUT_SKIP(STREAM, N) \fprintf (STREAM, "\t.skip %lu,0\n", (unsigned long)(N))#define ASM_OUTPUT_ALIGN(STREAM, POWER)#define CASE_VECTOR_MODE HImodeextern int avr_case_values_threshold;#define CASE_VALUES_THRESHOLD avr_case_values_threshold#undef WORD_REGISTER_OPERATIONS#define MOVE_MAX 4#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1#define Pmode HImode#define FUNCTION_MODE HImode#define DOLLARS_IN_IDENTIFIERS 0#define NO_DOLLAR_IN_LABEL 1#define TRAMPOLINE_TEMPLATE(FILE) \ internal_error ("trampolines not supported")#define TRAMPOLINE_SIZE 4#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \{ \ emit_move_insn (gen_rtx_MEM (HImode, plus_constant ((TRAMP), 2)), CXT); \ emit_move_insn (gen_rtx_MEM (HImode, plus_constant ((TRAMP), 6)), FNADDR); \}/* 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 NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP, INSN)/* The add insns don't set overflow in a usable way. */#define CC_OVERFLOW_UNUSABLE 01000/* The mov,and,or,xor insns don't set carry. That's ok though as the Z bit is all we need when doing unsigned comparisons on the result of these insns (since they're always with 0). However, conditions.h has CC_NO_OVERFLOW defined for this purpose. Rename it to something more understandable. */#define CC_NO_CARRY CC_NO_OVERFLOW/* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */#define FUNCTION_PROFILER(FILE, LABELNO) \ fprintf (FILE, "/* profiler %d */", (LABELNO))#define ADJUST_INSN_LENGTH(INSN, LENGTH) (LENGTH =\ adjust_insn_length (INSN, LENGTH))#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"#define CC1_SPEC "%{profile:-p}"#define CC1PLUS_SPEC "%{!frtti:-fno-rtti} \ %{!fenforce-eh-specs:-fno-enforce-eh-specs} \ %{!fexceptions:-fno-exceptions}"/* A C string constant that tells the GCC drvier program options to pass to `cc1plus'. */#define ASM_SPEC "%{mmcu=*:-mmcu=%*}"#define LINK_SPEC " %{!mmcu*:-m avr2}\%{mmcu=at90s1200|mmcu=attiny11|mmcu=attiny12|mmcu=attiny15|mmcu=attiny28:-m avr1} \%{mmcu=attiny22|mmcu=attiny26|mmcu=at90s2*|mmcu=at90s4*|mmcu=at90s8*|mmcu=at90c8*|mmcu=at86rf401|mmcu=attiny13|mmcu=attiny2313:-m avr2}\%{mmcu=atmega103|mmcu=atmega603|mmcu=at43*|mmcu=at76*:-m avr3}\%{mmcu=atmega8*|mmcu=atmega48:-m avr4}\%{mmcu=atmega16*|mmcu=atmega32*|mmcu=atmega64*|mmcu=atmega128|mmcu=at90can128|mmcu=at94k:-m avr5}\%{mmcu=atmega325|mmcu=atmega3250|mmcu=atmega48|mmcu=atmega88|mmcu=atmega64|mmcu=atmega645|mmcu=atmega6450|mmcu=atmega128|mmcu=at90can128|mmcu=at90can128|mmcu=atmega162|mmcu=atmega165|mmcu=atmega168|mmcu=atmega169: -Tdata 0x800100} "#define LIB_SPEC \ "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}"#define LIBSTDCXX "-lgcc"/* No libstdc++ for now. Empty string doesn't work. */#define LIBGCC_SPEC \ "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lgcc }}}}}"#define STARTFILE_SPEC "%(crt_binutils)"#define ENDFILE_SPEC ""#define CRT_BINUTILS_SPECS "\%{mmcu=at90s1200|mmcu=avr1:crts1200.o%s} \%{mmcu=attiny11:crttn11.o%s} \%{mmcu=attiny12:crttn12.o%s} \%{mmcu=attiny15:crttn15.o%s} \%{mmcu=attiny28:crttn28.o%s} \%{!mmcu*|mmcu=at90s8515|mmcu=avr2:crts8515.o%s} \%{mmcu=at90s2313:crts2313.o%s} \%{mmcu=at90s2323:crts2323.o%s} \%{mmcu=at90s2333:crts2333.o%s} \%{mmcu=at90s2343:crts2343.o%s} \%{mmcu=attiny22:crttn22.o%s} \%{mmcu=attiny26:crttn26.o%s} \%{mmcu=at90s4433:crts4433.o%s} \%{mmcu=at90s4414:crts4414.o%s} \%{mmcu=at90s4434:crts4434.o%s} \%{mmcu=at90c8534:crtc8534.o%s} \%{mmcu=at90s8535:crts8535.o%s} \%{mmcu=at86rf401:crt86401.o%s} \%{mmcu=attiny13:crttn13.o%s} \%{mmcu=attiny2313:crttn2313.o%s} \%{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \%{mmcu=atmega603:crtm603.o%s} \%{mmcu=at43usb320:crt43320.o%s} \%{mmcu=at43usb355:crt43355.o%s} \%{mmcu=at76c711:crt76711.o%s} \%{mmcu=atmega8|mmcu=avr4:crtm8.o%s} \%{mmcu=atmega48:crtm48.o%s} \%{mmcu=atmega88:crtm88.o%s} \%{mmcu=atmega8515:crtm8515.o%s} \%{mmcu=atmega8535:crtm8535.o%s} \%{mmcu=atmega16:crtm16.o%s} \%{mmcu=atmega161|mmcu=avr5:crtm161.o%s} \%{mmcu=atmega162:crtm162.o%s} \%{mmcu=atmega163:crtm163.o%s} \%{mmcu=atmega165:crtm165.o%s} \%{mmcu=atmega168:crtm168.o%s} \%{mmcu=atmega169:crtm169.o%s} \%{mmcu=atmega32:crtm32.o%s} \%{mmcu=atmega323:crtm323.o%s} \%{mmcu=atmega325:crtm325.o%s} \%{mmcu=atmega3250:crtm3250.o%s} \%{mmcu=atmega64:crtm64.o%s} \%{mmcu=atmega645:crtm6450.o%s} \%{mmcu=atmega6450:crtm6450.o%s} \%{mmcu=atmega128:crtm128.o%s} \%{mmcu=at90can128:crtcan128.o%s} \%{mmcu=at94k:crtat94k.o%s}"#define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS},/* This is the default without any -mmcu=* option (AT90S*). */#define MULTILIB_DEFAULTS { "mmcu=avr2" }/* This is undefined macro for collect2 disabling */#define LINKER_NAME "ld"#define TEST_HARD_REG_CLASS(CLASS, REGNO) \ TEST_HARD_REG_BIT (reg_class_contents[ (int) (CLASS)], REGNO)/* Note that the other files fail to use these in some of the places where they should. */#if defined(__STDC__) || defined(ALMOST_STDC)#define AS2(a,b,c) #a " " #b "," #c#define AS2C(b,c) " " #b "," #c#define AS3(a,b,c,d) #a " " #b "," #c "," #d#define AS1(a,b) #a " " #b#else#define AS1(a,b) "a b"#define AS2(a,b,c) "a b,c"#define AS2C(b,c) " b,c"#define AS3(a,b,c,d) "a b,c,d"#endif#define OUT_AS1(a,b) output_asm_insn (AS1(a,b), operands)#define OUT_AS2(a,b,c) output_asm_insn (AS2(a,b,c), operands)#define CR_TAB "\n\t"/* Temporary register r0 */#define TMP_REGNO 0/* zero register r1 */#define ZERO_REGNO 1#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -