$OpenBSD: patch-gcc-4_3_4_gcc_config_avr_avr_h,v 1.1 2010/06/27 20:58:10 ckuethe Exp $
--- gcc-4.3.4/gcc/config/avr/avr.h.orig	Sun Jun 15 15:32:29 2008
+++ gcc-4.3.4/gcc/config/avr/avr.h	Sat Jun 26 11:58:40 2010
@@ -44,8 +44,11 @@ struct base_arch_s {
   /* Core have 'EICALL' and 'EIJMP' instructions.  */
   int have_eijmp_eicall;
 
-  /* Reserved. */
-  int reserved;
+  /* Core is in Xmega family.  */
+  int xmega;
+
+  /* Core have RAMPX, RAMPY and RAMPD registers.  */
+  int have_rampx_y_d;
   
   const char *const macro;
 };
@@ -68,6 +71,13 @@ extern const struct base_arch_s *avr_current_arch;
 	builtin_define ("__AVR_HAVE_ELPMX__");	\
       if (avr_have_movw_lpmx_p)			\
 	builtin_define ("__AVR_HAVE_MOVW__");	\
+      if (avr_current_arch->have_elpm)		\
+        {					\
+	  builtin_define ("__AVR_HAVE_RAMPZ__");\
+	  builtin_define ("__AVR_HAVE_ELPM__");	\
+	}					\
+      if (avr_current_arch->have_elpmx)		\
+	builtin_define ("__AVR_HAVE_ELPMX__");	\
       if (avr_have_movw_lpmx_p)			\
 	builtin_define ("__AVR_HAVE_LPMX__");	\
       if (avr_asm_only_p)			\
@@ -80,8 +90,25 @@ extern const struct base_arch_s *avr_current_arch;
 	builtin_define ("__AVR_MEGA__");	\
       if (avr_current_arch->have_jmp_call)	\
 	builtin_define ("__AVR_HAVE_JMP_CALL__"); \
+      if (!avr_current_arch->have_eijmp_eicall)	\
+	builtin_define ("__AVR_2_BYTE_PC__");	\
+      if (avr_current_arch->have_eijmp_eicall)	\
+	builtin_define ("__AVR_3_BYTE_PC__");	\
+      if (avr_current_arch->have_eijmp_eicall)	\
+	builtin_define ("__AVR_HAVE_EIJMP_EICALL__"); \
       if (TARGET_NO_INTERRUPTS)			\
 	builtin_define ("__NO_INTERRUPTS__");	\
+      if (avr_current_arch->xmega)              \
+	{					\
+	  builtin_define ("__AVR_XMEGA__");     \
+	  builtin_define ("__AVR_HAVE_SPMX__"); \
+	}					\
+      if (avr_current_arch->have_rampx_y_d)     \
+	{					\
+	  builtin_define ("__AVR_HAVE_RAMPX__");\
+	  builtin_define ("__AVR_HAVE_RAMPY__");\
+	  builtin_define ("__AVR_HAVE_RAMPD__");\
+	}					\
     }						\
   while (0)
 
@@ -100,10 +127,20 @@ extern GTY(()) section *progmem_section;
 #define AVR_HAVE_MOVW (avr_have_movw_lpmx_p)
 #define AVR_HAVE_LPMX (avr_have_movw_lpmx_p)
 #define AVR_HAVE_RAMPZ (avr_current_arch->have_elpm)
+#define AVR_HAVE_EIJMP_EICALL (avr_current_arch->have_eijmp_eicall)
+#define AVR_XMEGA (avr_current_arch->xmega)
+#define AVR_HAVE_RAMPX_Y_D (avr_current_arch->have_rampx_y_d)
 
-#define AVR_2_BYTE_PC 1
-#define AVR_3_BYTE_PC 0
+#define AVR_2_BYTE_PC (!AVR_HAVE_EIJMP_EICALL)
+#define AVR_3_BYTE_PC (AVR_HAVE_EIJMP_EICALL)
 
