comparison gcc/config/avr/avr.h @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children b7f97abdc517
comparison
equal deleted inserted replaced
52:c156f1bd5cd9 55:77e2b8dfacca
1 /* Definitions of target machine for GNU compiler, 1 /* Definitions of target machine for GNU compiler,
2 for ATMEL AVR at90s8515, ATmega103/103L, ATmega603/603L microcontrollers. 2 for ATMEL AVR at90s8515, ATmega103/103L, ATmega603/603L microcontrollers.
3 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 3 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4 2008, 2009 Free Software Foundation, Inc. 4 2008, 2009 Free Software Foundation, Inc.
5 Contributed by Denis Chertykov (denisc@overta.ru) 5 Contributed by Denis Chertykov (chertykov@gmail.com)
6 6
7 This file is part of GCC. 7 This file is part of GCC.
8 8
9 GCC is free software; you can redistribute it and/or modify 9 GCC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
42 int have_elpmx; 42 int have_elpmx;
43 43
44 /* Core have 'EICALL' and 'EIJMP' instructions. */ 44 /* Core have 'EICALL' and 'EIJMP' instructions. */
45 int have_eijmp_eicall; 45 int have_eijmp_eicall;
46 46
47 /* Reserved. */ 47 /* Reserved for xmega architecture. */
48 int reserved; 48 int reserved;
49
50 /* Reserved for xmega architecture. */
51 int reserved2;
49 52
53 /* Default start of data section address for architecture. */
54 int default_data_section_start;
55
50 const char *const macro; 56 const char *const macro;
57
58 /* Architecture name. */
59 const char *const arch_name;
51 }; 60 };
52 61
62 /* These names are used as the index into the avr_arch_types[] table
63 above. */
64
65 enum avr_arch
66 {
67 ARCH_UNKNOWN,
68 ARCH_AVR1,
69 ARCH_AVR2,
70 ARCH_AVR25,
71 ARCH_AVR3,
72 ARCH_AVR31,
73 ARCH_AVR35,
74 ARCH_AVR4,
75 ARCH_AVR5,
76 ARCH_AVR51,
77 ARCH_AVR6
78 };
79
80 struct mcu_type_s {
81 /* Device name. */
82 const char *const name;
83
84 /* Index in avr_arch_types[]. */
85 int arch;
86
87 /* Must lie outside user's namespace. NULL == no macro. */
88 const char *const macro;
89
90 /* Stack pointer have 8 bits width. */
91 int short_sp;
92
93 /* Start of data section. */
94 int data_section_start;
95
96 /* Name of device library. */
97 const char *const library_name;
98 };
99
100 /* Preprocessor macros to define depending on MCU type. */
101 extern const char *avr_extra_arch_macro;
53 extern const struct base_arch_s *avr_current_arch; 102 extern const struct base_arch_s *avr_current_arch;
54 103 extern const struct mcu_type_s *avr_current_device;
55 #define TARGET_CPU_CPP_BUILTINS() \ 104 extern const struct mcu_type_s avr_mcu_types[];
56 do \ 105 extern const struct base_arch_s avr_arch_types[];
57 { \ 106
58 builtin_define_std ("AVR"); \ 107 #define TARGET_CPU_CPP_BUILTINS() avr_cpu_cpp_builtins (pfile)
59 if (avr_current_arch->macro) \
60 builtin_define (avr_current_arch->macro); \
61 if (avr_extra_arch_macro) \
62 builtin_define (avr_extra_arch_macro); \
63 if (avr_current_arch->have_elpm) \
64 builtin_define ("__AVR_HAVE_RAMPZ__"); \
65 if (avr_current_arch->have_elpm) \
66 builtin_define ("__AVR_HAVE_ELPM__"); \
67 if (avr_current_arch->have_elpmx) \
68 builtin_define ("__AVR_HAVE_ELPMX__"); \
69 if (avr_current_arch->have_movw_lpmx) \
70 { \
71 builtin_define ("__AVR_HAVE_MOVW__"); \
72 builtin_define ("__AVR_HAVE_LPMX__"); \
73 } \
74 if (avr_current_arch->asm_only) \
75 builtin_define ("__AVR_ASM_ONLY__"); \
76 if (avr_current_arch->have_mul) \
77 { \
78 builtin_define ("__AVR_ENHANCED__"); \
79 builtin_define ("__AVR_HAVE_MUL__"); \
80 } \
81 if (avr_current_arch->have_jmp_call) \
82 { \
83 builtin_define ("__AVR_MEGA__"); \
84 builtin_define ("__AVR_HAVE_JMP_CALL__"); \
85 } \
86 if (avr_current_arch->have_eijmp_eicall) \
87 { \
88 builtin_define ("__AVR_HAVE_EIJMP_EICALL__"); \
89 builtin_define ("__AVR_3_BYTE_PC__"); \
90 } \
91 else \
92 { \
93 builtin_define ("__AVR_2_BYTE_PC__"); \
94 } \
95 if (TARGET_NO_INTERRUPTS) \
96 builtin_define ("__NO_INTERRUPTS__"); \
97 } \
98 while (0)
99
100 extern const char *avr_extra_arch_macro;
101 108
102 #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) 109 #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS)
103 extern GTY(()) section *progmem_section; 110 extern GTY(()) section *progmem_section;
104 #endif 111 #endif
105 112
107 #define AVR_HAVE_MUL (avr_current_arch->have_mul) 114 #define AVR_HAVE_MUL (avr_current_arch->have_mul)
108 #define AVR_HAVE_MOVW (avr_current_arch->have_movw_lpmx) 115 #define AVR_HAVE_MOVW (avr_current_arch->have_movw_lpmx)
109 #define AVR_HAVE_LPMX (avr_current_arch->have_movw_lpmx) 116 #define AVR_HAVE_LPMX (avr_current_arch->have_movw_lpmx)
110 #define AVR_HAVE_RAMPZ (avr_current_arch->have_elpm) 117 #define AVR_HAVE_RAMPZ (avr_current_arch->have_elpm)
111 #define AVR_HAVE_EIJMP_EICALL (avr_current_arch->have_eijmp_eicall) 118 #define AVR_HAVE_EIJMP_EICALL (avr_current_arch->have_eijmp_eicall)
119 #define AVR_HAVE_8BIT_SP (avr_current_device->short_sp || TARGET_TINY_STACK)
112 120
113 #define AVR_2_BYTE_PC (!AVR_HAVE_EIJMP_EICALL) 121 #define AVR_2_BYTE_PC (!AVR_HAVE_EIJMP_EICALL)
114 #define AVR_3_BYTE_PC (AVR_HAVE_EIJMP_EICALL) 122 #define AVR_3_BYTE_PC (AVR_HAVE_EIJMP_EICALL)
115 123
116 #define TARGET_VERSION fprintf (stderr, " (GNU assembler syntax)"); 124 #define TARGET_VERSION fprintf (stderr, " (GNU assembler syntax)");
348 356
349 #define ARG_POINTER_REGNUM 34 357 #define ARG_POINTER_REGNUM 34
350 358
351 #define STATIC_CHAIN_REGNUM 2 359 #define STATIC_CHAIN_REGNUM 2
352 360
353 #define FRAME_POINTER_REQUIRED frame_pointer_required_p()
354
355 /* Offset from the frame pointer register value to the top of the stack. */ 361 /* Offset from the frame pointer register value to the top of the stack. */
356 #define FRAME_POINTER_CFA_OFFSET(FNDECL) 0 362 #define FRAME_POINTER_CFA_OFFSET(FNDECL) 0
357 363
358 #define ELIMINABLE_REGS { \ 364 #define ELIMINABLE_REGS { \
359 {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ 365 {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
360 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \ 366 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \
361 ,{FRAME_POINTER_REGNUM+1,STACK_POINTER_REGNUM+1}} 367 ,{FRAME_POINTER_REGNUM+1,STACK_POINTER_REGNUM+1}}
362 368
363 #define CAN_ELIMINATE(FROM, TO) (((FROM) == ARG_POINTER_REGNUM \
364 && (TO) == FRAME_POINTER_REGNUM) \
365 || (((FROM) == FRAME_POINTER_REGNUM \
366 || (FROM) == FRAME_POINTER_REGNUM+1) \
367 && ! FRAME_POINTER_REQUIRED \
368 ))
369
370 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ 369 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
371 OFFSET = initial_elimination_offset (FROM, TO) 370 OFFSET = avr_initial_elimination_offset (FROM, TO)
372 371
373 #define RETURN_ADDR_RTX(count, x) \ 372 #define RETURN_ADDR_RTX(count, tem) avr_return_addr_rtx (count, tem)
374 gen_rtx_MEM (Pmode, memory_address (Pmode, plus_constant (tem, 1)))
375 373
376 /* Don't use Push rounding. expr.c: emit_single_push_insn is broken 374 /* Don't use Push rounding. expr.c: emit_single_push_insn is broken
377 for POST_DEC targets (PR27386). */ 375 for POST_DEC targets (PR27386). */
378 /*#define PUSH_ROUNDING(NPUSHED) (NPUSHED)*/ 376 /*#define PUSH_ROUNDING(NPUSHED) (NPUSHED)*/
379 377
407 #define EPILOGUE_USES(REGNO) avr_epilogue_uses(REGNO) 405 #define EPILOGUE_USES(REGNO) avr_epilogue_uses(REGNO)
408 406
409 #define HAVE_POST_INCREMENT 1 407 #define HAVE_POST_INCREMENT 1
410 #define HAVE_PRE_DECREMENT 1 408 #define HAVE_PRE_DECREMENT 1
411 409
412 #define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
413
414 #define MAX_REGS_PER_ADDRESS 1 410 #define MAX_REGS_PER_ADDRESS 1
415
416 #ifdef REG_OK_STRICT
417 # define GO_IF_LEGITIMATE_ADDRESS(mode, operand, ADDR) \
418 { \
419 if (legitimate_address_p (mode, operand, 1)) \
420 goto ADDR; \
421 }
422 # else
423 # define GO_IF_LEGITIMATE_ADDRESS(mode, operand, ADDR) \
424 { \
425 if (legitimate_address_p (mode, operand, 0)) \
426 goto ADDR; \
427 }
428 #endif
429 411
430 #define REG_OK_FOR_BASE_NOSTRICT_P(X) \ 412 #define REG_OK_FOR_BASE_NOSTRICT_P(X) \
431 (REGNO (X) >= FIRST_PSEUDO_REGISTER || REG_OK_FOR_BASE_STRICT_P(X)) 413 (REGNO (X) >= FIRST_PSEUDO_REGISTER || REG_OK_FOR_BASE_STRICT_P(X))
432 414
433 #define REG_OK_FOR_BASE_STRICT_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) 415 #define REG_OK_FOR_BASE_STRICT_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
437 #else 419 #else
438 # define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_NOSTRICT_P (X) 420 # define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_NOSTRICT_P (X)
439 #endif 421 #endif
440 422
441 #define REG_OK_FOR_INDEX_P(X) 0 423 #define REG_OK_FOR_INDEX_P(X) 0
442
443 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \
444 { \
445 (X) = legitimize_address (X, OLDX, MODE); \
446 if (memory_address_p (MODE, X)) \
447 goto WIN; \
448 }
449 424
450 #define XEXP_(X,Y) (X) 425 #define XEXP_(X,Y) (X)
451 426
452 /* LEGITIMIZE_RELOAD_ADDRESS will allow register R26/27 to be used, where it 427 /* LEGITIMIZE_RELOAD_ADDRESS will allow register R26/27 to be used, where it
453 is no worse than normal base pointers R28/29 and R30/31. For example: 428 is no worse than normal base pointers R28/29 and R30/31. For example:
492 goto WIN; \ 467 goto WIN; \
493 } \ 468 } \
494 } \ 469 } \
495 } while(0) 470 } while(0)
496 471
497 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
498
499 #define LEGITIMATE_CONSTANT_P(X) 1 472 #define LEGITIMATE_CONSTANT_P(X) 1
500 473
501 #define REGISTER_MOVE_COST(MODE, FROM, TO) ((FROM) == STACK_REG ? 6 \ 474 #define REGISTER_MOVE_COST(MODE, FROM, TO) ((FROM) == STACK_REG ? 6 \
502 : (TO) == STACK_REG ? 12 \ 475 : (TO) == STACK_REG ? 12 \
503 : 2) 476 : 2)
730 do { \ 703 do { \
731 if ((POWER) > 1) \ 704 if ((POWER) > 1) \
732 fprintf (STREAM, "\t.p2align\t%d\n", POWER); \ 705 fprintf (STREAM, "\t.p2align\t%d\n", POWER); \
733 } while (0) 706 } while (0)
734 707
708 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
709 default_elf_asm_output_external (FILE, DECL, NAME)
710
735 #define CASE_VECTOR_MODE HImode 711 #define CASE_VECTOR_MODE HImode
736 712
737 extern int avr_case_values_threshold;
738
739 #define CASE_VALUES_THRESHOLD avr_case_values_threshold
740
741 #undef WORD_REGISTER_OPERATIONS 713 #undef WORD_REGISTER_OPERATIONS
742 714
743 #define MOVE_MAX 4 715 #define MOVE_MAX 4
744 716
745 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 717 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
750 722
751 #define DOLLARS_IN_IDENTIFIERS 0 723 #define DOLLARS_IN_IDENTIFIERS 0
752 724
753 #define NO_DOLLAR_IN_LABEL 1 725 #define NO_DOLLAR_IN_LABEL 1
754 726
755 #define TRAMPOLINE_TEMPLATE(FILE) \
756 internal_error ("trampolines not supported")
757
758 #define TRAMPOLINE_SIZE 4 727 #define TRAMPOLINE_SIZE 4
759 728
760 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
761 { \
762 emit_move_insn (gen_rtx_MEM (HImode, plus_constant ((TRAMP), 2)), CXT); \
763 emit_move_insn (gen_rtx_MEM (HImode, plus_constant ((TRAMP), 6)), FNADDR); \
764 }
765 /* Store in cc_status the expressions 729 /* Store in cc_status the expressions
766 that the condition codes will describe 730 that the condition codes will describe
767 after execution of an instruction whose pattern is EXP. 731 after execution of an instruction whose pattern is EXP.
768 Do not alter them if the instruction would not alter the cc's. */ 732 Do not alter them if the instruction would not alter the cc's. */
769 733
785 #define FUNCTION_PROFILER(FILE, LABELNO) \ 749 #define FUNCTION_PROFILER(FILE, LABELNO) \
786 fprintf (FILE, "/* profiler %d */", (LABELNO)) 750 fprintf (FILE, "/* profiler %d */", (LABELNO))
787 751
788 #define ADJUST_INSN_LENGTH(INSN, LENGTH) (LENGTH =\ 752 #define ADJUST_INSN_LENGTH(INSN, LENGTH) (LENGTH =\
789 adjust_insn_length (INSN, LENGTH)) 753 adjust_insn_length (INSN, LENGTH))
754
755 extern const char *avr_device_to_arch (int argc, const char **argv);
756 extern const char *avr_device_to_data_start (int argc, const char **argv);
757 extern const char *avr_device_to_startfiles (int argc, const char **argv);
758 extern const char *avr_device_to_devicelib (int argc, const char **argv);
759
760 #define EXTRA_SPEC_FUNCTIONS \
761 { "device_to_arch", avr_device_to_arch }, \
762 { "device_to_data_start", avr_device_to_data_start }, \
763 { "device_to_startfile", avr_device_to_startfiles }, \
764 { "device_to_devicelib", avr_device_to_devicelib },
790 765
791 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" 766 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
792 767
793 #define CC1_SPEC "%{profile:-p}" 768 #define CC1_SPEC "%{profile:-p}"
794 769
808 %{mmcu=atmega32*|\ 783 %{mmcu=atmega32*|\
809 mmcu=at90can32*:--pmem-wrap-around=32k}\ 784 mmcu=at90can32*:--pmem-wrap-around=32k}\
810 %{mmcu=atmega64*|\ 785 %{mmcu=atmega64*|\
811 mmcu=at90can64*|\ 786 mmcu=at90can64*|\
812 mmcu=at90usb64*:--pmem-wrap-around=64k}}}\ 787 mmcu=at90usb64*:--pmem-wrap-around=64k}}}\
813 %{!mmcu*: -m avr2}\ 788 %:device_to_arch(%{mmcu=*:%*})\
814 %{mmcu=at90s1200|\ 789 %:device_to_data_start(%{mmcu=*:%*})"
815 mmcu=attiny11|\
816 mmcu=attiny12|\
817 mmcu=attiny15|\
818 mmcu=attiny28: -m avr1}\
819 %{mmcu=attiny22|\
820 mmcu=attiny26|\
821 mmcu=at90s2*|\
822 mmcu=at90s4*|\
823 mmcu=at90s8*|\
824 mmcu=at90c8*|\
825 mmcu=at86rf401|\
826 mmcu=ata6289|\
827 mmcu=attiny13*|\
828 mmcu=attiny2313|\
829 mmcu=attiny24|\
830 mmcu=attiny25|\
831 mmcu=attiny261|\
832 mmcu=attiny4*|\
833 mmcu=attiny8*: -m avr2}\
834 %{mmcu=atmega103|\
835 mmcu=at43*|\
836 mmcu=at76*|\
837 mmcu=at90usb82|\
838 mmcu=at90usb162|\
839 mmcu=attiny16*|\
840 mmcu=attiny32*: -m avr3}\
841 %{mmcu=atmega8*|\
842 mmcu=atmega4*|\
843 mmcu=at90pwm1|\
844 mmcu=at90pwm2|\
845 mmcu=at90pwm2b|\
846 mmcu=at90pwm3|\
847 mmcu=at90pwm3b|\
848 mmcu=at90pwm81: -m avr4}\
849 %{mmcu=atmega16*|\
850 mmcu=atmega32*|\
851 mmcu=atmega406|\
852 mmcu=atmega64*|\
853 mmcu=atmega128*|\
854 mmcu=at90can*|\
855 mmcu=at90pwm216|\
856 mmcu=at90pwm316|\
857 mmcu=at90scr100|\
858 mmcu=at90usb64*|\
859 mmcu=at90usb128*|\
860 mmcu=at94k|\
861 mmcu=m3000*|\
862 mmcu=m3001*: -m avr5}\
863 %{mmcu=atmega256*:-m avr6}\
864 %{mmcu=atmega324*|\
865 mmcu=atmega325*|\
866 mmcu=atmega328p|\
867 mmcu=atmega329*|\
868 mmcu=atmega406|\
869 mmcu=atmega48*|\
870 mmcu=atmega88*|\
871 mmcu=atmega64|\
872 mmcu=atmega644*|\
873 mmcu=atmega645*|\
874 mmcu=atmega649*|\
875 mmcu=atmega128|\
876 mmcu=atmega1284p|\
877 mmcu=atmega162|\
878 mmcu=atmega164*|\
879 mmcu=atmega165*|\
880 mmcu=atmega168*|\
881 mmcu=atmega169*|\
882 mmcu=atmega4hv*|\
883 mmcu=atmega8hv*|\
884 mmcu=atmega16hv*|\
885 mmcu=atmega32hv*|\
886 mmcu=attiny48|\
887 mmcu=attiny88|\
888 mmcu=attiny87|\
889 mmcu=attiny167|\
890 mmcu=attiny327|\
891 mmcu=at90can*|\
892 mmcu=at90pwm*|\
893 mmcu=atmega8c1|\
894 mmcu=atmega16c1|\
895 mmcu=atmega32c1|\
896 mmcu=atmega64c1|\
897 mmcu=atmega8m1|\
898 mmcu=atmega16m1|\
899 mmcu=atmega32m1|\
900 mmcu=atmega64m1|\
901 mmcu=atmega16u4|\
902 mmcu=atmega32u*|\
903 mmcu=at90scr100|\
904 mmcu=ata6289|\
905 mmcu=at90usb*: -Tdata 0x800100}\
906 %{mmcu=atmega640|\
907 mmcu=atmega1280|\
908 mmcu=atmega1281|\
909 mmcu=atmega256*|\
910 mmcu=atmega128rfa1: -Tdata 0x800200}\
911 %{mmcu=m3000*|\
912 mmcu=m3001*: -Tdata 0x801000}"
913 790
914 #define LIB_SPEC \ 791 #define LIB_SPEC \
915 "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}" 792 "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}"
916 793
917 #define LIBSTDCXX "-lgcc" 794 #define LIBSTDCXX "-lgcc"
918 /* No libstdc++ for now. Empty string doesn't work. */ 795 /* No libstdc++ for now. Empty string doesn't work. */
919 796
920 #define LIBGCC_SPEC \ 797 #define LIBGCC_SPEC \
921 "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lgcc }}}}}" 798 "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lgcc }}}}}"
922 799
923 #define STARTFILE_SPEC "%(crt_binutils)" 800 #define STARTFILE_SPEC "%:device_to_startfile(%{mmcu=*:%*})"
924 801
925 #define ENDFILE_SPEC "" 802 #define ENDFILE_SPEC ""
926
927 #define CRT_BINUTILS_SPECS "\
928 %{mmcu=at90s1200|mmcu=avr1:crts1200.o%s} \
929 %{mmcu=attiny11:crttn11.o%s} \
930 %{mmcu=attiny12:crttn12.o%s} \
931 %{mmcu=attiny15:crttn15.o%s} \
932 %{mmcu=attiny28:crttn28.o%s} \
933 %{!mmcu*|mmcu=at90s8515|mmcu=avr2:crts8515.o%s} \
934 %{mmcu=at90s2313:crts2313.o%s} \
935 %{mmcu=at90s2323:crts2323.o%s} \
936 %{mmcu=at90s2333:crts2333.o%s} \
937 %{mmcu=at90s2343:crts2343.o%s} \
938 %{mmcu=attiny22:crttn22.o%s} \
939 %{mmcu=attiny26:crttn26.o%s} \
940 %{mmcu=at90s4433:crts4433.o%s} \
941 %{mmcu=at90s4414:crts4414.o%s} \
942 %{mmcu=at90s4434:crts4434.o%s} \
943 %{mmcu=at90c8534:crtc8534.o%s} \
944 %{mmcu=at90s8535:crts8535.o%s} \
945 %{mmcu=at86rf401:crt86401.o%s} \
946 %{mmcu=attiny13:crttn13.o%s} \
947 %{mmcu=attiny13a:crttn13a.o%s} \
948 %{mmcu=attiny2313|mmcu=avr25:crttn2313.o%s} \
949 %{mmcu=attiny24:crttn24.o%s} \
950 %{mmcu=attiny44:crttn44.o%s} \
951 %{mmcu=attiny84:crttn84.o%s} \
952 %{mmcu=attiny25:crttn25.o%s} \
953 %{mmcu=attiny45:crttn45.o%s} \
954 %{mmcu=attiny85:crttn85.o%s} \
955 %{mmcu=attiny261:crttn261.o%s} \
956 %{mmcu=attiny461:crttn461.o%s} \
957 %{mmcu=attiny861:crttn861.o%s} \
958 %{mmcu=attiny43u:crttn43u.o%s} \
959 %{mmcu=attiny87:crttn87.o%s} \
960 %{mmcu=attiny48:crttn48.o%s} \
961 %{mmcu=attiny88:crttn88.o%s} \
962 %{mmcu=ata6289:crta6289.o%s} \
963 %{mmcu=at43usb355|mmcu=avr3:crt43355.o%s} \
964 %{mmcu=at76c711:crt76711.o%s} \
965 %{mmcu=atmega103|mmcu=avr31:crtm103.o%s} \
966 %{mmcu=at43usb320:crt43320.o%s} \
967 %{mmcu=at90usb162|mmcu=avr35:crtusb162.o%s} \
968 %{mmcu=at90usb82:crtusb82.o%s} \
969 %{mmcu=attiny167:crttn167.o%s} \
970 %{mmcu=attiny327:crttn327.o%s} \
971 %{mmcu=atmega8|mmcu=avr4:crtm8.o%s} \
972 %{mmcu=atmega48:crtm48.o%s} \
973 %{mmcu=atmega48p:crtm48p.o%s} \
974 %{mmcu=atmega88:crtm88.o%s} \
975 %{mmcu=atmega88p:crtm88p.o%s} \
976 %{mmcu=atmega8515:crtm8515.o%s} \
977 %{mmcu=atmega8535:crtm8535.o%s} \
978 %{mmcu=atmega8c1:crtm8c1.o%s} \
979 %{mmcu=atmega8m1:crtm8m1.o%s} \
980 %{mmcu=at90pwm1:crt90pwm1.o%s} \
981 %{mmcu=at90pwm2:crt90pwm2.o%s} \
982 %{mmcu=at90pwm2b:crt90pwm2b.o%s} \
983 %{mmcu=at90pwm3:crt90pwm3.o%s} \
984 %{mmcu=at90pwm3b:crt90pwm3b.o%s} \
985 %{mmcu=at90pwm81:crt90pwm81.o%s} \
986 %{mmcu=atmega16:crtm16.o%s} \
987 %{mmcu=atmega161|mmcu=avr5:crtm161.o%s} \
988 %{mmcu=atmega162:crtm162.o%s} \
989 %{mmcu=atmega163:crtm163.o%s} \
990 %{mmcu=atmega164p:crtm164p.o%s} \
991 %{mmcu=atmega165:crtm165.o%s} \
992 %{mmcu=atmega165p:crtm165p.o%s} \
993 %{mmcu=atmega168:crtm168.o%s} \
994 %{mmcu=atmega168p:crtm168p.o%s} \
995 %{mmcu=atmega169:crtm169.o%s} \
996 %{mmcu=atmega169p:crtm169p.o%s} \
997 %{mmcu=atmega32:crtm32.o%s} \
998 %{mmcu=atmega323:crtm323.o%s} \
999 %{mmcu=atmega324p:crtm324p.o%s} \
1000 %{mmcu=atmega325:crtm325.o%s} \
1001 %{mmcu=atmega325p:crtm325p.o%s} \
1002 %{mmcu=atmega3250:crtm3250.o%s} \
1003 %{mmcu=atmega3250p:crtm3250p.o%s} \
1004 %{mmcu=atmega328p:crtm328p.o%s} \
1005 %{mmcu=atmega329:crtm329.o%s} \
1006 %{mmcu=atmega329p:crtm329p.o%s} \
1007 %{mmcu=atmega3290:crtm3290.o%s} \
1008 %{mmcu=atmega3290p:crtm3290p.o%s} \
1009 %{mmcu=atmega406:crtm406.o%s} \
1010 %{mmcu=atmega64:crtm64.o%s} \
1011 %{mmcu=atmega640:crtm640.o%s} \
1012 %{mmcu=atmega644:crtm644.o%s} \
1013 %{mmcu=atmega644p:crtm644p.o%s} \
1014 %{mmcu=atmega645:crtm645.o%s} \
1015 %{mmcu=atmega6450:crtm6450.o%s} \
1016 %{mmcu=atmega649:crtm649.o%s} \
1017 %{mmcu=atmega6490:crtm6490.o%s} \
1018 %{mmcu=atmega8hva:crtm8hva.o%s} \
1019 %{mmcu=atmega16hva:crtm16hva.o%s} \
1020 %{mmcu=atmega16hvb:crtm16hvb.o%s} \
1021 %{mmcu=atmega32hvb:crtm32hvb.o%s} \
1022 %{mmcu=atmega4hvd:crtm4hvd.o%s} \
1023 %{mmcu=atmega8hvd:crtm8hvd.o%s} \
1024 %{mmcu=at90can32:crtcan32.o%s} \
1025 %{mmcu=at90can64:crtcan64.o%s} \
1026 %{mmcu=at90pwm216:crt90pwm216.o%s} \
1027 %{mmcu=at90pwm316:crt90pwm316.o%s} \
1028 %{mmcu=atmega16c1:crtm16c1.o%s} \
1029 %{mmcu=atmega32c1:crtm32c1.o%s} \
1030 %{mmcu=atmega64c1:crtm64c1.o%s} \
1031 %{mmcu=atmega16m1:crtm16m1.o%s} \
1032 %{mmcu=atmega32m1:crtm32m1.o%s} \
1033 %{mmcu=atmega64m1:crtm64m1.o%s} \
1034 %{mmcu=atmega16u4:crtm16u4.o%s} \
1035 %{mmcu=atmega32u4:crtm32u4.o%s} \
1036 %{mmcu=atmega32u6:crtm32u6.o%s} \
1037 %{mmcu=at90scr100:crt90scr100.o%s} \
1038 %{mmcu=at90usb646:crtusb646.o%s} \
1039 %{mmcu=at90usb647:crtusb647.o%s} \
1040 %{mmcu=at94k:crtat94k.o%s} \
1041 %{mmcu=atmega128|mmcu=avr51:crtm128.o%s} \
1042 %{mmcu=atmega1280:crtm1280.o%s} \
1043 %{mmcu=atmega1281:crtm1281.o%s} \
1044 %{mmcu=atmega1284p:crtm1284p.o%s} \
1045 %{mmcu=at90can128:crtcan128.o%s} \
1046 %{mmcu=atmega128rfa1:crtm128rfa1.o%s} \
1047 %{mmcu=at90usb1286:crtusb1286.o%s} \
1048 %{mmcu=at90usb1287:crtusb1287.o%s} \
1049 %{mmcu=m3000f:crtm3000f.o%s} \
1050 %{mmcu=m3000s:crtm3000s.o%s} \
1051 %{mmcu=m3001b:crtm3001b.o%s} \
1052 %{mmcu=atmega2560|mmcu=avr6:crtm2560.o%s} \
1053 %{mmcu=atmega2561:crtm2561.o%s}"
1054
1055 #define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS},
1056 803
1057 /* This is the default without any -mmcu=* option (AT90S*). */ 804 /* This is the default without any -mmcu=* option (AT90S*). */
1058 #define MULTILIB_DEFAULTS { "mmcu=avr2" } 805 #define MULTILIB_DEFAULTS { "mmcu=avr2" }
1059 806
1060 /* This is undefined macro for collect2 disabling */ 807 /* This is undefined macro for collect2 disabling */
1092 #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \ 839 #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \
1093 avr_hard_regno_rename_ok (OLD_REG, NEW_REG) 840 avr_hard_regno_rename_ok (OLD_REG, NEW_REG)
1094 841
1095 /* A C structure for machine-specific, per-function data. 842 /* A C structure for machine-specific, per-function data.
1096 This is added to the cfun structure. */ 843 This is added to the cfun structure. */
1097 struct machine_function GTY(()) 844 struct GTY(()) machine_function
1098 { 845 {
1099 /* 'true' - if the current function is a leaf function. */
1100 int is_leaf;
1101
1102 /* 'true' - if current function is a naked function. */ 846 /* 'true' - if current function is a naked function. */
1103 int is_naked; 847 int is_naked;
1104 848
1105 /* 'true' - if current function is an interrupt function 849 /* 'true' - if current function is an interrupt function
1106 as specified by the "interrupt" attribute. */ 850 as specified by the "interrupt" attribute. */
1115 int is_OS_task; 859 int is_OS_task;
1116 860
1117 /* 'true' - if current function is a 'main' function 861 /* 'true' - if current function is a 'main' function
1118 as specified by the "OS_main" attribute. */ 862 as specified by the "OS_main" attribute. */
1119 int is_OS_main; 863 int is_OS_main;
864
865 /* Current function stack size. */
866 int stack_usage;
1120 }; 867 };