diff -ur gcc-4.0.2/gcc/config/avr/avr.c gcc-work/gcc/config/avr/avr.c
--- gcc-4.0.2/gcc/config/avr/avr.c	2005-07-28 03:37:11.000000000 +0400
+++ gcc-work/gcc/config/avr/avr.c	2006-02-05 21:46:45.141769100 +0300
@@ -129,20 +129,25 @@
 /* Assembler only.  */
 int avr_asm_only_p = 0;
 
+/* Core have "movw" instruction.  */
+int avr_have_movw_p = 0;
+
 struct base_arch_s {
   int asm_only;
   int enhanced;
   int mega;
+  int have_movw;
   const char *const macro;
 };
 
 static const struct base_arch_s avr_arch_types[] = {
-  { 1, 0, 0, NULL },  /* unknown device specified */
-  { 1, 0, 0, "__AVR_ARCH__=1" },
-  { 0, 0, 0, "__AVR_ARCH__=2" },
-  { 0, 0, 1, "__AVR_ARCH__=3" },
-  { 0, 1, 0, "__AVR_ARCH__=4" },
-  { 0, 1, 1, "__AVR_ARCH__=5" }
+  { 1, 0, 0, 0,  NULL },  /* unknown device specified */
+  { 1, 0, 0, 0, "__AVR_ARCH__=1" },
+  { 0, 0, 0, 0, "__AVR_ARCH__=2" },
+  { 0, 0, 1, 0, "__AVR_ARCH__=3" },
+  { 0, 1, 0, 1, "__AVR_ARCH__=4" },
+  { 0, 1, 1, 1, "__AVR_ARCH__=5" },
+  { 0, 0, 0, 1, "__AVR_ARCH__=25"}
 };
 
 struct mcu_type_s {
@@ -177,8 +182,9 @@
   { "at90s8535", 2, "__AVR_AT90S8535__" },
   { "at86rf401", 2, "__AVR_AT86RF401__" },
     /* Classic + MOVW, <= 8K.  */
-  { "attiny13",   2, "__AVR_ATtiny13__" },
-  { "attiny2313", 2, "__AVR_ATtiny2313__" },
+  { "avr25",      6, NULL },
+  { "attiny13",   6, "__AVR_ATtiny13__" },
+  { "attiny2313", 6, "__AVR_ATtiny2313__" },
     /* Classic, > 8K.  */
   { "avr3",      3, NULL },
   { "atmega103", 3, "__AVR_ATmega103__" },
@@ -291,6 +297,7 @@
   avr_asm_only_p = base->asm_only;
   avr_enhanced_p = base->enhanced;
   avr_mega_p = base->mega;
+  avr_have_movw_p = base->have_movw;
   avr_base_arch_macro = base->macro;
   avr_extra_arch_macro = t->macro;
 
@@ -1658,7 +1665,7 @@
 		      AS2 (in,%B0,__SP_H__));
 	    }
 