+#define AVR_IO_OFFSET (AVR_XMEGA ? 0 : 0x20)
+#define AVR_RAMPD_ADDR (AVR_XMEGA ? 0x38 : 0)
+#define AVR_RAMPX_ADDR (AVR_XMEGA ? 0x39 : 0)
+#define AVR_RAMPY_ADDR (AVR_XMEGA ? 0x3A : 0)
+#define AVR_RAMPZ_ADDR (AVR_XMEGA ? 0x3B : 0x5B)
+#define AVR_SREG_ADDR (AVR_XMEGA ? 0x3F: 0x5F)
+
 #define TARGET_VERSION fprintf (stderr, " (GNU assembler syntax)");
 
 #define OVERRIDE_OPTIONS avr_override_options ()
@@ -463,10 +500,6 @@ do {									    \
 		           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)) \
 	{								    \
@@ -526,29 +559,21 @@ do {									    \
 #define ASM_APP_OFF "/* #NOAPP */\n"
 
 /* Switch into a generic section.  */
-#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
+#define TARGET_ASM_NAMED_SECTION avr_asm_named_section
 #define TARGET_ASM_INIT_SECTIONS avr_asm_init_sections
 
 #define ASM_OUTPUT_ASCII(FILE, P, SIZE)	 gas_output_ascii (FILE,P,SIZE)
 
 #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((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_COMMON(STREAM, NAME, SIZE, ROUNDED) \
+        avr_asm_output_common (STREAM, NAME, SIZE, ROUNDED)
 
-#define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED)			\
-  asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED))
+#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)
+#define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \
+        avr_asm_output_local (STREAM, NAME, SIZE, ROUNDED)
 
 #undef TYPE_ASM_OP
 #undef SIZE_ASM_OP
