Hello community, here is the log from the commit of package gcc41 checked in at Fri Nov 17 18:55:33 CET 2006. -------- --- gcc41/cross-alpha-gcc-icecream-backend.changes 2006-11-15 15:44:58.000000000 +0100 +++ /mounts/work_src_done/STABLE/gcc41/cross-alpha-gcc-icecream-backend.changes 2006-11-17 12:09:18.000000000 +0100 @@ -1,0 +2,10 @@ +Fri Nov 17 10:31:43 CET 2006 - rguenther@suse.de + +- Fix gcc41-fortran-{32,64}bit and gcc41-objc-{32,64}bit dependencies. + +------------------------------------------------------------------- +Wed Nov 15 18:22:49 CET 2006 - jw@suse.de + +- Added cross-avr patches found on freebsd.org [#220253] + +------------------------------------------------------------------- cross-arm-gcc-icecream-backend.changes: same change cross-avr-gcc.changes: same change cross-hppa-gcc-icecream-backend.changes: same change cross-i386-gcc-icecream-backend.changes: same change cross-ia64-gcc-icecream-backend.changes: same change cross-ppc-gcc-icecream-backend.changes: same change cross-ppc64-gcc-icecream-backend.changes: same change cross-s390-gcc-icecream-backend.changes: same change cross-s390x-gcc-icecream-backend.changes: same change cross-x86_64-gcc-icecream-backend.changes: same change gcc41.changes: same change libgcj41.changes: same change New: ---- cross-avr-patch-0b-constants.patch cross-avr-patch-attribute_alias.patch cross-avr-patch-bug25672.patch cross-avr-patch-dwarf.patch cross-avr-patch-newdevices.patch cross-avr-patch-zz-atmega256x.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cross-alpha-gcc-icecream-backend.spec ++++++ --- /var/tmp/diff_new_pack.Q6HWVZ/_old 2006-11-17 18:51:36.000000000 +0100 +++ /var/tmp/diff_new_pack.Q6HWVZ/_new 2006-11-17 18:51:36.000000000 +0100 @@ -30,7 +30,7 @@ URL: http://gcc.gnu.org/ License: BSD License and BSD-like, GNU General Public License (GPL) Version: 4.1.2_20061115 -Release: 1 +Release: 3 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.1 @@ -98,6 +98,17 @@ Patch69: gcc41-ssse3.patch Patch70: pr27880.diff Patch71: pr29319.diff +%if "%{gcc_target_arch}" == "avr" +# Joerg Wunsch places his cross-avr-gcc-patches there: +# http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/avr-gcc/files +# grab what has not yet made it into upstream +Patch1000: cross-avr-patch-0b-constants.patch +Patch1001: cross-avr-patch-attribute_alias.patch +Patch1002: cross-avr-patch-bug25672.patch +Patch1003: cross-avr-patch-dwarf.patch +Patch1004: cross-avr-patch-newdevices.patch +Patch1005: cross-avr-patch-zz-atmega256x.patch +%endif # LIBJAVA-DELETE-BEGIN %description @@ -188,6 +199,14 @@ %patch69 %patch70 %patch71 +%if "%{gcc_target_arch}" == "avr" +%patch1000 +%patch1001 +%patch1002 +%patch1003 +%patch1004 +%patch1005 +%endif %build # Avoid conflict with commercial libjawt.so @@ -384,6 +403,10 @@ /usr/share/icecream-envs %changelog -n cross-alpha-gcc-icecream-backend +* Fri Nov 17 2006 - rguenther@suse.de +- Fix gcc41-fortran-{32,64}bit and gcc41-objc-{32,64}bit dependencies. +* Wed Nov 15 2006 - jw@suse.de +- Added cross-avr patches found on freebsd.org [#220253] * Wed Nov 15 2006 - rguenther@suse.de - Update to SVN branch head, fixes PR21032. - Add patches for PR28217, PR28888, PR29753 and PR29788. cross-arm-gcc-icecream-backend.spec: same change ++++++ cross-avr-gcc.spec ++++++ --- /var/tmp/diff_new_pack.Q6HWVZ/_old 2006-11-17 18:51:36.000000000 +0100 +++ /var/tmp/diff_new_pack.Q6HWVZ/_new 2006-11-17 18:51:36.000000000 +0100 @@ -27,7 +27,7 @@ URL: http://gcc.gnu.org/ License: BSD License and BSD-like, GNU General Public License (GPL) Version: 4.1.2_20061115 -Release: 1 +Release: 3 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.1 @@ -95,6 +95,17 @@ Patch69: gcc41-ssse3.patch Patch70: pr27880.diff Patch71: pr29319.diff +%if "%{gcc_target_arch}" == "avr" +# Joerg Wunsch places his cross-avr-gcc-patches there: +# http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/avr-gcc/files +# grab what has not yet made it into upstream +Patch1000: cross-avr-patch-0b-constants.patch +Patch1001: cross-avr-patch-attribute_alias.patch +Patch1002: cross-avr-patch-bug25672.patch +Patch1003: cross-avr-patch-dwarf.patch +Patch1004: cross-avr-patch-newdevices.patch +Patch1005: cross-avr-patch-zz-atmega256x.patch +%endif # LIBJAVA-DELETE-BEGIN %description @@ -182,6 +193,14 @@ %patch69 %patch70 %patch71 +%if "%{gcc_target_arch}" == "avr" +%patch1000 +%patch1001 +%patch1002 +%patch1003 +%patch1004 +%patch1005 +%endif %build # Avoid conflict with commercial libjawt.so @@ -347,6 +366,10 @@ %{_prefix} %changelog -n cross-avr-gcc +* Fri Nov 17 2006 - rguenther@suse.de +- Fix gcc41-fortran-{32,64}bit and gcc41-objc-{32,64}bit dependencies. +* Wed Nov 15 2006 - jw@suse.de +- Added cross-avr patches found on freebsd.org [#220253] * Wed Nov 15 2006 - rguenther@suse.de - Update to SVN branch head, fixes PR21032. - Add patches for PR28217, PR28888, PR29753 and PR29788. ++++++ cross-hppa-gcc-icecream-backend.spec ++++++ --- /var/tmp/diff_new_pack.Q6HWVZ/_old 2006-11-17 18:51:36.000000000 +0100 +++ /var/tmp/diff_new_pack.Q6HWVZ/_new 2006-11-17 18:51:36.000000000 +0100 @@ -30,7 +30,7 @@ URL: http://gcc.gnu.org/ License: BSD License and BSD-like, GNU General Public License (GPL) Version: 4.1.2_20061115 -Release: 1 +Release: 3 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.1 @@ -98,6 +98,17 @@ Patch69: gcc41-ssse3.patch Patch70: pr27880.diff Patch71: pr29319.diff +%if "%{gcc_target_arch}" == "avr" +# Joerg Wunsch places his cross-avr-gcc-patches there: +# http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/avr-gcc/files +# grab what has not yet made it into upstream +Patch1000: cross-avr-patch-0b-constants.patch +Patch1001: cross-avr-patch-attribute_alias.patch +Patch1002: cross-avr-patch-bug25672.patch +Patch1003: cross-avr-patch-dwarf.patch +Patch1004: cross-avr-patch-newdevices.patch +Patch1005: cross-avr-patch-zz-atmega256x.patch +%endif # LIBJAVA-DELETE-BEGIN %description @@ -188,6 +199,14 @@ %patch69 %patch70 %patch71 +%if "%{gcc_target_arch}" == "avr" +%patch1000 +%patch1001 +%patch1002 +%patch1003 +%patch1004 +%patch1005 +%endif %build # Avoid conflict with commercial libjawt.so @@ -384,6 +403,10 @@ /usr/share/icecream-envs %changelog -n cross-hppa-gcc-icecream-backend +* Fri Nov 17 2006 - rguenther@suse.de +- Fix gcc41-fortran-{32,64}bit and gcc41-objc-{32,64}bit dependencies. +* Wed Nov 15 2006 - jw@suse.de +- Added cross-avr patches found on freebsd.org [#220253] * Wed Nov 15 2006 - rguenther@suse.de - Update to SVN branch head, fixes PR21032. - Add patches for PR28217, PR28888, PR29753 and PR29788. cross-i386-gcc-icecream-backend.spec: same change cross-ia64-gcc-icecream-backend.spec: same change cross-ppc-gcc-icecream-backend.spec: same change cross-ppc64-gcc-icecream-backend.spec: same change cross-s390-gcc-icecream-backend.spec: same change cross-s390x-gcc-icecream-backend.spec: same change cross-x86_64-gcc-icecream-backend.spec: same change ++++++ gcc41.spec ++++++ --- /var/tmp/diff_new_pack.Q6HWVZ/_old 2006-11-17 18:51:37.000000000 +0100 +++ /var/tmp/diff_new_pack.Q6HWVZ/_new 2006-11-17 18:51:37.000000000 +0100 @@ -111,7 +111,7 @@ URL: http://gcc.gnu.org/ License: GNU General Public License (GPL) Version: 4.1.2_20061115 -Release: 1 +Release: 3 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.1 @@ -186,6 +186,17 @@ Patch69: gcc41-ssse3.patch Patch70: pr27880.diff Patch71: pr29319.diff +%if "%{gcc_target_arch}" == "avr" +# Joerg Wunsch places his cross-avr-gcc-patches there: +# http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/avr-gcc/files +# grab what has not yet made it into upstream +Patch1000: cross-avr-patch-0b-constants.patch +Patch1001: cross-avr-patch-attribute_alias.patch +Patch1002: cross-avr-patch-bug25672.patch +Patch1003: cross-avr-patch-dwarf.patch +Patch1004: cross-avr-patch-newdevices.patch +Patch1005: cross-avr-patch-zz-atmega256x.patch +%endif # LIBJAVA-DELETE-BEGIN %description @@ -436,7 +447,7 @@ Summary: GNU Objective C Compiler Group: Development/Languages/Other Autoreqprov: on -Requires: gcc41 = %{version}-%{release} +Requires: gcc41-32bit = %{version}-%{release} Requires: libobjc-32bit >= %{version}-%{release} %description objc-32bit @@ -447,7 +458,7 @@ Summary: GNU Objective C Compiler Group: Development/Languages/Other Autoreqprov: on -Requires: gcc41 = %{version}-%{release} +Requires: gcc41-64bit = %{version}-%{release} Requires: libobjc-64bit >= %{version}-%{release} %description objc-64bit @@ -575,7 +586,7 @@ Summary: The GNU Fortran Compiler and Support Files Group: Development/Languages/Fortran Autoreqprov: on -Requires: gcc41 = %{version}-%{release} +Requires: gcc41-32bit = %{version}-%{release} Requires: libgfortran-32bit >= %{version}-%{release} %description fortran-32bit @@ -584,7 +595,7 @@ Summary: The GNU Fortran Compiler and Support Files Group: Development/Languages/Fortran Autoreqprov: on -Requires: gcc41 = %{version}-%{release} +Requires: gcc41-64bit = %{version}-%{release} Requires: libgfortran-64bit >= %{version}-%{release} %description fortran-64bit @@ -996,6 +1007,14 @@ %patch69 %patch70 %patch71 +%if "%{gcc_target_arch}" == "avr" +%patch1000 +%patch1001 +%patch1002 +%patch1003 +%patch1004 +%patch1005 +%endif %build # Avoid conflict with commercial libjawt.so @@ -1997,6 +2016,10 @@ %endif %changelog -n gcc41 +* Fri Nov 17 2006 - rguenther@suse.de +- Fix gcc41-fortran-{32,64}bit and gcc41-objc-{32,64}bit dependencies. +* Wed Nov 15 2006 - jw@suse.de +- Added cross-avr patches found on freebsd.org [#220253] * Wed Nov 15 2006 - rguenther@suse.de - Update to SVN branch head, fixes PR21032. - Add patches for PR28217, PR28888, PR29753 and PR29788. ++++++ libgcj41.spec ++++++ --- /var/tmp/diff_new_pack.Q6HWVZ/_old 2006-11-17 18:51:37.000000000 +0100 +++ /var/tmp/diff_new_pack.Q6HWVZ/_new 2006-11-17 18:51:37.000000000 +0100 @@ -125,7 +125,7 @@ Url: http://gcc.gnu.org/ License: GNU General Public License (GPL), GNU Library General Public License v. 2.0 and 2.1 (LGPL) Version: 4.1.2_20061115 -Release: 1 +Release: 3 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.1 @@ -200,6 +200,17 @@ Patch69: gcc41-ssse3.patch Patch70: pr27880.diff Patch71: pr29319.diff +%if "%{gcc_target_arch}" == "avr" +# Joerg Wunsch places his cross-avr-gcc-patches there: +# http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/avr-gcc/files +# grab what has not yet made it into upstream +Patch1000: cross-avr-patch-0b-constants.patch +Patch1001: cross-avr-patch-attribute_alias.patch +Patch1002: cross-avr-patch-bug25672.patch +Patch1003: cross-avr-patch-dwarf.patch +Patch1004: cross-avr-patch-newdevices.patch +Patch1005: cross-avr-patch-zz-atmega256x.patch +%endif Summary: Java Runtime Library for gcc Group: System/Libraries Provides: libgcj = %{version}-%{release} @@ -525,6 +536,14 @@ %patch69 %patch70 %patch71 +%if "%{gcc_target_arch}" == "avr" +%patch1000 +%patch1001 +%patch1002 +%patch1003 +%patch1004 +%patch1005 +%endif %build # Avoid conflict with commercial libjawt.so @@ -1040,6 +1059,10 @@ %endif %changelog -n libgcj41 +* Fri Nov 17 2006 - rguenther@suse.de +- Fix gcc41-fortran-{32,64}bit and gcc41-objc-{32,64}bit dependencies. +* Wed Nov 15 2006 - jw@suse.de +- Added cross-avr patches found on freebsd.org [#220253] * Wed Nov 15 2006 - rguenther@suse.de - Update to SVN branch head, fixes PR21032. - Add patches for PR28217, PR28888, PR29753 and PR29788. ++++++ cross-avr-patch-0b-constants.patch ++++++ --- ./gcc/doc/extend.texi.orig Sat Aug 6 15:26:27 2005 +++ ./gcc/doc/extend.texi Mon Aug 22 00:14:05 2005 @@ -79,6 +79,7 @@ * Pragmas:: Pragmas accepted by GCC. * Unnamed Fields:: Unnamed struct/union fields within structs/unions. * Thread-Local:: Per-thread variables. +* Binary constants:: Binary constants using the @samp{0b} prefix. @end menu @node Statement Exprs @@ -9742,6 +9743,28 @@ Non-@code{static} members shall not be @code{__thread}. @end quotation @end itemize + +@node Binary constants +@section Binary constants using the @samp{0b} prefix +@cindex Binary constants using the @samp{0b} prefix + +Integer constants can be written as binary constants, consisting of a +sequence of @samp{0} and @samp{1} digits, prefixed by @samp{0b} or +@samp{0B}. This is particularly useful in environments that operate a +lot on the bit-level (like microcontrollers). + +The following statements are identical: + +@smallexample +i = 42; +i = 0x2a; +i = 052; +i = 0b101010; +@end smallexample + +The type of these constants follows the same rules as for octal or +hexadecimal integer constants, so suffixes like @samp{L} or @samp{UL} +can be applied. @node C++ Extensions @chapter Extensions to the C++ Language --- ./libcpp/include/cpplib.h.orig Wed Jun 29 04:34:39 2005 +++ ./libcpp/include/cpplib.h Mon Aug 22 00:14:05 2005 @@ -729,6 +729,7 @@ #define CPP_N_DECIMAL 0x0100 #define CPP_N_HEX 0x0200 #define CPP_N_OCTAL 0x0400 +#define CPP_N_BINARY 0x0800 #define CPP_N_UNSIGNED 0x1000 /* Properties. */ #define CPP_N_IMAGINARY 0x2000 --- ./libcpp/expr.c.orig Wed Jun 29 04:34:36 2005 +++ ./libcpp/expr.c Mon Aug 22 12:02:28 2005 @@ -171,6 +171,11 @@ radix = 16; str++; } + else if ((*str == 'b' || *str == 'B') && (str[1] == '0' || str[1] == '1')) + { + radix = 2; + str++; + } } /* Now scan for a well-formed integer or float. */ @@ -209,10 +214,22 @@ radix = 10; if (max_digit >= radix) - SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit); + { + if (radix == 2) + SYNTAX_ERROR2 ("invalid digit \"%c\" in binary constant", '0' + max_digit); + else + SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit); + } if (float_flag != NOT_FLOAT) { + if (radix == 2) + { + cpp_error (pfile, CPP_DL_ERROR, + "invalid prefix \"0b\" for floating constant"); + return CPP_N_INVALID; + } + if (radix == 16 && CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, c99)) cpp_error (pfile, CPP_DL_PEDWARN, "use of C99 hexadecimal floating constant"); @@ -288,11 +305,16 @@ if ((result & CPP_N_IMAGINARY) && CPP_PEDANTIC (pfile)) cpp_error (pfile, CPP_DL_PEDWARN, "imaginary constants are a GCC extension"); + if (radix == 2 && CPP_PEDANTIC (pfile)) + cpp_error (pfile, CPP_DL_PEDWARN, + "binary constants are a GCC extension"); if (radix == 10) result |= CPP_N_DECIMAL; else if (radix == 16) result |= CPP_N_HEX; + else if (radix == 2) + result |= CPP_N_BINARY; else result |= CPP_N_OCTAL; @@ -343,6 +365,11 @@ base = 16; p += 2; } + else if ((type & CPP_N_RADIX) == CPP_N_BINARY) + { + base = 2; + p += 2; + } /* We can add a digit to numbers strictly less than this without needing the precision and slowness of double integers. */ @@ -398,12 +425,25 @@ append_digit (cpp_num num, int digit, int base, size_t precision) { cpp_num result; - unsigned int shift = 3 + (base == 16); + unsigned int shift; bool overflow; cpp_num_part add_high, add_low; - /* Multiply by 8 or 16. Catching this overflow here means we don't + /* Multiply by 2, 8 or 16. Catching this overflow here means we don't need to worry about add_high overflowing. */ + switch (base) + { + case 2: + shift = 1; + break; + + case 16: + shift = 4; + break; + + default: + shift = 3; + } overflow = !!(num.high >> (PART_PRECISION - shift)); result.high = num.high << shift; result.low = num.low << shift; ++++++ cross-avr-patch-attribute_alias.patch ++++++ --- gcc/config/avr/avr.h.orig Sat Jun 25 03:22:41 2005 +++ gcc/config/avr/avr.h Tue Sep 26 23:07:01 2006 @@ -631,6 +631,8 @@ /* Globalizing directive for a label. */ #define GLOBAL_ASM_OP ".global\t" +#define SET_ASM_OP "\t.set\t" + #define ASM_WEAKEN_LABEL(FILE, NAME) \ do \ { \ ++++++ cross-avr-patch-bug25672.patch ++++++ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25672 --- Makefile.in.orig Thu Dec 15 19:02:02 2005 +++ Makefile.in Thu Apr 27 03:58:59 2006 @@ -329,7 +329,7 @@ # CFLAGS will be just -g. We want to ensure that TARGET libraries # (which we know are built with gcc) are built with optimizations so # prepend -O2 when setting CFLAGS_FOR_TARGET. -CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) +CFLAGS_FOR_TARGET = -O2 $(filter-out -march=% -mcpu=%,$(CFLAGS)) $(SYSROOT_CFLAGS_FOR_TARGET) SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) ++++++ cross-avr-patch-dwarf.patch ++++++ --- gcc/config/avr/avr.h.orig 2006-04-13 15:31:19.000000000 +0200 +++ gcc/config/avr/avr.h 2006-04-13 16:23:16.000000000 +0200 @@ -892,3 +892,7 @@ #define ZERO_REGNO 1 +#define DWARF2_DEBUGGING_INFO 1 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + +/* Offset from the frame pointer register value to the top of the stack. */ +#define FRAME_POINTER_CFA_OFFSET(FNDECL) 0 ++++++ cross-avr-patch-newdevices.patch ++++++ Index: gcc/config/avr/avr.c =================================================================== --- gcc/config/avr/avr.c (revision 114367) +++ gcc/config/avr/avr.c (working copy) @@ -169,10 +169,19 @@ { "at90s8515", 2, "__AVR_AT90S8515__" }, { "at90c8534", 2, "__AVR_AT90C8534__" }, { "at90s8535", 2, "__AVR_AT90S8535__" }, - { "at86rf401", 2, "__AVR_AT86RF401__" }, /* Classic + MOVW, <= 8K. */ { "attiny13", 2, "__AVR_ATtiny13__" }, { "attiny2313", 2, "__AVR_ATtiny2313__" }, + { "attiny24", 2, "__AVR_ATtiny24__" }, + { "attiny44", 2, "__AVR_ATtiny44__" }, + { "attiny84", 2, "__AVR_ATtiny84__" }, + { "attiny25", 2, "__AVR_ATtiny25__" }, + { "attiny45", 2, "__AVR_ATtiny45__" }, + { "attiny85", 2, "__AVR_ATtiny85__" }, + { "attiny261", 2, "__AVR_ATtiny261__" }, + { "attiny461", 2, "__AVR_ATtiny461__" }, + { "attiny861", 2, "__AVR_ATtiny861__" }, + { "at86rf401", 2, "__AVR_AT86RF401__" }, /* Classic, > 8K. */ { "avr3", 3, NULL }, { "atmega103", 3, "__AVR_ATmega103__" }, @@ -187,24 +196,46 @@ { "atmega88", 4, "__AVR_ATmega88__" }, { "atmega8515", 4, "__AVR_ATmega8515__" }, { "atmega8535", 4, "__AVR_ATmega8535__" }, + { "at90pwm2", 4, "__AVR_AT90PWM2__" }, + { "at90pwm3", 4, "__AVR_AT90PWM3__" }, /* Enhanced, > 8K. */ { "avr5", 5, NULL }, { "atmega16", 5, "__AVR_ATmega16__" }, { "atmega161", 5, "__AVR_ATmega161__" }, { "atmega162", 5, "__AVR_ATmega162__" }, { "atmega163", 5, "__AVR_ATmega163__" }, + { "atmega164p",5, "__AVR_ATmega164P__" }, { "atmega165", 5, "__AVR_ATmega165__" }, + { "atmega165p",5, "__AVR_ATmega165P__" }, { "atmega168", 5, "__AVR_ATmega168__" }, { "atmega169", 5, "__AVR_ATmega169__" }, + { "atmega169p",5, "__AVR_ATmega169P__" }, { "atmega32", 5, "__AVR_ATmega32__" }, { "atmega323", 5, "__AVR_ATmega323__" }, + { "atmega324p",5, "__AVR_ATmega324P__" }, { "atmega325", 5, "__AVR_ATmega325__" }, { "atmega3250", 5, "__AVR_ATmega3250__" }, + { "atmega329", 5, "__AVR_ATmega329__" }, + { "atmega3290", 5, "__AVR_ATmega3290__" }, + { "atmega406", 5, "__AVR_ATmega406__" }, { "atmega64", 5, "__AVR_ATmega64__" }, + { "atmega640", 5, "__AVR_ATmega640__" }, + { "atmega644", 5, "__AVR_ATmega644__" }, + { "atmega644p",5, "__AVR_ATmega644P__" }, { "atmega645", 5, "__AVR_ATmega645__" }, { "atmega6450", 5, "__AVR_ATmega6450__" }, + { "atmega649", 5, "__AVR_ATmega649__" }, + { "atmega6490", 5, "__AVR_ATmega6490__" }, { "atmega128", 5, "__AVR_ATmega128__" }, + { "atmega1280",5, "__AVR_ATmega1280__" }, + { "atmega1281",5, "__AVR_ATmega1281__" }, + { "at90can32", 5, "__AVR_AT90CAN32__" }, + { "at90can64", 5, "__AVR_AT90CAN64__" }, { "at90can128", 5, "__AVR_AT90CAN128__" }, + { "at90usb646", 5, "__AVR_AT90USB646__" }, + { "at90usb647", 5, "__AVR_AT90USB647__" }, + { "at90usb1286", 5, "__AVR_AT90USB1286__" }, + { "at90usb1287", 5, "__AVR_AT90USB1287__" }, { "at94k", 5, "__AVR_AT94K__" }, /* Assembler only. */ { "avr1", 1, NULL }, Index: gcc/config/avr/t-avr =================================================================== --- gcc/config/avr/t-avr (revision 114367) +++ gcc/config/avr/t-avr (working copy) @@ -42,21 +42,55 @@ # The many avr2 matches are not listed here - this is the default. MULTILIB_MATCHES = \ - mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \ - mmcu?avr3=mmcu?at43usb320 mmcu?avr3=mmcu?at43usb355 \ + mmcu?avr3=mmcu?atmega103 \ + mmcu?avr3=mmcu?atmega603 \ + mmcu?avr3=mmcu?at43usb320 \ + mmcu?avr3=mmcu?at43usb355 \ mmcu?avr3=mmcu?at76c711 \ - mmcu?avr4=mmcu?atmega8515 mmcu?avr4=mmcu?atmega8535 \ - mmcu?avr4=mmcu?atmega8 mmcu?avr4=mmcu?atmega48 \ + mmcu?avr4=mmcu?atmega48 \ + mmcu?avr4=mmcu?atmega8 \ + mmcu?avr4=mmcu?atmega8515 \ + mmcu?avr4=mmcu?atmega8535 \ mmcu?avr4=mmcu?atmega88 \ - mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega162 \ - mmcu?avr5=mmcu?atmega163 mmcu?avr5=mmcu?atmega169 \ - mmcu?avr5=mmcu?atmega16 mmcu?avr5=mmcu?atmega168 \ + mmcu?avr4=mmcu?at90pwm2 \ + mmcu?avr4=mmcu?at90pwm3 \ + mmcu?avr5=mmcu?atmega16 \ + mmcu?avr5=mmcu?atmega161 \ + mmcu?avr5=mmcu?atmega162 \ + mmcu?avr5=mmcu?atmega163 \ + mmcu?avr5=mmcu?atmega164p \ mmcu?avr5=mmcu?atmega165 \ - mmcu?avr5=mmcu?atmega323 mmcu?avr5=mmcu?atmega32 \ - mmcu?avr5=mmcu?atmega325 mmcu?avr5=mmcu?atmega3250 \ - mmcu?avr5=mmcu?atmega64 mmcu?avr5=mmcu?atmega128 \ - mmcu?avr5=mmcu?atmega645 mmcu?avr5=mmcu?atmega6450 \ - mmcu?avr5=mmcu?at94k mmcu?avr5=mmcu?at90can128 + mmcu?avr5=mmcu?atmega165p \ + mmcu?avr5=mmcu?atmega168 \ + mmcu?avr5=mmcu?atmega169 \ + mmcu?avr5=mmcu?atmega169p \ + mmcu?avr5=mmcu?atmega32 \ + mmcu?avr5=mmcu?atmega323 \ + mmcu?avr5=mmcu?atmega324p \ + mmcu?avr5=mmcu?atmega325 \ + mmcu?avr5=mmcu?atmega3250 \ + mmcu?avr5=mmcu?atmega329 \ + mmcu?avr5=mmcu?atmega3290 \ + mmcu?avr5=mmcu?atmega406 \ + mmcu?avr5=mmcu?atmega64 \ + mmcu?avr5=mmcu?atmega640 \ + mmcu?avr5=mmcu?atmega644 \ + mmcu?avr5=mmcu?atmega644p \ + mmcu?avr5=mmcu?atmega645 \ + mmcu?avr5=mmcu?atmega6450 \ + mmcu?avr5=mmcu?atmega649 \ + mmcu?avr5=mmcu?atmega6490 \ + mmcu?avr5=mmcu?atmega128 \ + mmcu?avr5=mmcu?atmega1280 \ + mmcu?avr5=mmcu?atmega1281 \ + mmcu?avr5=mmcu?at90can32 \ + mmcu?avr5=mmcu?at90can64 \ + mmcu?avr5=mmcu?at90can128 \ + mmcu?avr5=mmcu?at90usb646 \ + mmcu?avr5=mmcu?at90usb647 \ + mmcu?avr5=mmcu?at90usb1286 \ + mmcu?avr5=mmcu?at90usb1287 \ + mmcu?avr5=mmcu?at94k MULTILIB_EXCEPTIONS = Index: gcc/config/avr/avr.h =================================================================== --- gcc/config/avr/avr.h (revision 114367) +++ gcc/config/avr/avr.h (working copy) @@ -758,12 +758,67 @@ #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} " +%{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|\ + mmcu=attiny24|\ + mmcu=attiny25|\ + mmcu=attiny261|\ + mmcu=attiny4*|\ + mmcu=attiny8*:-m avr2}\ +%{mmcu=atmega103|\ + mmcu=atmega603|\ + mmcu=at43*|\ + mmcu=at76*:-m avr3}\ +%{mmcu=atmega8*|\ + mmcu=atmega48|\ + mmcu=at90pwm2|\ + mmcu=at90pwm3:-m avr4}\ +%{mmcu=atmega16*|\ + mmcu=atmega32*|\ + mmcu=atmega406|\ + mmcu=atmega64*|\ + mmcu=atmega128*|\ + mmcu=at90can*|\ + mmcu=at90usb*|\ + mmcu=at94k:-m avr5}\ +%{mmcu=atmega324*|\ + mmcu=atmega325|\ + mmcu=atmega3250|\ + mmcu=atmega329|\ + mmcu=atmega3290|\ + mmcu=atmega406|\ + mmcu=atmega48|\ + mmcu=atmega88|\ + mmcu=atmega64|\ + mmcu=atmega644*|\ + mmcu=atmega645|\ + mmcu=atmega6450|\ + mmcu=atmega649|\ + mmcu=atmega6490|\ + mmcu=atmega128|\ + mmcu=atmega162|\ + mmcu=atmega164*|\ + mmcu=atmega165*|\ + mmcu=atmega168|\ + mmcu=atmega169*|\ + mmcu=at90can*|\ + mmcu=at90pwm*|\ + mmcu=at90usb*: -Tdata 0x800100}\ +%{mmcu=atmega640|\ + mmcu=atmega1280|\ + mmcu=atmega1281: -Tdata 0x800200} " #define LIB_SPEC \ "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}" @@ -799,6 +854,15 @@ %{mmcu=at86rf401:crt86401.o%s} \ %{mmcu=attiny13:crttn13.o%s} \ %{mmcu=attiny2313:crttn2313.o%s} \ +%{mmcu=attiny24:crttn24.o%s} \ +%{mmcu=attiny44:crttn44.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=attiny461:crttn461.o%s} \ +%{mmcu=attiny861:crttn861.o%s} \ %{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \ %{mmcu=atmega603:crtm603.o%s} \ %{mmcu=at43usb320:crt43320.o%s} \ @@ -809,22 +873,44 @@ %{mmcu=atmega88:crtm88.o%s} \ %{mmcu=atmega8515:crtm8515.o%s} \ %{mmcu=atmega8535:crtm8535.o%s} \ +%{mmcu=at90pwm2:crt90pwm2.o%s} \ +%{mmcu=at90pwm3:crt90pwm3.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=atmega164p:crtm164p.o%s} \ %{mmcu=atmega165:crtm165.o%s} \ +%{mmcu=atmega165p:crtm165p.o%s} \ %{mmcu=atmega168:crtm168.o%s} \ %{mmcu=atmega169:crtm169.o%s} \ +%{mmcu=atmega169p:crtm169p.o%s} \ %{mmcu=atmega32:crtm32.o%s} \ %{mmcu=atmega323:crtm323.o%s} \ +%{mmcu=atmega324p:crtm324p.o%s} \ %{mmcu=atmega325:crtm325.o%s} \ %{mmcu=atmega3250:crtm3250.o%s} \ +%{mmcu=atmega329:crtm329.o%s} \ +%{mmcu=atmega3290:crtm3290.o%s} \ +%{mmcu=atmega406:crtm406.o%s} \ %{mmcu=atmega64:crtm64.o%s} \ -%{mmcu=atmega645:crtm6450.o%s} \ +%{mmcu=atmega640:crtm640.o%s} \ +%{mmcu=atmega644:crtm644.o%s} \ +%{mmcu=atmega644p:crtm644p.o%s} \ +%{mmcu=atmega645:crtm645.o%s} \ %{mmcu=atmega6450:crtm6450.o%s} \ +%{mmcu=atmega649:crtm649.o%s} \ +%{mmcu=atmega6490:crtm6490.o%s} \ %{mmcu=atmega128:crtm128.o%s} \ +%{mmcu=atmega1280:crtm1280.o%s} \ +%{mmcu=atmega1281:crtm1281.o%s} \ +%{mmcu=at90can32:crtcan32.o%s} \ +%{mmcu=at90can64:crtcan64.o%s} \ %{mmcu=at90can128:crtcan128.o%s} \ +%{mmcu=at90usb646:crtusb646.o%s} \ +%{mmcu=at90usb647:crtusb647.o%s} \ +%{mmcu=at90usb1286:crtusb1286.o%s} \ +%{mmcu=at90usb1287:crtusb1287.o%s} \ %{mmcu=at94k:crtat94k.o%s}" #define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS}, ++++++ cross-avr-patch-zz-atmega256x.patch ++++++ diff -ur gcc/config/avr/avr.c gcc-4.1.1-new-devices-m256/gcc/config/avr/avr.c --- gcc/config/avr/avr.c 2006-09-07 20:19:07.276183419 +0200 +++ gcc/config/avr/avr.c 2006-09-07 20:49:56.268363803 +0200 @@ -123,20 +123,26 @@ /* Assembler only. */ int avr_asm_only_p = 0; +/* Usually holds the value 2, but could be 3 for the larger devices with a + 3-byte program counter. */ +int avr_pc_size = 2; + struct base_arch_s { int asm_only; int enhanced; int mega; + int three_byte_pc; 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, 0, "__AVR_ARCH__=4" }, + { 0, 1, 1, 0, "__AVR_ARCH__=5" }, + { 0, 1, 1, 1, "__AVR_ARCH__=6" } }; struct mcu_type_s { @@ -237,6 +243,10 @@ { "at90usb1286", 5, "__AVR_AT90USB1286__" }, { "at90usb1287", 5, "__AVR_AT90USB1287__" }, { "at94k", 5, "__AVR_AT94K__" }, + /* 3-Byte PC */ + { "avr6", 6, NULL }, + { "atmega2560", 6, "__AVR_ATmega2560__" }, + { "atmega2561", 6, "__AVR_ATmega2561__" }, /* Assembler only. */ { "avr1", 1, NULL }, { "at90s1200", 1, "__AVR_AT90S1200__" }, @@ -319,6 +329,11 @@ avr_base_arch_macro = base->macro; avr_extra_arch_macro = t->macro; + if (base->three_byte_pc) + avr_pc_size = 3; + else + avr_pc_size = 2; + if (optimize && !TARGET_NO_TABLEJUMP) avr_case_values_threshold = (!AVR_MEGA || TARGET_CALL_PROLOGUES) ? 8 : 17; @@ -476,7 +491,7 @@ int offset = frame_pointer_needed ? 2 : 0; offset += avr_regs_to_save (NULL); - return get_frame_size () + 2 + 1 + offset; + return get_frame_size () + (avr_pc_size) + 1 + offset; } } @@ -660,7 +675,6 @@ int reg; int interrupt_func_p; int signal_func_p; - int main_p; int live_seq; int minimize; @@ -678,7 +692,6 @@ interrupt_func_p = interrupt_function_p (current_function_decl); signal_func_p = signal_function_p (current_function_decl); - main_p = MAIN_NAME_P (DECL_NAME (current_function_decl)); live_seq = sequent_regs_live (); minimize = (TARGET_CALL_PROLOGUES && !interrupt_func_p && !signal_func_p && live_seq); @@ -698,25 +711,14 @@ AS1 (clr,__zero_reg__) "\n"); prologue_size += 5; } - if (main_p) - { - fprintf (file, ("\t" - AS1 (ldi,r28) ",lo8(%s - " HOST_WIDE_INT_PRINT_DEC ")" CR_TAB - AS1 (ldi,r29) ",hi8(%s - " HOST_WIDE_INT_PRINT_DEC ")" CR_TAB - AS2 (out,__SP_H__,r29) CR_TAB - AS2 (out,__SP_L__,r28) "\n"), - avr_init_stack, size, avr_init_stack, size); - - prologue_size += 4; - } - else if (minimize && (frame_pointer_needed || live_seq > 6)) + if (minimize && (frame_pointer_needed || live_seq > 6)) { fprintf (file, ("\t" AS1 (ldi, r26) ",lo8(" HOST_WIDE_INT_PRINT_DEC ")" CR_TAB AS1 (ldi, r27) ",hi8(" HOST_WIDE_INT_PRINT_DEC ")" CR_TAB), size, size); - fputs ((AS2 (ldi,r30,pm_lo8(1f)) CR_TAB - AS2 (ldi,r31,pm_hi8(1f)) CR_TAB), file); + fputs ((AS2 (ldi,r30,lo8(gs(1f))) CR_TAB + AS2 (ldi,r31,hi8(gs(1f))) CR_TAB), file); prologue_size += 4; @@ -787,7 +789,6 @@ int reg; int interrupt_func_p; int signal_func_p; - int main_p; int function_size; int live_seq; int minimize; @@ -819,27 +820,12 @@ interrupt_func_p = interrupt_function_p (current_function_decl); signal_func_p = signal_function_p (current_function_decl); - main_p = MAIN_NAME_P (DECL_NAME (current_function_decl)); + live_seq = sequent_regs_live (); minimize = (TARGET_CALL_PROLOGUES && !interrupt_func_p && !signal_func_p && live_seq); - if (main_p) - { - /* Return value from main() is already in the correct registers - (r25:r24) as the exit() argument. */ - if (AVR_MEGA) - { - fputs ("\t" AS1 (jmp,exit) "\n", file); - epilogue_size += 2; - } - else - { - fputs ("\t" AS1 (rjmp,exit) "\n", file); - ++epilogue_size; - } - } - else if (minimize && (frame_pointer_needed || live_seq > 4)) + if (minimize && (frame_pointer_needed || live_seq > 4)) { fprintf (file, ("\t" AS2 (ldi, r30, %d) CR_TAB), live_seq); ++epilogue_size; @@ -1097,7 +1083,7 @@ && ((GET_CODE (addr) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (addr)) || GET_CODE (addr) == LABEL_REF)) { - fprintf (file, "pm("); + fprintf (file, "gs("); output_addr_const (file,addr); fprintf (file ,")"); } @@ -4518,7 +4504,7 @@ && ((GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (x)) || GET_CODE (x) == LABEL_REF)) { - fputs ("\t.word\tpm(", asm_out_file); + fputs ("\t.word\tgs(", asm_out_file); output_addr_const (asm_out_file, x); fputs (")\n", asm_out_file); return true; @@ -5880,7 +5866,7 @@ { progmem_section (); if (AVR_MEGA) - fprintf (stream, "\t.word pm(.L%d)\n", value); + fprintf (stream, "\t.word gs(.L%d)\n", value); else fprintf (stream, "\trjmp .L%d\n", value); diff -ur gcc/config/avr/avr.h gcc-4.1.1-new-devices-m256/gcc/config/avr/avr.h --- gcc/config/avr/avr.h 2006-09-07 20:19:07.304181348 +0200 +++ gcc/config/avr/avr.h 2006-09-07 20:49:56.277363137 +0200 @@ -33,6 +33,10 @@ builtin_define (avr_extra_arch_macro); \ if (avr_asm_only_p) \ builtin_define ("__AVR_ASM_ONLY__"); \ + if (avr_pc_size == 2) \ + builtin_define ("__AVR_2_BYTE_PC__"); \ + if (avr_pc_size == 3) \ + builtin_define ("__AVR_3_BYTE_PC__"); \ if (avr_enhanced_p) \ builtin_define ("__AVR_ENHANCED__"); \ if (avr_mega_p) \ @@ -47,10 +51,14 @@ extern int avr_mega_p; extern int avr_enhanced_p; extern int avr_asm_only_p; +extern int avr_pc_size; #define AVR_MEGA (avr_mega_p && !TARGET_SHORT_CALLS) #define AVR_ENHANCED (avr_enhanced_p) +#define AVR_3_BYTE_PC (avr_pc_size == 3) +#define AVR_2_BYTE_PC (avr_pc_size == 2) + #define TARGET_VERSION fprintf (stderr, " (GNU assembler syntax)"); #define OVERRIDE_OPTIONS avr_override_options () @@ -747,12 +755,13 @@ #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" -#define CC1_SPEC "%{profile:-p}" +#define CC1_SPEC "%{profile:-p} -fno-delete-null-pointer-checks" #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 + %{!fexceptions:-fno-exceptions} \ + -fno-delete-null-pointer-checks" +/* A C string constant that tells the GCC driver program options to pass to `cc1plus'. */ #define ASM_SPEC "%{mmcu=*:-mmcu=%*}" @@ -793,6 +802,7 @@ mmcu=at90can*|\ mmcu=at90usb*|\ mmcu=at94k:-m avr5}\ +%{mmcu=atmega256*:-m avr6}\ %{mmcu=atmega324*|\ mmcu=atmega325|\ mmcu=atmega3250|\ @@ -818,7 +828,8 @@ mmcu=at90usb*: -Tdata 0x800100}\ %{mmcu=atmega640|\ mmcu=atmega1280|\ - mmcu=atmega1281: -Tdata 0x800200} " + mmcu=atmega1281|\ + mmcu=atmega256*: -Tdata 0x800200} " #define LIB_SPEC \ "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}" @@ -904,6 +915,8 @@ %{mmcu=atmega128:crtm128.o%s} \ %{mmcu=atmega1280:crtm1280.o%s} \ %{mmcu=atmega1281:crtm1281.o%s} \ +%{mmcu=atmega2560:crtm2560.o%s} \ +%{mmcu=atmega2561:crtm2561.o%s} \ %{mmcu=at90can32:crtcan32.o%s} \ %{mmcu=at90can64:crtcan64.o%s} \ %{mmcu=at90can128:crtcan128.o%s} \ diff -ur gcc/config/avr/avr.md gcc-4.1.1-new-devices-m256/gcc/config/avr/avr.md --- gcc/config/avr/avr.md 2005-06-28 21:56:23.000000000 +0200 +++ gcc/config/avr/avr.md 2006-09-07 20:49:56.246365431 +0200 @@ -2087,22 +2087,47 @@ "(register_operand (operands[0], HImode) || CONSTANT_P (operands[0]))" "*{ if (which_alternative==0) - return \"icall\"; + { + if (AVR_3_BYTE_PC) + return \"eicall\"; + else + return \"icall\"; + } else if (which_alternative==1) { if (AVR_ENHANCED) - return (AS2 (movw, r30, %0) CR_TAB - \"icall\"); + { + if (AVR_3_BYTE_PC) + return (AS2 (movw, r30, %0) CR_TAB + \"eicall\"); + else + return (AS2 (movw, r30, %0) CR_TAB + \"icall\"); + } else - return (AS2 (mov, r30, %A0) CR_TAB - AS2 (mov, r31, %B0) CR_TAB - \"icall\"); + { + if (AVR_3_BYTE_PC) + return (AS2 (mov, r30, %A0) CR_TAB + AS2 (mov, r31, %B0) CR_TAB + \"eicall\"); + else + return (AS2 (mov, r30, %A0) CR_TAB + AS2 (mov, r31, %B0) CR_TAB + \"icall\"); + } } else if (which_alternative==2) return AS1(%~call,%c0); - return (AS2 (ldi,r30,lo8(%0)) CR_TAB - AS2 (ldi,r31,hi8(%0)) CR_TAB - \"icall\"); + + + if (AVR_3_BYTE_PC) + return (AS2 (ldi,r30,lo8(%0)) CR_TAB + AS2 (ldi,r31,hi8(%0)) CR_TAB + \"eicall\"); + else + return (AS2 (ldi,r30,lo8(%0)) CR_TAB + AS2 (ldi,r31,hi8(%0)) CR_TAB + \"icall\"); }" [(set_attr "cc" "clobber,clobber,clobber,clobber") (set_attr_alternative "length" @@ -2124,22 +2149,46 @@ "(register_operand (operands[0], VOIDmode) || CONSTANT_P (operands[0]))" "*{ if (which_alternative==0) - return \"icall\"; + { + if (AVR_3_BYTE_PC) + return \"eicall\"; + else + return \"icall\"; + } else if (which_alternative==1) { if (AVR_ENHANCED) - return (AS2 (movw, r30, %1) CR_TAB - \"icall\"); + { + if (AVR_3_BYTE_PC) + return (AS2 (movw, r30, %1) CR_TAB + \"eicall\"); + else + return (AS2 (movw, r30, %1) CR_TAB + \"icall\"); + } else - return (AS2 (mov, r30, %A1) CR_TAB - AS2 (mov, r31, %B1) CR_TAB - \"icall\"); + { + if (AVR_3_BYTE_PC) + return (AS2 (mov, r30, %A1) CR_TAB + AS2 (mov, r31, %B1) CR_TAB + \"eicall\"); + else + return (AS2 (mov, r30, %A1) CR_TAB + AS2 (mov, r31, %B1) CR_TAB + \"icall\"); + } } else if (which_alternative==2) return AS1(%~call,%c1); - return (AS2 (ldi, r30, lo8(%1)) CR_TAB - AS2 (ldi, r31, hi8(%1)) CR_TAB - \"icall\"); + + if (AVR_3_BYTE_PC) + return (AS2 (ldi, r30, lo8(%1)) CR_TAB + AS2 (ldi, r31, hi8(%1)) CR_TAB + \"eicall\"); + else + return (AS2 (ldi, r30, lo8(%1)) CR_TAB + AS2 (ldi, r31, hi8(%1)) CR_TAB + \"icall\"); }" [(set_attr "cc" "clobber,clobber,clobber,clobber") (set_attr_alternative "length" @@ -2169,13 +2218,20 @@ ; indirect jump (define_insn "indirect_jump" [(set (pc) (match_operand:HI 0 "register_operand" "!z,*r"))] - "" + "AVR_2_BYTE_PC" "@ ijmp push %A0\;push %B0\;ret" [(set_attr "length" "1,3") (set_attr "cc" "none,none")]) +(define_insn "*indirect_jump_avr6" + [(set (pc) (match_operand:HI 0 "register_operand" "z"))] + "AVR_3_BYTE_PC" + "eijmp" + [(set_attr "length" "1") + (set_attr "cc" "none")]) + ;; table jump ;; Table made from "rjmp" instructions for <=8K devices. @@ -2183,7 +2239,7 @@ [(set (pc) (unspec:HI [(match_operand:HI 0 "register_operand" "!z,*r")] 1)) (use (label_ref (match_operand 1 "" ""))) (clobber (match_dup 0))] - "!AVR_MEGA" + "(!AVR_MEGA) && (AVR_2_BYTE_PC)" "@ ijmp push %A0\;push %B0\;ret" @@ -2200,11 +2256,26 @@ [(set_attr "length" "2") (set_attr "cc" "clobber")]) +(define_insn "*tablejump_avr6" + [(set (pc) (unspec:HI [(match_operand:HI 0 "register_operand" "z")] + 1)) + (use (label_ref (match_operand 1 "" ""))) + (clobber (match_dup 0))] + "AVR_MEGA && AVR_ENHANCED && AVR_3_BYTE_PC" + "lsl r30 + rol r31 + lpm __tmp_reg__,Z+ + lpm r31,Z + mov r30,__tmp_reg__ + eijmp" + [(set_attr "length" "6") + (set_attr "cc" "clobber")]) + (define_insn "*tablejump_enh" [(set (pc) (unspec:HI [(match_operand:HI 0 "register_operand" "z")] 1)) (use (label_ref (match_operand 1 "" ""))) (clobber (match_dup 0))] - "AVR_MEGA && AVR_ENHANCED" + "AVR_MEGA && AVR_ENHANCED && AVR_2_BYTE_PC" "lsl r30 rol r31 lpm __tmp_reg__,Z+ @@ -2218,7 +2289,7 @@ [(set (pc) (unspec:HI [(match_operand:HI 0 "register_operand" "z")] 1)) (use (label_ref (match_operand 1 "" ""))) (clobber (match_dup 0))] - "AVR_MEGA" + "AVR_MEGA && AVR_2_BYTE_PC" "lsl r30 rol r31 lpm diff -ur gcc/config/avr/libgcc.S gcc-4.1.1-new-devices-m256/gcc/config/avr/libgcc.S --- gcc/config/avr/libgcc.S 2005-06-25 03:22:41.000000000 +0200 +++ gcc/config/avr/libgcc.S 2006-09-07 20:49:56.232366466 +0200 @@ -593,7 +593,12 @@ out __SP_H__,r29 out __SREG__,__tmp_reg__ out __SP_L__,r28 +#if defined (__AVR_3_BYTE_PC__) + eijmp +#else ijmp +#endif + .endfunc #endif /* defined (L_prologue) */ @@ -672,13 +677,22 @@ lpm __tmp_reg__, Z+ lpm r31, Z mov r30, __tmp_reg__ + +#if defined (__AVR_3_BYTE_PC__) + eijmp +#else ijmp +#endif + #else lpm adiw r30, 1 push r0 lpm push r0 +#if defined (__AVR_3_BYTE_PC__) + push __zero_reg__ +#endif ret #endif .endfunc diff -ur gcc/config/avr/t-avr gcc-4.1.1-new-devices-m256/gcc/config/avr/t-avr --- gcc/config/avr/t-avr 2006-09-07 20:19:07.299181718 +0200 +++ gcc/config/avr/t-avr 2006-09-07 20:49:56.273363433 +0200 @@ -37,8 +37,8 @@ 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=avr3/mmcu=avr4/mmcu=avr5/mmcu=avr6 +MULTILIB_DIRNAMES = avr2 avr3 avr4 avr5 avr6 # The many avr2 matches are not listed here - this is the default. MULTILIB_MATCHES = \ @@ -90,7 +90,9 @@ mmcu?avr5=mmcu?at90usb647 \ mmcu?avr5=mmcu?at90usb1286 \ mmcu?avr5=mmcu?at90usb1287 \ - mmcu?avr5=mmcu?at94k + mmcu?avr5=mmcu?at94k \ + mmcu?avr6=mmcu?atmega2560 \ + mmcu?avr6=mmcu?atmega2561 MULTILIB_EXCEPTIONS = ++++++ gcc.spec.in ++++++ --- gcc41/gcc.spec.in 2006-11-15 15:29:31.000000000 +0100 +++ /mounts/work_src_done/STABLE/gcc41/gcc.spec.in 2006-11-17 12:09:18.000000000 +0100 @@ -212,6 +212,18 @@ Patch70: pr27880.diff Patch71: pr29319.diff +%if "%{gcc_target_arch}" == "avr" +# Joerg Wunsch places his cross-avr-gcc-patches there: +# http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/avr-gcc/files +# grab what has not yet made it into upstream +Patch1000: cross-avr-patch-0b-constants.patch +Patch1001: cross-avr-patch-attribute_alias.patch +Patch1002: cross-avr-patch-bug25672.patch +Patch1003: cross-avr-patch-dwarf.patch +Patch1004: cross-avr-patch-newdevices.patch +Patch1005: cross-avr-patch-zz-atmega256x.patch +%endif + # LIBJAVA-DELETE-BEGIN %description Language frontends other than C are split to different sub-packages, @@ -342,7 +354,7 @@ Summary: GNU Objective C Compiler Group: Development/Languages/Other Autoreqprov: on -Requires: gcc@base_ver@@gcc_suffix@ = %{version}-%{release} +Requires: gcc@base_ver@@gcc_suffix@@variant@ = %{version}-%{release} Requires: libobjc@gcc_suffix@@variant@ >= %{version}-%{release} %description objc@variant@ @@ -422,7 +434,7 @@ Summary: The GNU Fortran Compiler and Support Files Group: Development/Languages/Fortran Autoreqprov: on -Requires: gcc@base_ver@@gcc_suffix@ = %{version}-%{release} +Requires: gcc@base_ver@@gcc_suffix@@variant@ = %{version}-%{release} Requires: libgfortran@gcc_suffix@@variant@ >= %{version}-%{release} %description fortran@variant@ @@ -774,6 +786,15 @@ %patch70 %patch71 +%if "%{gcc_target_arch}" == "avr" +%patch1000 +%patch1001 +%patch1002 +%patch1003 +%patch1004 +%patch1005 +%endif + %build # Avoid conflict with commercial libjawt.so sed -i -e 's/libjawt/libgcjawt/g' libjava/Makefile.{am,in} ++++++ micro-cross.spec.in ++++++ --- gcc41/micro-cross.spec.in 2006-08-21 12:52:49.000000000 +0200 +++ /mounts/work_src_done/STABLE/gcc41/micro-cross.spec.in 2006-11-17 12:09:23.000000000 +0100 @@ -1,9 +1,12 @@ #! /bin/sh # -# call this via pre_checkin.sh +# call this via change_spec and pre_checkin.sh like this: +# outfile=gcc41.spec cross_arch=avr sh micro-cross.spec.in > cross-avr-gcc.spec +# # # 2005-05-09, jw@suse.de +# test -z "$cross_arch" && echo 1>&2 "Error: $0 needs environment variable 'cross_arch'" test -z "$outfile" && echo 1>&2 "Error: $0 needs environment variable 'outfile'" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org