SOURCES: crossavr-gcc-zz-atmega256x.patch - updated for 4.2.3

bszx bszx at pld-linux.org
Sat Feb 16 11:50:53 CET 2008


Author: bszx                         Date: Sat Feb 16 10:50:53 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated for 4.2.3

---- Files affected:
SOURCES:
   crossavr-gcc-zz-atmega256x.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/crossavr-gcc-zz-atmega256x.patch
diff -u SOURCES/crossavr-gcc-zz-atmega256x.patch:1.2 SOURCES/crossavr-gcc-zz-atmega256x.patch:1.3
--- SOURCES/crossavr-gcc-zz-atmega256x.patch:1.2	Sat Oct 20 18:58:21 2007
+++ SOURCES/crossavr-gcc-zz-atmega256x.patch	Sat Feb 16 11:50:47 2008
@@ -1,7 +1,7 @@
-diff -uNdr gcc-4.2.2/gcc/config/avr-old/avr.c gcc-4.2.2/gcc/config/avr/avr.c
---- gcc-4.2.2/gcc/config/avr-old/avr.c	2007-09-01 17:28:30.000000000 +0200
-+++ gcc-4.2.2/gcc/config/avr/avr.c	2007-10-20 18:13:32.000000000 +0200
-@@ -129,22 +129,28 @@
+diff -uNdr gcc-4.2.3.old/gcc/config/avr/avr.c gcc-4.2.3/gcc/config/avr/avr.c
+--- gcc-4.2.3.old/gcc/config/avr/avr.c	2008-01-06 23:28:41.000000000 +0100
++++ gcc-4.2.3/gcc/config/avr/avr.c	2008-02-16 11:01:35.000000000 +0100
+@@ -129,23 +129,29 @@
  /* Core have 'MOVW' and 'LPM Rx,Z' instructions.  */
  int avr_have_movw_lpmx_p = 0;
  
@@ -24,6 +24,7 @@
 -  { 0, 0, 0, 0, "__AVR_ARCH__=2" },
 -  { 0, 0, 0, 1, "__AVR_ARCH__=25"},
 -  { 0, 0, 1, 0, "__AVR_ARCH__=3" },
+-  { 0, 0, 1, 1, "__AVR_ARCH__=35"},
 -  { 0, 1, 0, 1, "__AVR_ARCH__=4" },
 -  { 0, 1, 1, 1, "__AVR_ARCH__=5" }
 +  { 1, 0, 0, 0, 0, NULL },  /* unknown device specified */
@@ -31,24 +32,35 @@
 +  { 0, 0, 0, 0, 0, "__AVR_ARCH__=2" },
 +  { 0, 0, 0, 1, 0, "__AVR_ARCH__=25"},
 +  { 0, 0, 1, 0, 0, "__AVR_ARCH__=3" },
++  { 0, 0, 1, 1, 0, "__AVR_ARCH__=35"},
 +  { 0, 1, 0, 1, 0, "__AVR_ARCH__=4" },
 +  { 0, 1, 1, 1, 0, "__AVR_ARCH__=5" },
 +  { 0, 1, 1, 1, 1, "__AVR_ARCH__=6" }
  };
  
  /* These names are used as the index into the avr_arch_types[] table 
-@@ -269,6 +275,10 @@
+@@ -160,7 +166,8 @@
+   ARCH_AVR3,
+   ARCH_AVR35,
+   ARCH_AVR4,
+-  ARCH_AVR5
++  ARCH_AVR5,
++  ARCH_AVR6
+ };
+ 
+ struct mcu_type_s {
+@@ -273,6 +280,10 @@
    { "at90usb1286",  ARCH_AVR5, "__AVR_AT90USB1286__" },
    { "at90usb1287",  ARCH_AVR5, "__AVR_AT90USB1287__" },
    { "at94k",        ARCH_AVR5, "__AVR_AT94K__" },
 +    /* 3-Byte PC */
-+  { "avr6",      6, NULL },
-+  { "atmega2560",     6, "__AVR_ATmega2560__" },
-+  { "atmega2561",     6, "__AVR_ATmega2561__" },
++  { "avr6",         ARCH_AVR6, NULL },
++  { "atmega2560",   ARCH_AVR6, "__AVR_ATmega2560__" },
++  { "atmega2561",   ARCH_AVR6, "__AVR_ATmega2561__" },
      /* Assembler only.  */
    { "avr1",         ARCH_AVR1, NULL },
    { "at90s1200",    ARCH_AVR1, "__AVR_AT90S1200__" },
-@@ -354,6 +364,11 @@
+@@ -358,6 +369,11 @@
    avr_base_arch_macro = base->macro;
    avr_extra_arch_macro = t->macro;
  