@@ -681,7 +706,7 @@ sprintf (STRING, "*.%s%lu", PREFIX, (unsigned long)(NU
 
 #define PRINT_OPERAND(STREAM, X, CODE) print_operand (STREAM, X, CODE)
 
-#define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '~')
+#define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '~' || (CODE) == '!')
 
 #define PRINT_OPERAND_ADDRESS(STREAM, X) print_operand_address(STREAM, X)
 
@@ -808,65 +833,235 @@ mmcu=*:-mmcu=%*}"
   mmcu=at90s8*|\
   mmcu=at90c8*|\
   mmcu=at86rf401|\
-  mmcu=attiny13|\
+  mmcu=ata6289|\
+  mmcu=attiny13*|\
   mmcu=attiny2313|\
+  mmcu=attiny2313a|\
   mmcu=attiny24|\
+  mmcu=attiny24a|\
   mmcu=attiny25|\
   mmcu=attiny261|\
-  mmcu=attiny4*|\
-  mmcu=attiny8*: -m avr2}\
+  mmcu=attiny261a|\
+  mmcu=attiny4313|\
+  mmcu=attiny43u|\
+  mmcu=attiny44|\
+  mmcu=attiny44a|\
+  mmcu=attiny45|\
+  mmcu=attiny461|\
+  mmcu=attiny461a|\
+  mmcu=attiny48|\
+  mmcu=attiny84|\
+  mmcu=attiny85|\
+  mmcu=attiny861|\
+  mmcu=attiny861a|\
+  mmcu=attiny87|\
+  mmcu=attiny88: -m avr2}\
 %{mmcu=atmega103|\
-  mmcu=at43*|\
-  mmcu=at76*|\
+  mmcu=at43usb320|\
+  mmcu=at43usb355|\
+  mmcu=at76c711|\
   mmcu=at90usb82|\
-  mmcu=at90usb162: -m avr3}\
-%{mmcu=atmega8*|\
-  mmcu=atmega48*|\
+  mmcu=at90usb162|\
+  mmcu=atmega8u2|\
+  mmcu=atmega16u2|\
+  mmcu=atmega32u2|\
+  mmcu=attiny167: -m avr3}\
+%{mmcu=atmega8|\
+  mmcu=atmega88|\
+  mmcu=atmega88a|\
+  mmcu=atmega88p|\
+  mmcu=atmega88pa|\
+  mmcu=atmega8515|\
+  mmcu=atmega8535|\
+  mmcu=atmega8hva|\
+  mmcu=atmega8hvd|\
+  mmcu=atmega48|\
+  mmcu=atmega48a|\
+  mmcu=atmega48p|\
+  mmcu=atmega4hvd|\
   mmcu=at90pwm1|\
   mmcu=at90pwm2|\
   mmcu=at90pwm2b|\
   mmcu=at90pwm3|\
-  mmcu=at90pwm3b: -m avr4}\
-%{mmcu=atmega16*|\
-  mmcu=atmega32*|\
+  mmcu=at90pwm3b|\
+  mmcu=at90pwm81: -m avr4}\
+%{mmcu=atmega16|\
+  mmcu=atmega16a|\
+  mmcu=atmega161|\
+  mmcu=atmega162|\
+  mmcu=atmega163|\
+  mmcu=atmega164a|\
+  mmcu=atmega164p|\
+  mmcu=atmega165|\
+  mmcu=atmega165a|\
+  mmcu=atmega165p|\
+  mmcu=atmega168|\
+  mmcu=atmega168a|\
+  mmcu=atmega168p|\
+  mmcu=atmega169|\
+  mmcu=atmega169a|\
+  mmcu=atmega169p|\
+  mmcu=atmega169pa|\
+  mmcu=atmega16c1|\
+  mmcu=atmega16hva|\
+  mmcu=atmega16hva2|\
+  mmcu=atmega16hvb|\
+  mmcu=atmega16m1|\
+  mmcu=atmega16u4|\
+  mmcu=atmega32|\
+  mmcu=atmega323|\
+  mmcu=atmega324a|\
+  mmcu=atmega324p|\
+  mmcu=atmega324pa|\
+  mmcu=atmega325|\
+  mmcu=atmega325p|\
+  mmcu=atmega3250|\
+  mmcu=atmega3250p|\
+  mmcu=atmega328|\
+  mmcu=atmega328p|\
+  mmcu=atmega329|\
+  mmcu=atmega329p|\
+  mmcu=atmega329pa|\
+  mmcu=atmega3290|\
+  mmcu=atmega3290p|\
+  mmcu=atmega32c1|\
+  mmcu=atmega32hvb|\
+  mmcu=atmega32m1|\
+  mmcu=atmega32u4|\
+  mmcu=atmega32u6|\
   mmcu=atmega406|\
-  mmcu=atmega64*|\
+  mmcu=atmega64|\
+  mmcu=atmega640|\
+  mmcu=atmega644|\
+  mmcu=atmega644a|\
+  mmcu=atmega644p|\
+  mmcu=atmega644pa|\
+  mmcu=atmega645|\
+  mmcu=atmega645a|\
+  mmcu=atmega645p|\
+  mmcu=atmega6450|\
+  mmcu=atmega6450a|\
+  mmcu=atmega6450p|\
+  mmcu=atmega649|\
+  mmcu=atmega649a|\
+  mmcu=atmega649p|\
+  mmcu=atmega6490|\
+  mmcu=atmega6490a|\
+  mmcu=atmega6490p|\
+  mmcu=atmega64c1|\
+  mmcu=atmega64m1|\
+  mmcu=atmega64hve|\
   mmcu=atmega128*|\
   mmcu=at90can*|\
   mmcu=at90pwm216|\
   mmcu=at90pwm316|\
+  mmcu=atmega32c1|\
+  mmcu=atmega32m1|\
+  mmcu=atmega32u4|\
+  mmcu=at90scr100|\
   mmcu=at90usb64*|\
   mmcu=at90usb128*|\
-  mmcu=at94k: -m avr5}\
-%{mmcu=atmega324*|\
+  mmcu=at94k|\
+  mmcu=m3000*|\
+  mmcu=m3001*: -m avr5}\
+%{mmcu=atmega256*:-m avr6}\
+%{mmcu=atxmega16a4|\
+  mmcu=atxmega16d4|\
+  mmcu=atxmega32d4:-m avrxmega2}\
+%{mmcu=atxmega32a4:-m avrxmega3} \
+%{mmcu=atxmega64a3|\
+  mmcu=atxmega64d3:-m avrxmega4} \
+%{mmcu=atxmega64a1:-m avrxmega5} \
+%{mmcu=atxmega128a3|\
+  mmcu=atxmega128d3|\
+  mmcu=atxmega192a3|\
+  mmcu=atxmega192d3|\
+  mmcu=atxmega256a3*|\
+  mmcu=atxmega256d3:-m avrxmega6} \
+%{mmcu=atxmega128a1:-m avrxmega7} \
+%{mmcu=atmega324a|\
+  mmcu=atmega324p|\
+  mmcu=atmega324pa|\
   mmcu=atmega325*|\
+  mmcu=atmega328|\
   mmcu=atmega328p|\
-  mmcu=atmega329*|\
+  mmcu=atmega329|\
+  mmcu=atmega329p|\
+  mmcu=atmega329pa|\
+  mmcu=atmega3290|\
+  mmcu=atmega3290p|\
   mmcu=atmega406|\
-  mmcu=atmega48*|\
-  mmcu=atmega88*|\
+  mmcu=atmega48|\
+  mmcu=atmega48a|\
+  mmcu=atmega48p|\
+  mmcu=atmega88|\
+  mmcu=atmega88a|\
+  mmcu=atmega88p|\
+  mmcu=atmega88pa|\
   mmcu=atmega64|\
-  mmcu=atmega644*|\
-  mmcu=atmega645*|\
-  mmcu=atmega649*|\
+  mmcu=atmega644|\
+  mmcu=atmega644a|\
+  mmcu=atmega644p|\
+  mmcu=atmega644pa|\
+  mmcu=atmega645|\
+  mmcu=atmega645p|\
+  mmcu=atmega645a|\
+  mmcu=atmega6450|\
+  mmcu=atmega6450a|\
+  mmcu=atmega6450p|\
+  mmcu=atmega649|\
+  mmcu=atmega649a|\
+  mmcu=atmega649p|\
+  mmcu=atmega6490|\
+  mmcu=atmega6490a|\
+  mmcu=atmega6490p|\
   mmcu=atmega128|\
   mmcu=atmega1284p|\
   mmcu=atmega162|\
-  mmcu=atmega164*|\
-  mmcu=atmega165*|\
-  mmcu=atmega168*|\
-  mmcu=atmega169*|\
-  mmcu=atmega8hva|\
-  mmcu=atmega16hva|\
-  mmcu=atmega32hvb|\
+  mmcu=atmega164a|\
+  mmcu=atmega164p|\
+  mmcu=atmega165|\
+  mmcu=atmega165a|\
+  mmcu=atmega165p|\
+  mmcu=atmega168|\
+  mmcu=atmega168a|\
+  mmcu=atmega168p|\
+  mmcu=atmega169|\
+  mmcu=atmega169a|\
+  mmcu=atmega169p|\
+  mmcu=atmega169pa|\
+  mmcu=atmega4hv*|\
+  mmcu=atmega8hv*|\
+  mmcu=atmega16hv*|\
+  mmcu=atmega32hv*|\
   mmcu=attiny48|\
   mmcu=attiny88|\
+  mmcu=attiny87|\
+  mmcu=attiny167|\
   mmcu=at90can*|\
   mmcu=at90pwm*|\
+  mmcu=atmega16c1|\
+  mmcu=atmega16m1|\
+  mmcu=atmega32c1|\
+  mmcu=atmega32m1|\
+  mmcu=atmega64c1|\
+  mmcu=atmega64m1|\
+  mmcu=atmega16u4|\
+  mmcu=atmega32u*|\
+  mmcu=at90scr100|\
+  mmcu=ata6289|\
+  mmcu=atmega64hve|\
+  mmcu=atmega8u2|\
+  mmcu=atmega16u2|\
+  mmcu=atmega32u2|\
   mmcu=at90usb*: -Tdata 0x800100}\
 %{mmcu=atmega640|\
   mmcu=atmega1280|\
-  mmcu=atmega1281: -Tdata 0x800200} "
+  mmcu=atmega1281|\
+  mmcu=atmega128rfa1|\
+  mmcu=atmega256*: -Tdata 0x800200}\
+%{mmcu=m3000*|\
+  mmcu=m3001*: -Tdata 0x801000}"
 
 #define LIB_SPEC \
   "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}"