-	  if (AVR_ENHANCED)
+	  if (AVR_HAVE_MOVW)
 	    {
 	      *l = 1;
 	      return (AS2 (movw,%0,%1));
@@ -2327,7 +2334,7 @@
 	{
 	  if (true_regnum (dest) > true_regnum (src))
 	    {
-	      if (AVR_ENHANCED)
+	      if (AVR_HAVE_MOVW)
 		{
 		  *l = 2;
 		  return (AS2 (movw,%C0,%C1) CR_TAB
@@ -2341,7 +2348,7 @@
 	    }
 	  else
 	    {
-	      if (AVR_ENHANCED)
+	      if (AVR_HAVE_MOVW)
 		{
 		  *l = 2;
 		  return (AS2 (movw,%A0,%A1) CR_TAB
@@ -2368,7 +2375,7 @@
 	  if (GET_CODE (src) == CONST_INT)
 	    {
 	      const char *const clr_op0 =
-		AVR_ENHANCED ? (AS1 (clr,%A0) CR_TAB
+		AVR_HAVE_MOVW ? (AS1 (clr,%A0) CR_TAB
 				AS1 (clr,%B0) CR_TAB
 				AS2 (movw,%C0,%A0))
 			     : (AS1 (clr,%A0) CR_TAB
@@ -2378,20 +2385,20 @@
 
 	      if (src == const0_rtx) /* mov r,L */
 		{
-		  *l = AVR_ENHANCED ? 3 : 4;
+		  *l = AVR_HAVE_MOVW ? 3 : 4;
 		  return clr_op0;
 		}
 	      else if (src == const1_rtx)
 		{
 		  if (!real_l)
 		    output_asm_insn (clr_op0, operands);
-		  *l = AVR_ENHANCED ? 4 : 5;
+		  *l = AVR_HAVE_MOVW ? 4 : 5;
 		  return AS1 (inc,%A0);
 		}
 	      else if (src == constm1_rtx)
 		{
 		  /* Immediate constants -1 to any register */
-		  if (AVR_ENHANCED)
+		  if (AVR_HAVE_MOVW)
 		    {
 		      *l = 4;
 		      return (AS1 (clr,%A0)     CR_TAB
@@ -2412,7 +2419,7 @@
 
 		  if (bit_nr >= 0)
 		    {
-		      *l = AVR_ENHANCED ? 5 : 6;
+		      *l = AVR_HAVE_MOVW ? 5 : 6;
 		      if (!real_l)
 			{
 			  output_asm_insn (clr_op0, operands);
@@ -3303,7 +3310,7 @@
 	  if (INTVAL (operands[2]) < 32)
 	    break;
 
-	  if (AVR_ENHANCED)
+	  if (AVR_HAVE_MOVW)
 	    return *len = 3, (AS1 (clr,%D0) CR_TAB
 			      AS1 (clr,%C0) CR_TAB
 			      AS2 (movw,%A0,%C0));
@@ -3340,7 +3347,7 @@
 	    int reg0 = true_regnum (operands[0]);
 	    int reg1 = true_regnum (operands[1]);
 	    *len = 4;
-	    if (AVR_ENHANCED && (reg0 + 2 != reg1))
+	    if (AVR_HAVE_MOVW && (reg0 + 2 != reg1))
 	      {
 		*len = 3;
 		return (AS2 (movw,%C0,%A1) CR_TAB
@@ -3687,7 +3694,7 @@
 	    int reg0 = true_regnum (operands[0]);
 	    int reg1 = true_regnum (operands[1]);
 	    *len=6;
-	    if (AVR_ENHANCED && (reg0 != reg1 + 2))
+	    if (AVR_HAVE_MOVW && (reg0 != reg1 + 2))
 	      {
 		*len = 5;
 		return (AS2 (movw,%A0,%C1) CR_TAB
@@ -3739,7 +3746,7 @@
 	  /* fall through */
 
 	case 31:
-	  if (AVR_ENHANCED)
+	  if (AVR_HAVE_MOVW)
 	    return *len = 4, (AS1 (lsl,%D0)     CR_TAB
 			      AS2 (sbc,%A0,%A0) CR_TAB
 			      AS2 (mov,%B0,%A0) CR_TAB
@@ -4135,7 +4142,7 @@
 	  if (INTVAL (operands[2]) < 32)
 	    break;
 
-	  if (AVR_ENHANCED)
+	  if (AVR_HAVE_MOVW)
 	    return *len = 3, (AS1 (clr,%D0) CR_TAB
 			      AS1 (clr,%C0) CR_TAB
 			      AS2 (movw,%A0,%C0));
@@ -4169,7 +4176,7 @@
 	    int reg0 = true_regnum (operands[0]);
 	    int reg1 = true_regnum (operands[1]);
 	    *len = 4;
-	    if (AVR_ENHANCED && (reg0 != reg1 + 2))
+	    if (AVR_HAVE_MOVW && (reg0 != reg1 + 2))
 	      {
 		*len = 3;
 		return (AS2 (movw,%A0,%C1) CR_TAB
@@ -5279,7 +5286,7 @@
 		*total = COSTS_N_INSNS (optimize_size ? 7 : 8);
 		break;
 	      case 31:
-		*total = COSTS_N_INSNS (AVR_ENHANCED ? 4 : 5);
+		*total = COSTS_N_INSNS (AVR_HAVE_MOVW ? 4 : 5);
 		break;
 	      default:
 		*total = COSTS_N_INSNS (optimize_size ? 7 : 113);
diff -ur gcc-4.0.2/gcc/config/avr/avr.h gcc-work/gcc/config/avr/avr.h
--- gcc-4.0.2/gcc/config/avr/avr.h	2005-02-18 01:41:35.000000000 +0300
+++ gcc-work/gcc/config/avr/avr.h	2006-02-04 03:25:39.718750000 +0300
@@ -31,6 +31,8 @@
 	builtin_define (avr_base_arch_macro);	\
       if (avr_extra_arch_macro)			\
 	builtin_define (avr_extra_arch_macro);	\
+      if (avr_have_movw_p)			\
+	builtin_define ("__AVR_HAVE_MOVW__");	\
       if (avr_asm_only_p)			\
 	builtin_define ("__AVR_ASM_ONLY__");	\
       if (avr_enhanced_p)			\
@@ -94,9 +96,11 @@
 extern int avr_mega_p;
 extern int avr_enhanced_p;
 extern int avr_asm_only_p;
+extern int avr_have_movw_p;
 
 #define AVR_MEGA (avr_mega_p && !TARGET_SHORT_CALLS)
 #define AVR_ENHANCED (avr_enhanced_p)
+#define AVR_HAVE_MOVW (avr_have_movw_p)
 
 #define TARGET_OPTIONS {						      \
  { "init-stack=", &avr_init_stack, N_("Specify the initial stack address"), 0}, \
@@ -715,7 +719,7 @@
 
 #define USER_LABEL_PREFIX ""
 
-#define ASSEMBLER_DIALECT AVR_ENHANCED
+#define ASSEMBLER_DIALECT AVR_HAVE_MOVW
 
 #define ASM_OUTPUT_REG_PUSH(STREAM, REGNO)	\
 {						\
diff -ur gcc-4.0.2/gcc/config/avr/avr.md gcc-work/gcc/config/avr/avr.md
--- gcc-4.0.2/gcc/config/avr/avr.md	2005-03-19 18:44:25.000000000 +0300
+++ gcc-work/gcc/config/avr/avr.md	2006-02-05 15:40:19.156250000 +0300
@@ -45,8 +45,8 @@
 (define_attr "type" "branch,branch1,arith,xcall"
   (const_string "arith"))
 
-(define_attr "mcu_enhanced" "yes,no"
-  (const (if_then_else (symbol_ref "AVR_ENHANCED")
+(define_attr "mcu_have_movw" "yes,no"
+  (const (if_then_else (symbol_ref "AVR_HAVE_MOVW")
 		       (const_string "yes")
 		       (const_string "no"))))
 
@@ -1437,7 +1437,7 @@
   [(set_attr_alternative "length"
 			 [(const_int 7)
 			  (const_int 8)
-			  (if_then_else (eq_attr "mcu_enhanced" "yes")
+			  (if_then_else (eq_attr "mcu_have_movw" "yes")
 					(const_int 7)
 					(const_int 8))])
    (set_attr "cc" "set_czn,set_n,set_czn")])
@@ -1515,7 +1515,7 @@
 	{mov %A0,%A1\;mov %B0,%B1|movw %A0,%A1}\;clr %C0\;sbrc %B0,7\;com %C0\;mov %D0,%C0"
   [(set_attr_alternative "length"
 			 [(const_int 4)
-			  (if_then_else (eq_attr "mcu_enhanced" "yes")
+			  (if_then_else (eq_attr "mcu_have_movw" "yes")
 					(const_int 5)
 					(const_int 6))])
    (set_attr "cc" "set_n,set_n")])
@@ -1552,7 +1552,7 @@
 	{mov %A0,%A1\;mov %B0,%B1|movw %A0,%A1}\;clr %C0\;clr %D0"
   [(set_attr_alternative "length"
 			 [(const_int 2)
-			  (if_then_else (eq_attr "mcu_enhanced" "yes")
+			  (if_then_else (eq_attr "mcu_have_movw" "yes")
 					(const_int 3)
 					(const_int 4))])
    (set_attr "cc" "set_n,set_n")])
@@ -2086,7 +2086,7 @@
      return \"icall\";
   else if (which_alternative==1)
     {
-      if (AVR_ENHANCED)
+      if (AVR_HAVE_MOVW)
 	return (AS2 (movw, r30, %0) CR_TAB
 		\"icall\");
       else
@@ -2103,7 +2103,7 @@
   [(set_attr "cc" "clobber,clobber,clobber,clobber")
    (set_attr_alternative "length"
 			 [(const_int 1)
-			  (if_then_else (eq_attr "mcu_enhanced" "yes")
+			  (if_then_else (eq_attr "mcu_have_movw" "yes")
 					(const_int 2)
 					(const_int 3))
 			  (if_then_else (eq_attr "mcu_mega" "yes")
@@ -2123,7 +2123,7 @@
      return \"icall\";
   else if (which_alternative==1)
     {
-      if (AVR_ENHANCED)
+      if (AVR_HAVE_MOVW)
 	return (AS2 (movw, r30, %1) CR_TAB
 		\"icall\");
       else
@@ -2140,7 +2140,7 @@
   [(set_attr "cc" "clobber,clobber,clobber,clobber")
    (set_attr_alternative "length"
 			 [(const_int 1)
-			  (if_then_else (eq_attr "mcu_enhanced" "yes")
+			  (if_then_else (eq_attr "mcu_have_movw" "yes")
 					(const_int 2)
 					(const_int 3))
 			  (if_then_else (eq_attr "mcu_mega" "yes")
diff -ur gcc-4.0.2/gcc/config/avr/libgcc.S gcc-work/gcc/config/avr/libgcc.S
--- gcc-4.0.2/gcc/config/avr/libgcc.S	2002-06-02 03:33:47.000000000 +0400
+++ gcc-work/gcc/config/avr/libgcc.S	2006-02-04 00:22:18.859375000 +0300
@@ -40,7 +40,7 @@
 	.section .text.libgcc, "ax", @progbits
 
 	.macro	mov_l  r_dest, r_src
-#if defined (__AVR_ENHANCED__)
+#if defined (__AVR_HAVE_MOVW__)
 	movw	\r_dest, \r_src
 #else
 	mov	\r_dest, \r_src
@@ -48,7 +48,7 @@
 	.endm
 
 	.macro	mov_h  r_dest, r_src
-#if defined (__AVR_ENHANCED__)
+#if defined (__AVR_HAVE_MOVW__)
 	; empty
 #else
 	mov	\r_dest, \r_src
@@ -276,10 +276,10 @@
 	cpc	r_arg1H,r_arg1L
 	brne	__mulsi3_loop		; exit if multiplier = 0
 __mulsi3_exit:
-	mov	r_arg1HH,r_resHH	; result to return register
-	mov	r_arg1HL,r_resHL
-	mov	r_arg1H,r_resH
-	mov	r_arg1L,r_resL
+	mov_h	r_arg1HH,r_resHH	; result to return register
+	mov_l	r_arg1HL,r_resHL
+	mov_h	r_arg1H,r_resH
+	mov_l	r_arg1L,r_resL
 	ret
 #endif /* !defined (__AVR_ENHANCED__) */
 #undef r_arg1L 
diff -ur gcc-4.0.2/gcc/config/avr/t-avr gcc-work/gcc/config/avr/t-avr
--- gcc-4.0.2/gcc/config/avr/t-avr	2005-04-25 08:14:24.000000000 +0400
+++ gcc-work/gcc/config/avr/t-avr	2006-02-06 00:27:24.404618600 +0300
@@ -37,11 +37,12 @@
 
 FPBIT = fp-bit.c
 
-MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr3/mmcu=avr4/mmcu=avr5
-MULTILIB_DIRNAMES = avr2 avr3 avr4 avr5
+MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr4/mmcu=avr5
+MULTILIB_DIRNAMES = avr2 avr25 avr3 avr4 avr5
 
 # The many avr2 matches are not listed here - this is the default.
 MULTILIB_MATCHES = \
+	mmcu?avr25=mmcu?attiny13 mmcu?avr25=mmcu?attiny2313 \
 	mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \
 	mmcu?avr3=mmcu?at43usb320 mmcu?avr3=mmcu?at43usb355 \
 	mmcu?avr3=mmcu?at76c711 \