@@ -60,7 +72,7 @@
    if (optimize && !TARGET_NO_TABLEJUMP)
      avr_case_values_threshold = (!AVR_MEGA || TARGET_CALL_PROLOGUES) ? 8 : 17;
  
-@@ -482,7 +497,7 @@
+@@ -486,7 +502,7 @@
        int offset = frame_pointer_needed ? 2 : 0;
  
        offset += avr_regs_to_save (NULL);
@@ -69,7 +81,7 @@
      }
  }
  
-@@ -666,7 +681,6 @@
+@@ -670,7 +686,6 @@
    int reg;
    int interrupt_func_p;
    int signal_func_p;
@@ -77,7 +89,7 @@
    int live_seq;
    int minimize;
  
-@@ -684,7 +698,6 @@
+@@ -688,7 +703,6 @@
  
    interrupt_func_p = interrupt_function_p (current_function_decl);
    signal_func_p = signal_function_p (current_function_decl);
@@ -85,7 +97,7 @@
    live_seq = sequent_regs_live ();
    minimize = (TARGET_CALL_PROLOGUES
  	      && !interrupt_func_p && !signal_func_p && live_seq);
-@@ -704,25 +717,14 @@
+@@ -708,25 +722,14 @@
  	       AS1 (clr,__zero_reg__)    "\n");
        prologue_size += 5;
      }
@@ -114,7 +126,7 @@
        
        prologue_size += 4;
        
-@@ -793,7 +795,6 @@
+@@ -797,7 +800,6 @@
    int reg;
    int interrupt_func_p;
    int signal_func_p;
@@ -122,7 +134,7 @@
    int function_size;
    int live_seq;
    int minimize;
-@@ -825,27 +826,12 @@
+@@ -829,27 +831,12 @@
  
    interrupt_func_p = interrupt_function_p (current_function_decl);
    signal_func_p = signal_function_p (current_function_decl);
@@ -152,7 +164,7 @@
      {
        fprintf (file, ("\t" AS2 (ldi, r30, %d) CR_TAB), live_seq);
        ++epilogue_size;
-@@ -1103,7 +1089,7 @@
+@@ -1107,7 +1094,7 @@
  	  && ((GET_CODE (addr) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (addr))
  	      || GET_CODE (addr) == LABEL_REF))
  	{
@@ -161,7 +173,7 @@
  	  output_addr_const (file,addr);
  	  fprintf (file ,")");
  	}