@@ -901,30 +1096,47 @@ mmcu=*:-mmcu=%*}"
 %{mmcu=at90s8535:crts8535.o%s} \
 %{mmcu=at86rf401:crt86401.o%s} \
 %{mmcu=attiny13:crttn13.o%s} \
+%{mmcu=attiny13a:crttn13a.o%s} \
 %{mmcu=attiny2313|mmcu=avr25:crttn2313.o%s} \
+%{mmcu=attiny2313a:crttn2313a.o%s} \
 %{mmcu=attiny24:crttn24.o%s} \
+%{mmcu=attiny24a:crttn24a.o%s} \
+%{mmcu=attiny4313:crttn4313.o%s} \
 %{mmcu=attiny44:crttn44.o%s} \
+%{mmcu=attiny44a:crttn44a.o%s} \
 %{mmcu=attiny84:crttn84.o%s} \
 %{mmcu=attiny25:crttn25.o%s} \
 %{mmcu=attiny45:crttn45.o%s} \
 %{mmcu=attiny85:crttn85.o%s} \
 %{mmcu=attiny261:crttn261.o%s} \
+%{mmcu=attiny261a:crttn261a.o%s} \
 %{mmcu=attiny461:crttn461.o%s} \
+%{mmcu=attiny461a:crttn461a.o%s} \
 %{mmcu=attiny861:crttn861.o%s} \
+%{mmcu=attiny861a:crttn861a.o%s} \
 %{mmcu=attiny43u:crttn43u.o%s} \
 %{mmcu=attiny48:crttn48.o%s} \
 %{mmcu=attiny88:crttn88.o%s} \
+%{mmcu=attiny87:crttn87.o%s} \
+%{mmcu=ata6289:crta6289.o%s} \
 %{mmcu=at43usb320|mmcu=avr3:crt43320.o%s} \
 %{mmcu=at43usb355:crt43355.o%s} \
 %{mmcu=at76c711:crt76711.o%s} \
 %{mmcu=atmega103|mmcu=avr31:crtm103.o%s} \
 %{mmcu=at90usb162|mmcu=avr35:crtusb162.o%s} \
 %{mmcu=at90usb82:crtusb82.o%s} \
+%{mmcu=atmega8u2:crtm8u2.o%s} \
+%{mmcu=atmega16u2:crtm16u2.o%s} \
+%{mmcu=atmega32u2:crtm32u2.o%s} \
+%{mmcu=attiny167:crttn167.o%s} \
 %{mmcu=atmega8|mmcu=avr4:crtm8.o%s} \
 %{mmcu=atmega48:crtm48.o%s} \
+%{mmcu=atmega48a:crtm48a.o%s} \
 %{mmcu=atmega48p:crtm48p.o%s} \
 %{mmcu=atmega88:crtm88.o%s} \
+%{mmcu=atmega88a:crtm88a.o%s} \
 %{mmcu=atmega88p:crtm88p.o%s} \
+%{mmcu=atmega88pa:crtm88pa.o%s} \
 %{mmcu=atmega8515:crtm8515.o%s} \
 %{mmcu=atmega8535:crtm8535.o%s} \
 %{mmcu=at90pwm1:crt90pwm1.o%s} \
@@ -932,45 +1144,81 @@ mmcu=*:-mmcu=%*}"
 %{mmcu=at90pwm2b:crt90pwm2b.o%s} \
 %{mmcu=at90pwm3:crt90pwm3.o%s} \
 %{mmcu=at90pwm3b:crt90pwm3b.o%s} \
+%{mmcu=at90pwm81:crt90pwm81.o%s} \
 %{mmcu=atmega16:crtm16.o%s} \