-@@ -4524,7 +4510,7 @@
+@@ -4528,7 +4515,7 @@
        && ((GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (x))
  	  || GET_CODE (x) == LABEL_REF))
      {
@@ -170,7 +182,7 @@
        output_addr_const (asm_out_file, x);
        fputs (")\n", asm_out_file);
        return true;
-@@ -5914,7 +5900,7 @@
+@@ -5918,7 +5905,7 @@
  {
    switch_to_section (progmem_section);
    if (AVR_MEGA)
@@ -179,9 +191,9 @@
    else
      fprintf (stream, "\trjmp .L%d\n", value);
  
-diff -uNdr gcc-4.2.2/gcc/config/avr-old/avr.h gcc-4.2.2/gcc/config/avr/avr.h
---- gcc-4.2.2/gcc/config/avr-old/avr.h	2007-10-20 18:11:38.000000000 +0200
-+++ gcc-4.2.2/gcc/config/avr/avr.h	2007-10-20 18:12:15.000000000 +0200
+diff -uNdr gcc-4.2.3.old/gcc/config/avr/avr.h gcc-4.2.3/gcc/config/avr/avr.h
+--- gcc-4.2.3.old/gcc/config/avr/avr.h	2008-02-16 10:53:58.000000000 +0100
++++ gcc-4.2.3/gcc/config/avr/avr.h	2008-02-16 10:56:47.000000000 +0100
 @@ -36,6 +36,10 @@
  	builtin_define ("__AVR_HAVE_LPMX__");	\
        if (avr_asm_only_p)			\
@@ -227,16 +239,16 @@
 +/* A C string constant that tells the GCC driver program options to
     pass to `cc1plus'.  */
  
- #define ASM_SPEC "%{mmcu=avr25:-mmcu=avr2;\
-@@ -773,6 +782,7 @@
-   mmcu=at90can*|\
-   mmcu=at90usb*|\
+ #define ASM_SPEC "%{mmcu=avr25:-mmcu=avr2;mmcu=avr35:-mmcu=avr3;\
+@@ -776,6 +785,7 @@
+   mmcu=at90usb64*|\
+   mmcu=at90usb128*|\
    mmcu=at94k:-m avr5}\
 +%{mmcu=atmega256*:-m avr6}\
  %{mmcu=atmega324*|\
    mmcu=atmega325*|\
    mmcu=atmega329*|\
-@@ -796,7 +806,8 @@
+@@ -799,7 +809,8 @@
    mmcu=at90usb*: -Tdata 0x800100}\
  %{mmcu=atmega640|\
    mmcu=atmega1280|\
@@ -246,7 +258,7 @@
  
  #define LIB_SPEC \
    "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}"
-@@ -887,6 +898,8 @@
+@@ -892,6 +903,8 @@
  %{mmcu=atmega128:crtm128.o%s} \
  %{mmcu=atmega1280:crtm1280.o%s} \
  %{mmcu=atmega1281:crtm1281.o%s} \
@@ -255,9 +267,9 @@
  %{mmcu=atmega8hva:crtm8hva.o%s} \
  %{mmcu=atmega16hva:crtm16hva.o%s} \
  %{mmcu=at90can32:crtcan32.o%s} \
-diff -uNdr gcc-4.2.2/gcc/config/avr-old/avr.md gcc-4.2.2/gcc/config/avr/avr.md
---- gcc-4.2.2/gcc/config/avr-old/avr.md	2007-09-01 17:28:30.000000000 +0200
-+++ gcc-4.2.2/gcc/config/avr/avr.md	2007-10-20 18:12:15.000000000 +0200
+diff -uNdr gcc-4.2.3.old/gcc/config/avr/avr.md gcc-4.2.3/gcc/config/avr/avr.md
+--- gcc-4.2.3.old/gcc/config/avr/avr.md	2007-09-01 17:28:30.000000000 +0200
++++ gcc-4.2.3/gcc/config/avr/avr.md	2008-02-16 10:56:47.000000000 +0100
 @@ -2099,22 +2099,45 @@
    "(register_operand (operands[0], HImode) || CONSTANT_P (operands[0]))"
    "*{
@@ -437,9 +449,9 @@
    "lsl r30
  	rol r31
  	lpm
-diff -uNdr gcc-4.2.2/gcc/config/avr-old/libgcc.S gcc-4.2.2/gcc/config/avr/libgcc.S
---- gcc-4.2.2/gcc/config/avr-old/libgcc.S	2006-06-19 17:04:27.000000000 +0200
-+++ gcc-4.2.2/gcc/config/avr/libgcc.S	2007-10-20 18:12:15.000000000 +0200
+diff -uNdr gcc-4.2.3.old/gcc/config/avr/libgcc.S gcc-4.2.3/gcc/config/avr/libgcc.S
+--- gcc-4.2.3.old/gcc/config/avr/libgcc.S	2006-06-19 17:04:27.000000000 +0200
++++ gcc-4.2.3/gcc/config/avr/libgcc.S	2008-02-16 10:56:47.000000000 +0100
 @@ -593,7 +593,12 @@
  	out	__SP_H__,r29
  	out	__SREG__,__tmp_reg__
@@ -476,17 +488,17 @@
  	ret
  #endif
  	.endfunc
-diff -uNdr gcc-4.2.2/gcc/config/avr-old/t-avr gcc-4.2.2/gcc/config/avr/t-avr
---- gcc-4.2.2/gcc/config/avr-old/t-avr	2007-04-27 22:53:57.000000000 +0200
-+++ gcc-4.2.2/gcc/config/avr/t-avr	2007-10-20 18:12:15.000000000 +0200
+diff -uNdr gcc-4.2.3.old/gcc/config/avr/t-avr gcc-4.2.3/gcc/config/avr/t-avr
+--- gcc-4.2.3.old/gcc/config/avr/t-avr	2008-01-06 23:28:41.000000000 +0100
++++ gcc-4.2.3/gcc/config/avr/t-avr	2008-02-16 10:56:47.000000000 +0100
 @@ -37,8 +37,8 @@
  
  FPBIT = fp-bit.c
  
--MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr4/mmcu=avr5
--MULTILIB_DIRNAMES = avr2 avr25 avr3 avr4 avr5
-+MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr4/mmcu=avr5/mmcu=avr6
-+MULTILIB_DIRNAMES = avr2 avr25 avr3 avr4 avr5 avr6
+-MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr35/mmcu=avr4/mmcu=avr5
+-MULTILIB_DIRNAMES = avr2 avr25 avr3 avr35 avr4 avr5
++MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr6
++MULTILIB_DIRNAMES = avr2 avr25 avr3 avr35 avr4 avr5 avr6
  
  # The many avr2 matches are not listed here - this is the default.
  MULTILIB_MATCHES = \
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/crossavr-gcc-zz-atmega256x.patch?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list