+%{mmcu=atmega16a:crtm16a.o%s} \
 %{mmcu=atmega161|mmcu=avr5:crtm161.o%s} \
 %{mmcu=atmega162:crtm162.o%s} \
 %{mmcu=atmega163:crtm163.o%s} \
+%{mmcu=atmega164a:crtm164a.o%s} \
 %{mmcu=atmega164p:crtm164p.o%s} \
 %{mmcu=atmega165:crtm165.o%s} \
+%{mmcu=atmega165a:crtm165a.o%s} \
 %{mmcu=atmega165p:crtm165p.o%s} \
 %{mmcu=atmega168:crtm168.o%s} \
+%{mmcu=atmega168a:crtm168a.o%s} \
 %{mmcu=atmega168p:crtm168p.o%s} \
 %{mmcu=atmega169:crtm169.o%s} \
+%{mmcu=atmega169a:crtm169a.o%s} \
 %{mmcu=atmega169p:crtm169p.o%s} \
+%{mmcu=atmega169pa:crtm169pa.o%s} \
 %{mmcu=atmega32:crtm32.o%s} \
 %{mmcu=atmega323:crtm323.o%s} \
+%{mmcu=atmega324a:crtm324a.o%s} \
 %{mmcu=atmega324p:crtm324p.o%s} \
+%{mmcu=atmega324pa:crtm324pa.o%s} \
 %{mmcu=atmega325:crtm325.o%s} \
 %{mmcu=atmega325p:crtm325p.o%s} \
 %{mmcu=atmega3250:crtm3250.o%s} \
 %{mmcu=atmega3250p:crtm3250p.o%s} \
+%{mmcu=atmega328:crtm328.o%s} \
 %{mmcu=atmega328p:crtm328p.o%s} \
 %{mmcu=atmega329:crtm329.o%s} \
 %{mmcu=atmega329p:crtm329p.o%s} \
+%{mmcu=atmega329pa:crtm329pa.o%s} \
 %{mmcu=atmega3290:crtm3290.o%s} \
 %{mmcu=atmega3290p:crtm3290p.o%s} \
-%{mmcu=atmega32hvb:crtm32hvb.o%s} \
 %{mmcu=atmega406:crtm406.o%s} \
 %{mmcu=atmega64:crtm64.o%s} \
 %{mmcu=atmega640:crtm640.o%s} \
 %{mmcu=atmega644:crtm644.o%s} \
+%{mmcu=atmega644a:crtm644a.o%s} \
 %{mmcu=atmega644p:crtm644p.o%s} \
+%{mmcu=atmega644pa:crtm644pa.o%s} \
 %{mmcu=atmega645:crtm645.o%s} \
+%{mmcu=atmega645a:crtm645a.o%s} \
+%{mmcu=atmega645p:crtm645p.o%s} \
 %{mmcu=atmega6450:crtm6450.o%s} \
+%{mmcu=atmega6450a:crtm6450a.o%s} \
+%{mmcu=atmega6450p:crtm6450p.o%s} \
 %{mmcu=atmega649:crtm649.o%s} \
+%{mmcu=atmega649a:crtm649a.o%s} \
+%{mmcu=atmega649p:crtm649p.o%s} \
 %{mmcu=atmega6490:crtm6490.o%s} \
+%{mmcu=atmega6490a:crtm6490a.o%s} \
+%{mmcu=atmega6490p:crtm6490p.o%s} \
+%{mmcu=atmega64hve:crtm64hve.o%s} \
 %{mmcu=atmega8hva:crtm8hva.o%s} \
 %{mmcu=atmega16hva:crtm16hva.o%s} \
+%{mmcu=atmega16hva2:crtm16hva2.o%s} \
+%{mmcu=atmega16hvb:crtm16hvb.o%s} \
+%{mmcu=atmega32hvb:crtm32hvb.o%s} \
+%{mmcu=atmega4hvd:crtm4hvd.o%s} \
+%{mmcu=atmega8hvd:crtm8hvd.o%s} \
 %{mmcu=at90can32:crtcan32.o%s} \
 %{mmcu=at90can64:crtcan64.o%s} \
 %{mmcu=at90pwm216:crt90pwm216.o%s} \
 %{mmcu=at90pwm316:crt90pwm316.o%s} \
+%{mmcu=atmega16c1:crtm16c1.o%s} \
+%{mmcu=atmega16m1:crtm16m1.o%s} \
+%{mmcu=atmega16u4:crtm16u4.o%s} \
+%{mmcu=atmega32c1:crtm32c1.o%s} \
+%{mmcu=atmega32m1:crtm32m1.o%s} \
+%{mmcu=atmega32u4:crtm32u4.o%s} \
+%{mmcu=atmega32u6:crtm32u6.o%s} \
+%{mmcu=atmega64c1:crtm64c1.o%s} \
+%{mmcu=atmega64m1:crtm64m1.o%s} \
+%{mmcu=at90scr100:crt90scr100.o%s} \
 %{mmcu=at90usb646:crtusb646.o%s} \
 %{mmcu=at90usb647:crtusb647.o%s} \
 %{mmcu=at94k:crtat94k.o%s} \
@@ -978,9 +1226,30 @@ mmcu=*:-mmcu=%*}"
 %{mmcu=atmega1280:crtm1280.o%s} \
 %{mmcu=atmega1281:crtm1281.o%s} \
 %{mmcu=atmega1284p:crtm1284p.o%s} \
+%{mmcu=atmega128rfa1:crtm128rfa1.o%s} \
 %{mmcu=at90can128:crtcan128.o%s} \
 %{mmcu=at90usb1286:crtusb1286.o%s} \
-%{mmcu=at90usb1287:crtusb1287.o%s}"
+%{mmcu=at90usb1287:crtusb1287.o%s} \
+%{mmcu=m3000f:crtm3000f.o%s} \
+%{mmcu=m3000s:crtm3000s.o%s} \
+%{mmcu=m3001b:crtm3001b.o%s} \
+%{mmcu=atmega2560|mmcu=avr6:crtm2560.o%s} \
+%{mmcu=atmega2561:crtm2561.o%s} \
+%{mmcu=avrxmega2|mmcu=atxmega32d4:crtx32d4.o%s} \
+%{mmcu=atxmega16a4:crtx16a4.o%s} \
+%{mmcu=atxmega16d4:crtx16d4.o%s} \
+%{mmcu=atxmega3|mmcu=atxmega32a4:crtx32a4.o%s} \
+%{mmcu=atxmega4|mmcu=atxmega64a3:crtx64a3.o%s} \
+%{mmcu=atxmega64d3:crtx64d3.o%s} \
+%{mmcu=atxmega5|mmcu=atxmega64a1:crtx64a1.o%s} \
+%{mmcu=atxmega6|mmcu=atxmega128a3:crtx128a3.o%s} \
+%{mmcu=atxmega128d3:crtx128d3.o%s}\
+%{mmcu=atxmega192a3:crtx192a3.o%s}\
+%{mmcu=atxmega192d3:crtx192d3.o%s}\
+%{mmcu=atxmega256a3:crtx256a3.o%s} \
+%{mmcu=atxmega256a3b:crtx256a3b.o%s} \
+%{mmcu=atxmega256d3:crtx256d3.o%s} \
+%{mmcu=atxmega7|mmcu=atxmega128a1:crtx128a1.o%s}"
 
 #define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS},
 
@@ -1042,8 +1311,16 @@ struct machine_function GTY(())
   /* 'true' - if current function is a signal function 
      as specified by the "signal" attribute.  */
   int is_signal;
-  
+
   /* 'true' - if current function is a signal function 
+     as specified by the "nmi" attribute.  */
+  int is_nmi;
+  
+  /* 'true' - if current function is a task function 
      as specified by the "OS_task" attribute.  */
   int is_OS_task;
+
+  /* 'true' - if current function is a 'main' function 
+     as specified by the "OS_main" attribute.  */
+  int is_OS_main;
 };
