Update to GCC 4.3.2.

(The old port will be migrated to devel/avr-gcc-42 within the next
days.)
This commit is contained in:
Joerg Wunsch 2009-06-11 21:39:08 +00:00
parent 62efc0d75f
commit 54b0b2e541
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=235599
21 changed files with 1822 additions and 1183 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= gcc
PORTVERSION= 4.2.2
PORTREVISION= 2
PORTVERSION= 4.3.2
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GCC}
MASTER_SITES+= http://people.freebsd.org/~joerg/:local
@ -23,6 +22,8 @@ COMMENT= FSF GCC 4.x for Atmel AVR 8-bit RISC cross-development
BUILD_DEPENDS= avr-as:${PORTSDIR}/devel/avr-binutils \
avr-ld:${PORTSDIR}/devel/avr-binutils
LIB_DEPENDS= mpfr.3:${PORTSDIR}/math/mpfr \
gmp.8:${PORTSDIR}/math/libgmp4
RUN_DEPENDS= avr-as:${PORTSDIR}/devel/avr-binutils \
avr-ld:${PORTSDIR}/devel/avr-binutils
@ -46,9 +47,9 @@ GNU_CONFIGURE= yes
ARCH= x86_64
.endif
CONFLICTS= avr-gcc-3*
CONFLICTS= avr-gcc-[34]*
CONFIGURE_ARGS= --target=avr --disable-libssp
CONFIGURE_ARGS= --target=avr --disable-libssp --with-gmp=${LOCALBASE}
MAKE_FLAGS= LANGUAGES="c c++"
# get rid of that silly -mcpu=pentiumpro FreeBSD 5+ is so fond of. :-(

View File

@ -1,6 +1,6 @@
MD5 (gcc-core-4.2.2.tar.bz2) = b02a013580a9555c7c8f2ca554c02722
SHA256 (gcc-core-4.2.2.tar.bz2) = 0aa0e8855ed2a18557116da97a3786b753e8f117024c974a78bf8b1a49e30d06
SIZE (gcc-core-4.2.2.tar.bz2) = 19104360
MD5 (gcc-g++-4.2.2.tar.bz2) = 1aa75e06ca16518f16d5df67ba98a392
SHA256 (gcc-g++-4.2.2.tar.bz2) = b83e6f847fe30ceea9d91fc09fde4aa5b735b8810967b4df7e24ae11fbb4aa13
SIZE (gcc-g++-4.2.2.tar.bz2) = 4795086
MD5 (gcc-core-4.3.2.tar.bz2) = dd8048b43d3d4e5595bcade47b9144c6
SHA256 (gcc-core-4.3.2.tar.bz2) = 0687e7279d78eb963ac34a3b06a0a6a1d1e9a26807ef4939cf4a2ad5f062e75a
SIZE (gcc-core-4.3.2.tar.bz2) = 23830073
MD5 (gcc-g++-4.3.2.tar.bz2) = bfdf8d19e1b85f522f8b8d48d25e7aaa
SHA256 (gcc-g++-4.3.2.tar.bz2) = 254e2bc95ca397579634b2277c4dbe84ee47cb86d0aad6bfff8586107085bb80
SIZE (gcc-g++-4.3.2.tar.bz2) = 5667106

View File

@ -1,144 +0,0 @@
--- ./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;

View File

@ -1,192 +1,51 @@
--- gcc/config/avr/avr.c.orig Wed Dec 19 14:18:09 2007
+++ gcc/config/avr/avr.c Wed Dec 19 14:34:15 2007
@@ -131,23 +131,28 @@
/* Core have 'MOVW' and 'LPM Rx,Z' instructions. */
int avr_have_movw_lpmx_p = 0;
+/* Core have 'EIJMP' and 'EICALL' instructions. */
+int avr_have_eijmp_eicall_p = 0;
Note: this patch is misnamed. It actually adds support for
ATmega256x. I'll stick with the name since CVS is poor at
renaming files. -- Joerg
Index: gcc/config/avr/libgcc.S
===================================================================
--- gcc/config/avr/libgcc.S (revision 132252)
+++ gcc/config/avr/libgcc.S (working copy)
@@ -594,7 +594,12 @@
out __SP_H__,r29
out __SREG__,__tmp_reg__
out __SP_L__,r28
+#if defined (__AVR_HAVE_EIJMP_EICALL__)
+ eijmp
+#else
ijmp
+#endif
+
struct base_arch_s {
int asm_only;
int enhanced;
int mega;
int have_movw_lpmx;
+ int have_eijmp_eicall;
const char *const macro;
};
.endfunc
#endif /* defined (L_prologue) */
static const struct base_arch_s avr_arch_types[] = {
- { 1, 0, 0, 0, NULL }, /* unknown device specified */
- { 1, 0, 0, 0, "__AVR_ARCH__=1" },
- { 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 */
+ { 1, 0, 0, 0, 0, "__AVR_ARCH__=1" },
+ { 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
@@ -162,7 +167,8 @@
ARCH_AVR3,
ARCH_AVR35,
ARCH_AVR4,
- ARCH_AVR5
+ ARCH_AVR5,
+ ARCH_AVR6
};
struct mcu_type_s {
@@ -288,6 +294,10 @@
{ "at90usb1286", ARCH_AVR5, "__AVR_AT90USB1286__" },
{ "at90usb1287", ARCH_AVR5, "__AVR_AT90USB1287__" },
{ "at94k", ARCH_AVR5, "__AVR_AT94K__" },
+ /* 3-Byte PC */
+ { "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__" },
@@ -370,6 +380,7 @@
avr_enhanced_p = base->enhanced;
avr_mega_p = base->mega;
avr_have_movw_lpmx_p = base->have_movw_lpmx;
+ avr_have_eijmp_eicall_p = base->have_eijmp_eicall;
avr_base_arch_macro = base->macro;
avr_extra_arch_macro = t->macro;
@@ -529,9 +540,10 @@
else
{
int offset = frame_pointer_needed ? 2 : 0;
+ int avr_pc_size = avr_have_eijmp_eicall_p ? 3 : 2;
offset += avr_regs_to_save (NULL);
- return get_frame_size () + 2 + 1 + offset;
+ return get_frame_size () + (avr_pc_size) + 1 + offset;
}
}
@@ -1139,7 +1151,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 ,")");
}
@@ -1164,6 +1176,11 @@
if (!AVR_MEGA)
fputc ('r', file);
}
+ else if (code == '!')
+ {
+ if (AVR_HAVE_EIJMP_EICALL)
+ fputc ('e', file);
+ }
else if (REG_P (x))
{
if (x == zero_reg_rtx)
@@ -4560,7 +4577,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;
@@ -5954,7 +5971,7 @@
{
switch_to_section (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);
--- gcc/config/avr/avr.h.orig Wed Dec 19 14:18:09 2007
+++ gcc/config/avr/avr.h Wed Dec 19 14:44:32 2007
@@ -36,6 +36,12 @@
builtin_define ("__AVR_HAVE_LPMX__"); \
if (avr_asm_only_p) \
builtin_define ("__AVR_ASM_ONLY__"); \
+ if (!avr_have_eijmp_eicall_p) \
+ builtin_define ("__AVR_2_BYTE_PC__"); \
+ if (avr_have_eijmp_eicall_p) \
+ builtin_define ("__AVR_3_BYTE_PC__"); \
+ if (avr_have_eijmp_eicall_p) \
+ builtin_define ("__AVR_HAVE_EIJMP_EICALL__"); \
if (avr_enhanced_p) \
builtin_define ("__AVR_ENHANCED__"); \
if (avr_enhanced_p) \
@@ -53,6 +59,8 @@
extern int avr_enhanced_p;
extern int avr_asm_only_p;
extern int avr_have_movw_lpmx_p;
+extern int avr_have_eijmp_eicall_p;
@@ -674,13 +679,22 @@
lpm __tmp_reg__, Z+
lpm r31, Z
mov r30, __tmp_reg__
+
#ifndef IN_LIBGCC2
extern GTY(()) section *progmem_section;
+#if defined (__AVR_HAVE_EIJMP_EICALL__)
+ eijmp
+#else
ijmp
+#endif
+
#else
lpm
adiw r30, 1
push r0
lpm
push r0
+#if defined (__AVR_HAVE_EIJMP_EICALL__)
+ push __zero_reg__
+#endif
ret
#endif
@@ -60,6 +68,7 @@
#define AVR_MEGA (avr_mega_p && !TARGET_SHORT_CALLS)
#define AVR_ENHANCED (avr_enhanced_p)
#define AVR_HAVE_MOVW (avr_have_movw_lpmx_p)
+#define AVR_HAVE_EIJMP_EICALL (avr_have_eijmp_eicall_p)
#define TARGET_VERSION fprintf (stderr, " (GNU assembler syntax)");
@@ -631,7 +640,7 @@
#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)
@@ -780,6 +789,7 @@
mmcu=at90usb6*|\
mmcu=at90usb12*|\
mmcu=at94k:-m avr5}\
+%{mmcu=atmega256*:-m avr6}\
%{mmcu=atmega324*|\
mmcu=atmega325*|\
mmcu=atmega328p|\
@@ -808,7 +818,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 }}}}}"
@@ -910,6 +921,8 @@
%{mmcu=atmega1280:crtm1280.o%s} \
%{mmcu=atmega1281:crtm1281.o%s} \
%{mmcu=atmega1284p:crtm1284p.o%s} \
+%{mmcu=atmega2560:crtm2560.o%s} \
+%{mmcu=atmega2561:crtm2561.o%s} \
%{mmcu=atmega8hva:crtm8hva.o%s} \
%{mmcu=atmega16hva:crtm16hva.o%s} \
%{mmcu=at90can32:crtcan32.o%s} \
--- gcc/config/avr/avr.md.orig Wed Dec 19 14:18:10 2007
+++ gcc/config/avr/avr.md Wed Dec 19 14:18:10 2007
.endfunc
Index: gcc/config/avr/avr.md
===================================================================
--- gcc/config/avr/avr.md (revision 132252)
+++ gcc/config/avr/avr.md (working copy)
@@ -32,6 +32,7 @@
;; p POST_INC or PRE_DEC address as a pointer (X, Y, Z)
;; r POST_INC or PRE_DEC address as a register (r26, r28, r30)
@ -195,7 +54,7 @@
;; UNSPEC usage:
;; 0 Length of a string, see "strlenhi".
@@ -2340,22 +2341,22 @@
@@ -2301,22 +2302,22 @@
"(register_operand (operands[0], HImode) || CONSTANT_P (operands[0]))"
"*{
if (which_alternative==0)
@ -222,7 +81,7 @@
}"
[(set_attr "cc" "clobber,clobber,clobber,clobber")
(set_attr_alternative "length"
@@ -2377,22 +2378,22 @@
@@ -2338,22 +2339,22 @@
"(register_operand (operands[0], VOIDmode) || CONSTANT_P (operands[0]))"
"*{
if (which_alternative==0)
@ -249,7 +108,7 @@
}"
[(set_attr "cc" "clobber,clobber,clobber,clobber")
(set_attr_alternative "length"
@@ -2422,13 +2423,20 @@
@@ -2376,13 +2377,20 @@
; indirect jump
(define_insn "indirect_jump"
[(set (pc) (match_operand:HI 0 "register_operand" "!z,*r"))]
@ -271,7 +130,7 @@
;; table jump
;; Table made from "rjmp" instructions for <=8K devices.
@@ -2437,7 +2445,7 @@
@@ -2391,7 +2399,7 @@
UNSPEC_INDEX_JMP))
(use (label_ref (match_operand 1 "" "")))
(clobber (match_dup 0))]
@ -280,7 +139,7 @@
"@
ijmp
push %A0\;push %B0\;ret"
@@ -2466,7 +2474,7 @@
@@ -2420,7 +2428,7 @@
lpm __tmp_reg__,Z+
lpm r31,Z
mov r30,__tmp_reg__
@ -289,7 +148,7 @@
[(set_attr "length" "6")
(set_attr "cc" "clobber")])
@@ -2475,7 +2483,7 @@
@@ -2429,7 +2437,7 @@
UNSPEC_INDEX_JMP))
(use (label_ref (match_operand 1 "" "")))
(clobber (match_dup 0))]
@ -298,64 +157,203 @@
"lsl r30
rol r31
lpm
--- gcc/config/avr/libgcc.S.orig Mon Jun 19 17:04:27 2006
+++ gcc/config/avr/libgcc.S Wed Dec 19 14:18:10 2007
@@ -593,7 +593,12 @@
out __SP_H__,r29
out __SREG__,__tmp_reg__
out __SP_L__,r28
+#if defined (__AVR_HAVE_EIJMP_EICALL__)
+ eijmp
+#else
ijmp
+#endif
+
.endfunc
#endif /* defined (L_prologue) */
@@ -2764,8 +2764,8 @@
(use (reg:HI REG_X))
(clobber (reg:HI REG_Z))]
""
- "ldi r30,pm_lo8(1f)
- ldi r31,pm_hi8(1f)
+ "ldi r30,lo8(gs(1f))
+ ldi r31,hi8(gs(1f))
%~jmp __prologue_saves__+((18 - %0) * 2)
1:"
[(set_attr_alternative "length"
Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c (revision 132252)
+++ gcc/config/avr/avr.c (working copy)
@@ -127,7 +127,8 @@
{ 0, 0, 1, 1, 0, 0, 0, 0, "__AVR_ARCH__=35" },
{ 0, 1, 0, 1, 0, 0, 0, 0, "__AVR_ARCH__=4" },
{ 0, 1, 1, 1, 0, 0, 0, 0, "__AVR_ARCH__=5" },
- { 0, 1, 1, 1, 1, 1, 0, 0, "__AVR_ARCH__=51" }
+ { 0, 1, 1, 1, 1, 1, 0, 0, "__AVR_ARCH__=51" },
+ { 0, 1, 1, 1, 1, 1, 1, 0, "__AVR_ARCH__=6" }
};
@@ -672,13 +677,22 @@
lpm __tmp_reg__, Z+
lpm r31, Z
mov r30, __tmp_reg__
+
+#if defined (__AVR_HAVE_EIJMP_EICALL__)
+ eijmp
+#else
ijmp
+#endif
+
#else
lpm
adiw r30, 1
push r0
lpm
push r0
+#if defined (__AVR_HAVE_EIJMP_EICALL__)
+ push __zero_reg__
+#endif
ret
#endif
.endfunc
--- gcc/config/avr/t-avr.orig Wed Dec 19 14:18:09 2007
+++ gcc/config/avr/t-avr Wed Dec 19 14:30:07 2007
/* These names are used as the index into the avr_arch_types[] table
@@ -144,7 +145,8 @@
ARCH_AVR35,
ARCH_AVR4,
ARCH_AVR5,
- ARCH_AVR51
+ ARCH_AVR51,
+ ARCH_AVR6
};
struct mcu_type_s {
@@ -273,6 +275,10 @@
{ "at90can128", ARCH_AVR51, "__AVR_AT90CAN128__" },
{ "at90usb1286", ARCH_AVR51, "__AVR_AT90USB1286__" },
{ "at90usb1287", ARCH_AVR51, "__AVR_AT90USB1287__" },
+ /* 3-Byte PC. */
+ { "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__" },
@@ -511,9 +517,10 @@
else
{
int offset = frame_pointer_needed ? 2 : 0;
+ int avr_pc_size = AVR_HAVE_EIJMP_EICALL ? 3 : 2;
offset += avr_regs_to_save (NULL);
- return get_frame_size () + 2 + 1 + offset;
+ return get_frame_size () + (avr_pc_size) + 1 + offset;
}
}
@@ -682,7 +694,9 @@
/* Prevent any attempt to delete the setting of ZERO_REG! */
emit_insn (gen_rtx_USE (VOIDmode, zero_reg_rtx));
}
- if (minimize && (frame_pointer_needed || live_seq > 6))
+ if (minimize && (frame_pointer_needed
+ || (AVR_2_BYTE_PC && live_seq > 6)
+ || live_seq > 7))
{
insn = emit_move_insn (gen_rtx_REG (HImode, REG_X),
gen_int_mode (size, HImode));
@@ -1119,7 +1126,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 ,")");
}
@@ -1144,6 +1151,11 @@
if (!AVR_MEGA)
fputc ('r', file);
}
+ else if (code == '!')
+ {
+ if (AVR_HAVE_EIJMP_EICALL)
+ fputc ('e', file);
+ }
else if (REG_P (x))
{
if (x == zero_reg_rtx)
@@ -4468,7 +4480,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;
@@ -5815,7 +5827,7 @@
{
switch_to_section (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);
}
Index: gcc/config/avr/t-avr
===================================================================
--- gcc/config/avr/t-avr (revision 132252)
+++ gcc/config/avr/t-avr (working copy)
@@ -37,8 +37,8 @@
FPBIT = fp-bit.c
-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
-MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51
-MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51
+MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6
+MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6
# The many avr2 matches are not listed here - this is the default.
MULTILIB_MATCHES = \
@@ -124,7 +124,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
@@ -123,7 +123,9 @@
mmcu?avr51=mmcu?atmega1284p \
mmcu?avr51=mmcu?at90can128 \
mmcu?avr51=mmcu?at90usb1286 \
- mmcu?avr51=mmcu?at90usb1287
+ mmcu?avr51=mmcu?at90usb1287 \
+ mmcu?avr6=mmcu?atmega2560 \
+ mmcu?avr6=mmcu?atmega2561
MULTILIB_EXCEPTIONS =
Index: gcc/config/avr/avr.h
===================================================================
--- gcc/config/avr/avr.h (revision 132252)
+++ gcc/config/avr/avr.h (working copy)
@@ -80,6 +80,12 @@
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__"); \
} \
@@ -100,9 +106,10 @@
#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_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 TARGET_VERSION fprintf (stderr, " (GNU assembler syntax)");
@@ -671,7 +678,7 @@
#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)
@@ -828,6 +835,7 @@
mmcu=at90usb64*|\
mmcu=at90usb128*|\
mmcu=at94k: -m avr5}\
+%{mmcu=atmega256*:-m avr6}\
%{mmcu=atmega324*|\
mmcu=atmega325*|\
mmcu=atmega328p|\
@@ -856,7 +864,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 }}}}}"
@@ -968,6 +977,8 @@
%{mmcu=atmega1280:crtm1280.o%s} \
%{mmcu=atmega1281:crtm1281.o%s} \
%{mmcu=atmega1284p:crtm1284p.o%s} \
+%{mmcu=atmega2560:crtm2560.o%s} \
+%{mmcu=atmega2561:crtm2561.o%s} \
%{mmcu=at90can128:crtcan128.o%s} \
%{mmcu=at90usb1286:crtusb1286.o%s} \
%{mmcu=at90usb1287:crtusb1287.o%s}"

View File

@ -1,19 +1,23 @@
--- gcc/config/avr/avr.md.orig 2007-09-01 19:28:30.000000000 +0400
+++ gcc/config/avr/avr.md 2007-11-08 02:37:48.828125000 +0300
@@ -39,21 +39,22 @@
(define_constants
[(REG_X 26)
(REG_Y 28)
(REG_Z 30)
(REG_W 24)
Index: gcc/config/avr/avr.md
===================================================================
--- gcc/config/avr/avr.md (revision 129892)
+++ gcc/config/avr/avr.md (working copy)
@@ -45,21 +45,22 @@
(REG_SP 32)
(TMP_REGNO 0) ; temporary register r0
(ZERO_REGNO 1) ; zero register r1
(SREG_ADDR 0x5F)
(RAMPZ_ADDR 0x5B)
(UNSPEC_STRLEN 0)
- (UNSPEC_INDEX_JMP 1)])
+ (UNSPEC_INDEX_JMP 1)
+ (UNSPEC_SWAP 4)])
(UNSPEC_INDEX_JMP 1)
(UNSPEC_SEI 2)
(UNSPEC_CLI 3)
+ (UNSPEC_SWAP 4)
(UNSPECV_PROLOGUE_SAVES 0)
(UNSPECV_EPILOGUE_RESTORES 1)])
(include "predicates.md")
(include "constraints.md")
@ -21,10 +25,7 @@
;; Condition code settings.
(define_attr "cc" "none,set_czn,set_zn,set_n,compare,clobber"
(const_string "none"))
(define_attr "type" "branch,branch1,arith,xcall"
(const_string "arith"))
@@ -1044,20 +1045,33 @@
@@ -1185,20 +1186,33 @@
return (AS2 (andi, %A0,lo8(%2)) CR_TAB
AS2 (andi, %B0,hi8(%2)) CR_TAB
AS2 (andi, %C0,hlo8(%2)) CR_TAB
@ -58,7 +59,7 @@
""
"@
or %0,%2
@@ -1172,24 +1186,71 @@
@@ -1313,24 +1327,71 @@
(xor:SI (match_operand:SI 1 "register_operand" "%0")
(match_operand:SI 2 "register_operand" "r")))]
""
@ -131,7 +132,7 @@
(define_insn "ashlhi3"
[(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r,r,r")
@@ -1205,20 +1266,61 @@
@@ -1346,20 +1407,61 @@
(ashift:SI (match_operand:SI 1 "register_operand" "0,0,0,r,0,0,0")
(match_operand:QI 2 "general_operand" "r,L,P,O,K,n,Qm")))]
""
@ -193,7 +194,7 @@
"if (!avr_peep2_scratch_safe (operands[3]))
FAIL;")
@@ -1323,21 +1425,63 @@
@@ -1464,21 +1566,63 @@
(match_operand:QI 2 "const_int_operand" "L,P,O,n")))
(clobber (match_scratch:QI 3 "=X,X,X,&d"))]
"reload_completed"
@ -258,7 +259,7 @@
(define_insn "lshrhi3"
[(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r,r,r")
@@ -1353,20 +1497,61 @@
@@ -1494,20 +1638,61 @@
(lshiftrt:SI (match_operand:SI 1 "register_operand" "0,0,0,r,0,0,0")
(match_operand:QI 2 "general_operand" "r,L,P,O,K,n,Qm")))]
""

View File

@ -0,0 +1,43 @@
Fix for GCC bugs:
#19636
#24894
#31644
#31786
Index: avr.c
===================================================================
--- gcc/config/avr/avr.c (revision 132380)
+++ gcc/config/avr/avr.c (working copy)
@@ -976,6 +976,8 @@
true_regnum (XEXP (x, 0)));
debug_rtx (x);
}
+ if (!strict && GET_CODE (x) == SUBREG)
+ x = SUBREG_REG (x);
if (REG_P (x) && (strict ? REG_OK_FOR_BASE_STRICT_P (x)
: REG_OK_FOR_BASE_NOSTRICT_P (x)))
r = POINTER_REGS;
@@ -990,6 +992,7 @@
if (fit)
{
if (! strict
+ || REGNO (XEXP (x,0)) == REG_X
|| REGNO (XEXP (x,0)) == REG_Y
|| REGNO (XEXP (x,0)) == REG_Z)
r = BASE_POINTER_REGS;
Index: avr.h
===================================================================
--- gcc/config/avr/avr.h (revision 132380)
+++ gcc/config/avr/avr.h (working copy)
@@ -483,10 +483,6 @@
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)) \
{ \

View File

@ -1,13 +0,0 @@
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)

View File

@ -1,14 +0,0 @@
Fix for GCC bug #30243.
Index: gcc/builtins.c
===================================================================
--- gcc/builtins.c (revision 126457)
+++ gcc/builtins.c (working copy)
@@ -5664,7 +5664,7 @@
lo = 0;
}
- if (imode != rmode)
+ if (imode > rmode)
temp = gen_lowpart (rmode, temp);
temp = expand_binop (rmode, and_optab, temp,
immed_double_const (lo, hi, rmode),

View File

@ -0,0 +1,81 @@
Index: gcc/rtl-factoring.c
===================================================================
--- gcc/rtl-factoring.c (revision 132522)
+++ gcc/rtl-factoring.c (working copy)
@@ -551,8 +551,8 @@
df_simulate_artificial_refs_at_end (bb, &live);
/* Propagate until INSN if found. */
- for (x = BB_END (bb); x != insn;)
- df_simulate_one_insn_backwards (bb, insn, &live);
+ for (x = BB_END (bb); x != insn; x = PREV_INSN(x))
+ df_simulate_one_insn_backwards (bb, x, &live);
/* Clear registers live after INSN. */
renumbered_reg_set_to_hard_reg_set (&hlive, &live);
@@ -562,7 +562,7 @@
for (i = 0; i < length;)
{
rtx prev = PREV_INSN (x);
- df_simulate_one_insn_backwards (bb, insn, &live);
+ df_simulate_one_insn_backwards (bb, x, &live);
if (INSN_P (x))
{
@@ -949,6 +949,17 @@
return sym;
}
+/* Splits basic block at the requested insn and rebuilds dataflow. */
+
+static basic_block
+asplit_block(basic_block bb, rtx insn)
+{
+ basic_block next;
+ next = split_block (bb, insn)->dest;
+ df_analyze ();
+ return next;
+}
+
/* Ensures that INSN is the last insn in its block and returns the block label
of the next block. */
@@ -959,7 +970,7 @@
if ((insn == BB_END (bb)) && (bb->next_bb != EXIT_BLOCK_PTR))
return block_label (bb->next_bb);
else
- return block_label (split_block (bb, insn)->dest);
+ return block_label (asplit_block (bb, insn));
}
/* Ensures that the last insns of the best pattern and its matching sequences
@@ -1008,8 +1019,9 @@
/* Emit an indirect jump via the link register after the sequence acting
as the return insn. Also emit a barrier and update the basic block. */
- retjmp = emit_jump_insn_after (gen_indirect_jump (pattern_seqs->link_reg),
- BB_END (bb));
+ if (!find_reg_note (BB_END(bb), REG_NORETURN, NULL))
+ retjmp = emit_jump_insn_after (gen_indirect_jump (pattern_seqs->link_reg),
+ BB_END (bb));
emit_barrier_after (BB_END (bb));
/* Replace all outgoing edges with a new one to the block of RETLABEL. */
@@ -1025,7 +1037,7 @@
for (; i < sb->length; i++)
insn = prev_insn_in_block (insn);
- sb->label = block_label (split_block (bb, insn)->dest);
+ sb->label = block_label (asplit_block (bb, insn));
}
/* Emit an insn saving the return address to the link register before the
@@ -1067,7 +1079,7 @@
/* Delete the insns of the sequence. */
for (i = 0; i < sb->length; i++)
insn = prev_insn_in_block (insn);
- delete_basic_block (split_block (bb, insn)->dest);
+ delete_basic_block (asplit_block (bb, insn));
/* Emit an insn saving the return address to the link register
before the deleted sequence. */

View File

@ -0,0 +1,48 @@
Fix for bugs #34210, #35508.
===================================================================
--- libgcc/config.host.orig 2008-01-25 13:49:04.000000000 -0700
+++ libgcc/config.host 2008-03-22 22:04:25.965018200 -0600
@@ -77,6 +77,9 @@ strongarm*-*-*)
arm*-*-*)
cpu_type=arm
;;
+avr-*-*)
+ cpu_type=avr
+ ;;
bfin*-*)
cpu_type=bfin
;;
@@ -243,6 +246,8 @@ arm*-*-kaos*)
avr-*-rtems*)
;;
avr-*-*)
+ # Make HImode functions for AVR
+ tmake_file=${cpu_type}/t-avr
;;
bfin*-elf*)
;;
Index: config/avr/t-avr
===================================================================
--- libgcc/config/avr/t-avr (revision 0)
+++ libgcc/config/avr/t-avr (revision 0)
@@ -0,0 +1,19 @@
+# Extra 16-bit integer functions.
+intfuncs16 = _absvXX2 _addvXX3 _subvXX3 _mulvXX3 _negvXX2 _ffsXX2 _clzXX2 \
+ _ctzXX2 _popcountXX2 _parityXX2
+hiintfuncs16 = $(subst XX,hi,$(intfuncs16))
+siintfuncs16 = $(subst XX,si,$(intfuncs16))
+
+iter-items := $(hiintfuncs16)
+iter-labels := $(siintfuncs16)
+iter-sizes := $(patsubst %,2,$(siintfuncs16)) $(patsubst %,2,$(hiintfuncs16))
+
+
+include $(srcdir)/empty.mk $(patsubst %,$(srcdir)/siditi-object.mk,$(iter-items))
+libgcc-objects += $(patsubst %,%$(objext),$(hiintfuncs16))
+
+ifeq ($(enable_shared),yes)
+libgcc-s-objects += $(patsubst %,%_s$(objext),$(hiintfuncs16))
+endif
+
+

View File

@ -0,0 +1,65 @@
Patch to fix GCC bug #35013.
Index: avr-protos.h
===================================================================
--- gcc/config/avr/avr-protos.h (revision 132369)
+++ gcc/config/avr/avr-protos.h (working copy)
@@ -111,6 +111,7 @@
extern int _reg_unused_after (rtx insn, rtx reg);
extern int avr_jump_mode (rtx x, rtx insn);
extern int byte_immediate_operand (rtx op, enum machine_mode mode);
+extern int text_segment_operand (rtx op, enum machine_mode mode);
extern int test_hard_reg_class (enum reg_class class, rtx x);
extern int jump_over_one_insn_p (rtx insn, rtx dest);
Index: avr.c
===================================================================
--- gcc/config/avr/avr.c (revision 132366)
+++ gcc/config/avr/avr.c (working copy)
@@ -1116,8 +1116,7 @@
default:
if (CONSTANT_ADDRESS_P (addr)
- && ((GET_CODE (addr) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (addr))
- || GET_CODE (addr) == LABEL_REF))
+ && text_segment_operand (addr, VOIDmode))
{
fprintf (file, "pm(");
output_addr_const (file,addr);
@@ -1428,6 +1427,26 @@
&& INTVAL (op) <= 0xff && INTVAL (op) >= 0);
}
+/* Return true if OP is a program memory reference.*/
+int
+text_segment_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
+{
+ switch (GET_CODE (op))
+ {
+ case LABEL_REF :
+ return true;
+ case SYMBOL_REF :
+ return SYMBOL_REF_FUNCTION_P (op);
+ case PLUS :
+ /* Assume canonical format of symbol + constant.
+ Fall through. */
+ case CONST :
+ return text_segment_operand (XEXP (op, 0), VOIDmode);
+ default :
+ return false;
+ }
+}
+
/* Output all insn addresses and their sizes into the assembly language
output file. This is helpful for debugging whether the length attributes
in the md file are correct.
@@ -4465,8 +4484,7 @@
avr_assemble_integer (rtx x, unsigned int size, int aligned_p)
{
if (size == POINTER_SIZE / BITS_PER_UNIT && aligned_p
- && ((GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (x))
- || GET_CODE (x) == LABEL_REF))
+ && text_segment_operand (x, VOIDmode) )
{
fputs ("\t.word\tpm(", asm_out_file);
output_addr_const (asm_out_file, x);

View File

@ -1,33 +0,0 @@
2007-07-03 Eric Weddington <eweddington@cso.atmel.com>
* config/avr/constraints.md (define_memory_constraint "Q"): Fix
the constraint description.
* doc/md.texi: Update documentation of AVR constraints.
=======================================
--- gcc/config/avr/constraints.md.old 2007-05-19 04:59:17.000000000 -0600
+++ gcc/config/avr/constraints.md 2007-07-03 14:47:28.007933000 -0600
@@ -105,6 +105,6 @@
(match_test "ival >= -6 && ival <= 5")))
(define_memory_constraint "Q"
- "A memory address based on X or Y pointer with displacement."
+ "A memory address based on Y or Z pointer with displacement."
(and (match_code "mem")
(match_test "extra_constraint_Q (op)")))
--- gcc/doc/md.texi.old 2007-05-28 19:12:58.000000000 -0600
+++ gcc/doc/md.texi 2007-07-03 16:56:26.157051800 -0600
@@ -1742,6 +1742,12 @@ Constant integer 1
@item G
A floating point constant 0.0
+
+@item R
+Integer constant in the range -6 @dots{} 5.
+
+@item Q
+A memory address based on Y or Z pointer with displacement.
@end table
@item CRX Architecture---@file{config/crx/crx.h}

View File

@ -1,21 +0,0 @@
Patch to document the AVR progmem attribute.
===========================================
--- gcc/doc/extend.texi.old 2007-07-17 18:32:37.390625000 -0600
+++ gcc/doc/extend.texi 2007-07-18 07:59:47.218750000 -0600
@@ -3623,6 +3623,16 @@ placed in either the @code{.bss_below100
@end table
+@subsection AVR Variable Attributes
+
+@table @code
+@item progmem
+@cindex @code{progmem} variable attribute
+The @code{progmem} attribute is used on the AVR to place data in the Program
+Memory address space. The AVR is a Harvard Architecture processor and data
+normally resides in the Data Memory address space.
+@end table
+
@node Type Attributes
@section Specifying Attributes of Types
@cindex attribute of types

View File

@ -1,10 +0,0 @@
--- 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

View File

@ -1,304 +1,274 @@
--- gcc/config/avr/avr.c.orig Sat Sep 1 17:28:30 2007
+++ gcc/config/avr/avr.c Wed Dec 19 14:02:11 2007
@@ -143,6 +143,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" }
};
@@ -157,6 +158,7 @@
ARCH_AVR2,
ARCH_AVR25,
ARCH_AVR3,
+ ARCH_AVR35,
ARCH_AVR4,
ARCH_AVR5
};
@@ -204,6 +206,9 @@
{ "attiny261", ARCH_AVR25, "__AVR_ATtiny261__" },
@@ -173,6 +174,7 @@
/* Classic + MOVW, <= 8K. */
{ "avr25", ARCH_AVR25, NULL },
{ "attiny13", ARCH_AVR25, "__AVR_ATtiny13__" },
+ { "attiny13a", ARCH_AVR25, "__AVR_ATtiny13A__" },
{ "attiny2313", ARCH_AVR25, "__AVR_ATtiny2313__" },
{ "attiny24", ARCH_AVR25, "__AVR_ATtiny24__" },
{ "attiny44", ARCH_AVR25, "__AVR_ATtiny44__" },
@@ -188,6 +188,7 @@
{ "attiny461", ARCH_AVR25, "__AVR_ATtiny461__" },
{ "attiny861", ARCH_AVR25, "__AVR_ATtiny861__" },
+ { "attiny43u", ARCH_AVR25, "__AVR_ATtiny43U__" },
+ { "attiny48", ARCH_AVR25, "__AVR_ATtiny48__" },
+ { "attiny88", ARCH_AVR25, "__AVR_ATtiny88__" },
{ "attiny43u", ARCH_AVR25, "__AVR_ATtiny43U__" },
+ { "attiny87", ARCH_AVR25, "__AVR_ATtiny87__" },
{ "attiny48", ARCH_AVR25, "__AVR_ATtiny48__" },
{ "attiny88", ARCH_AVR25, "__AVR_ATtiny88__" },
{ "at86rf401", ARCH_AVR25, "__AVR_AT86RF401__" },
/* Classic, > 8K. */
{ "avr3", ARCH_AVR3, NULL },
@@ -212,17 +217,25 @@
{ "at43usb320", ARCH_AVR3, "__AVR_AT43USB320__" },
{ "at43usb355", ARCH_AVR3, "__AVR_AT43USB355__" },
{ "at76c711", ARCH_AVR3, "__AVR_AT76C711__" },
+ /* Classic + MOVW + JMP/CALL. */
+ { "avr35", ARCH_AVR35, NULL },
+ { "at90usb82", ARCH_AVR35, "__AVR_AT90USB82__" },
+ { "at90usb162", ARCH_AVR35, "__AVR_AT90USB162__" },
@@ -224,6 +224,8 @@ static const struct mcu_type_s avr_mcu_t
{ "avr35", ARCH_AVR35, NULL },
{ "at90usb82", ARCH_AVR35, "__AVR_AT90USB82__" },
{ "at90usb162", ARCH_AVR35, "__AVR_AT90USB162__" },
+ { "attiny167", ARCH_AVR35, "__AVR_ATtiny167__" },
+ { "attiny327", ARCH_AVR35, "__AVR_ATtiny327__" },
/* Enhanced, <= 8K. */
{ "avr4", ARCH_AVR4, NULL },
{ "atmega8", ARCH_AVR4, "__AVR_ATmega8__" },
{ "atmega48", ARCH_AVR4, "__AVR_ATmega48__" },
+ { "atmega48p", ARCH_AVR4, "__AVR_ATmega48P__" },
{ "atmega88", ARCH_AVR4, "__AVR_ATmega88__" },
+ { "atmega88p", ARCH_AVR4, "__AVR_ATmega88P__" },
{ "atmega8515", ARCH_AVR4, "__AVR_ATmega8515__" },
{ "atmega8535", ARCH_AVR4, "__AVR_ATmega8535__" },
{ "atmega8hva", ARCH_AVR4, "__AVR_ATmega8HVA__" },
{ "at90pwm1", ARCH_AVR4, "__AVR_AT90PWM1__" },
{ "at90pwm2", ARCH_AVR4, "__AVR_AT90PWM2__" },
+ { "at90pwm2b", ARCH_AVR4, "__AVR_AT90PWM2B__" },
@@ -221,6 +223,7 @@
{ "at90pwm2b", ARCH_AVR4, "__AVR_AT90PWM2B__" },
{ "at90pwm3", ARCH_AVR4, "__AVR_AT90PWM3__" },
+ { "at90pwm3b", ARCH_AVR4, "__AVR_AT90PWM3B__" },
/* Enhanced, > 8K. */
{ "at90pwm3b", ARCH_AVR4, "__AVR_AT90PWM3B__" },
+ { "at90pwm81", ARCH_AVR4, "__AVR_AT90PWM81__" },
/* Enhanced, > 8K, <= 64K. */
{ "avr5", ARCH_AVR5, NULL },
{ "atmega16", ARCH_AVR5, "__AVR_ATmega16__" },
@@ -233,6 +246,7 @@
{ "atmega165", ARCH_AVR5, "__AVR_ATmega165__" },
{ "atmega165p", ARCH_AVR5, "__AVR_ATmega165P__" },
{ "atmega168", ARCH_AVR5, "__AVR_ATmega168__" },
+ { "atmega168p", ARCH_AVR5, "__AVR_ATmega168P__" },
{ "atmega169", ARCH_AVR5, "__AVR_ATmega169__" },
{ "atmega169p", ARCH_AVR5, "__AVR_ATmega169P__" },
{ "atmega32", ARCH_AVR5, "__AVR_ATmega32__" },
@@ -242,10 +256,12 @@
{ "atmega325p", ARCH_AVR5, "__AVR_ATmega325P__" },
{ "atmega3250", ARCH_AVR5, "__AVR_ATmega3250__" },
{ "atmega3250p", ARCH_AVR5, "__AVR_ATmega3250P__" },
+ { "atmega328p", ARCH_AVR5, "__AVR_ATmega328P__" },
{ "atmega329", ARCH_AVR5, "__AVR_ATmega329__" },
{ "atmega329p", ARCH_AVR5, "__AVR_ATmega329P__" },
{ "atmega3290", ARCH_AVR5, "__AVR_ATmega3290__" },
{ "atmega3290p", ARCH_AVR5, "__AVR_ATmega3290P__" },
+ { "atmega32hvb", ARCH_AVR5, "__AVR_ATmega32HVB__" },
{ "atmega406", ARCH_AVR5, "__AVR_ATmega406__" },
{ "atmega64", ARCH_AVR5, "__AVR_ATmega64__" },
{ "atmega640", ARCH_AVR5, "__AVR_ATmega640__" },
@@ -258,12 +274,13 @@
{ "atmega128", ARCH_AVR5, "__AVR_ATmega128__" },
{ "atmega1280", ARCH_AVR5, "__AVR_ATmega1280__" },
{ "atmega1281", ARCH_AVR5, "__AVR_ATmega1281__" },
+ { "atmega1284p", ARCH_AVR5, "__AVR_ATmega1284P__" },
{ "atmega16hva", ARCH_AVR5, "__AVR_ATmega16HVA__" },
{ "at90can32", ARCH_AVR5, "__AVR_AT90CAN32__" },
@@ -278,6 +278,15 @@ static const struct mcu_type_s avr_mcu_t
{ "at90can64", ARCH_AVR5, "__AVR_AT90CAN64__" },
{ "at90can128", ARCH_AVR5, "__AVR_AT90CAN128__" },
- { "at90usb82", ARCH_AVR5, "__AVR_AT90USB82__" },
- { "at90usb162", ARCH_AVR5, "__AVR_AT90USB162__" },
+ { "at90pwm216", ARCH_AVR5, "__AVR_AT90PWM216__" },
+ { "at90pwm316", ARCH_AVR5, "__AVR_AT90PWM316__" },
{ "at90pwm216", ARCH_AVR5, "__AVR_AT90PWM216__" },
{ "at90pwm316", ARCH_AVR5, "__AVR_AT90PWM316__" },
+ { "atmega32c1", ARCH_AVR5, "__AVR_ATmega32C1__" },
+ { "atmega64c1", ARCH_AVR5, "__AVR_ATmega64C1__" },
+ { "atmega16m1", ARCH_AVR5, "__AVR_ATmega16M1__" },
+ { "atmega32m1", ARCH_AVR5, "__AVR_ATmega32M1__" },
+ { "atmega64m1", ARCH_AVR5, "__AVR_ATmega64M1__" },
+ { "atmega16u4", ARCH_AVR5, "__AVR_ATmega16U4__" },
+ { "atmega32u4", ARCH_AVR5, "__AVR_ATmega32U4__" },
+ { "atmega32u6", ARCH_AVR5, "__AVR_ATmega32U6__" },
+ { "at90scr100", ARCH_AVR5, "__AVR_AT90SCR100__" },
{ "at90usb646", ARCH_AVR5, "__AVR_AT90USB646__" },
{ "at90usb647", ARCH_AVR5, "__AVR_AT90USB647__" },
{ "at90usb1286", ARCH_AVR5, "__AVR_AT90USB1286__" },
{ "at94k", ARCH_AVR5, "__AVR_AT94K__" },
@@ -278,9 +283,13 @@
{ "atmega1280", ARCH_AVR51, "__AVR_ATmega1280__" },
{ "atmega1281", ARCH_AVR51, "__AVR_ATmega1281__" },
{ "atmega1284p", ARCH_AVR51, "__AVR_ATmega1284P__" },
+ { "atmega128rfa1", ARCH_AVR51, "__AVR_ATmega128RFA1__" },
{ "at90can128", ARCH_AVR51, "__AVR_AT90CAN128__" },
{ "at90usb1286", ARCH_AVR51, "__AVR_AT90USB1286__" },
{ "at90usb1287", ARCH_AVR51, "__AVR_AT90USB1287__" },
+ { "m3000f", ARCH_AVR51, "__AVR_M3000F__" },
+ { "m3000s", ARCH_AVR51, "__AVR_M3000S__" },
+ { "m3001b", ARCH_AVR51, "__AVR_M3001B__" },
/* 3-Byte PC. */
{ "avr6", ARCH_AVR6, NULL },
{ "atmega2560", ARCH_AVR6, "__AVR_ATmega2560__" },
--- gcc/config/avr/t-avr.orig Fri Apr 27 22:53:57 2007
+++ gcc/config/avr/t-avr Wed Dec 19 14:01:08 2007
@@ -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=avr35/mmcu=avr4/mmcu=avr5
+MULTILIB_DIRNAMES = avr2 avr25 avr3 avr35 avr4 avr5
@@ -43,6 +43,7 @@ MULTILIB_DIRNAMES = avr2 avr25 avr3 avr3
# The many avr2 matches are not listed here - this is the default.
MULTILIB_MATCHES = \
@@ -53,21 +53,30 @@
mmcu?avr25=mmcu?attiny261 \
mmcu?avr25=mmcu?attiny13 \
+ mmcu?avr25=mmcu?attiny13a \
mmcu?avr25=mmcu?attiny2313 \
mmcu?avr25=mmcu?attiny24 \
mmcu?avr25=mmcu?attiny44 \
@@ -55,6 +55,7 @@
mmcu?avr25=mmcu?attiny461 \
mmcu?avr25=mmcu?attiny861 \
+ mmcu?avr25=mmcu?attiny43u \
+ mmcu?avr25=mmcu?attiny48 \
+ mmcu?avr25=mmcu?attiny88 \
mmcu?avr25=mmcu?attiny43u \
+ mmcu?avr25=mmcu?attiny87 \
mmcu?avr25=mmcu?attiny48 \
mmcu?avr25=mmcu?attiny88 \
mmcu?avr25=mmcu?at86rf401 \
mmcu?avr3=mmcu?atmega103 \
mmcu?avr3=mmcu?atmega603 \
mmcu?avr3=mmcu?at43usb320 \
mmcu?avr3=mmcu?at43usb355 \
mmcu?avr3=mmcu?at76c711 \
+ mmcu?avr35=mmcu?at90usb82 \
+ mmcu?avr35=mmcu?at90usb162 \
@@ -63,6 +63,8 @@ MULTILIB_MATCHES = \
mmcu?avr31=mmcu?atmega103 \
mmcu?avr35=mmcu?at90usb82 \
mmcu?avr35=mmcu?at90usb162 \
+ mmcu?avr35=mmcu?attiny167 \
+ mmcu?avr35=mmcu?attiny327 \
mmcu?avr4=mmcu?atmega48 \
+ mmcu?avr4=mmcu?atmega48p \
mmcu?avr4=mmcu?atmega48p \
mmcu?avr4=mmcu?atmega8 \
mmcu?avr4=mmcu?atmega8515 \
mmcu?avr4=mmcu?atmega8535 \
mmcu?avr4=mmcu?atmega88 \
+ mmcu?avr4=mmcu?atmega88p \
mmcu?avr4=mmcu?atmega8hva \
mmcu?avr4=mmcu?at90pwm1 \
mmcu?avr4=mmcu?at90pwm2 \
+ mmcu?avr4=mmcu?at90pwm2b \
@@ -80,6 +82,7 @@
mmcu?avr4=mmcu?at90pwm2b \
mmcu?avr4=mmcu?at90pwm3 \
+ mmcu?avr4=mmcu?at90pwm3b \
mmcu?avr4=mmcu?at90pwm3b \
+ mmcu?avr4=mmcu?at90pwm81 \
mmcu?avr5=mmcu?atmega16 \
mmcu?avr5=mmcu?atmega161 \
mmcu?avr5=mmcu?atmega162 \
@@ -76,6 +85,7 @@
mmcu?avr5=mmcu?atmega165 \
mmcu?avr5=mmcu?atmega165p \
mmcu?avr5=mmcu?atmega168 \
+ mmcu?avr5=mmcu?atmega168p \
mmcu?avr5=mmcu?atmega169 \
mmcu?avr5=mmcu?atmega169p \
mmcu?avr5=mmcu?atmega32 \
@@ -85,10 +95,12 @@
mmcu?avr5=mmcu?atmega325p \
mmcu?avr5=mmcu?atmega3250 \
mmcu?avr5=mmcu?atmega3250p \
+ mmcu?avr5=mmcu?atmega328p \
mmcu?avr5=mmcu?atmega329 \
mmcu?avr5=mmcu?atmega329p \
mmcu?avr5=mmcu?atmega3290 \
mmcu?avr5=mmcu?atmega3290p \
+ mmcu?avr5=mmcu?atmega32hvb \
mmcu?avr5=mmcu?atmega406 \
mmcu?avr5=mmcu?atmega64 \
mmcu?avr5=mmcu?atmega640 \
@@ -101,12 +113,13 @@
mmcu?avr5=mmcu?atmega128 \
mmcu?avr5=mmcu?atmega1280 \
mmcu?avr5=mmcu?atmega1281 \
+ mmcu?avr5=mmcu?atmega1284p \
mmcu?avr5=mmcu?atmega16hva \
mmcu?avr5=mmcu?at90can32 \
@@ -114,6 +114,15 @@ MULTILIB_MATCHES = \
mmcu?avr5=mmcu?at90can64 \
mmcu?avr5=mmcu?at90can128 \
- mmcu?avr5=mmcu?at90usb82 \
- mmcu?avr5=mmcu?at90usb162 \
+ mmcu?avr5=mmcu?at90pwm216 \
+ mmcu?avr5=mmcu?at90pwm316 \
mmcu?avr5=mmcu?at90pwm216 \
mmcu?avr5=mmcu?at90pwm316 \
+ mmcu?avr5=mmcu?atmega32c1 \
+ mmcu?avr5=mmcu?atmega64c1 \
+ mmcu?avr5=mmcu?atmega16m1 \
+ mmcu?avr5=mmcu?atmega32m1 \
+ mmcu?avr5=mmcu?atmega64m1 \
+ mmcu?avr5=mmcu?atmega16u4 \
+ mmcu?avr5=mmcu?atmega32u4 \
+ mmcu?avr5=mmcu?atmega32u6 \
+ mmcu?avr5=mmcu?at90scr100 \
mmcu?avr5=mmcu?at90usb646 \
mmcu?avr5=mmcu?at90usb647 \
mmcu?avr5=mmcu?at90usb1286 \
--- gcc/config/avr/avr.h.orig Wed Dec 19 13:39:10 2007
+++ gcc/config/avr/avr.h Wed Dec 19 14:02:06 2007
@@ -733,7 +733,7 @@
/* A C string constant that tells the GCC drvier program options to
pass to `cc1plus'. */
mmcu?avr5=mmcu?at94k \
@@ -133,9 +138,13 @@
mmcu?avr51=mmcu?atmega1280 \
mmcu?avr51=mmcu?atmega1281 \
mmcu?avr51=mmcu?atmega1284p \
+ mmcu?avr51=mmcu?atmega128rfa1 \
mmcu?avr51=mmcu?at90can128 \
mmcu?avr51=mmcu?at90usb1286 \
mmcu?avr51=mmcu?at90usb1287 \
+ mmcu?avr51=mmcu?m3000f \
+ mmcu?avr51=mmcu?m3000s \
+ mmcu?avr51=mmcu?m3001b \
mmcu?avr6=mmcu?atmega2560 \
mmcu?avr6=mmcu?atmega2561
-#define ASM_SPEC "%{mmcu=avr25:-mmcu=avr2;\
+#define ASM_SPEC "%{mmcu=avr25:-mmcu=avr2;mmcu=avr35:-mmcu=avr3;\
mmcu=*:-mmcu=%*}"
#define LINK_SPEC " %{!mmcu*:-m avr2}\
@@ -759,36 +759,50 @@
%{mmcu=atmega103|\
mmcu=atmega603|\
--- gcc/config/avr/avr.h.orig 2009-01-26 17:37:33.000000000 +0100
+++ gcc/config/avr/avr.h 2009-01-26 17:47:48.000000000 +0100
@@ -811,7 +811,7 @@
mmcu=at90s8*|\
mmcu=at90c8*|\
mmcu=at86rf401|\
- mmcu=attiny13|\
+ mmcu=attiny13*|\
mmcu=attiny2313|\
mmcu=attiny24|\
mmcu=attiny25|\
@@ -822,14 +822,17 @@
mmcu=at43*|\
- mmcu=at76*:-m avr3}\
+ mmcu=at76*:|\
+ mmcu=at90usb82|\
+ mmcu=at90usb162:-m avr3} \
mmcu=at76*|\
mmcu=at90usb82|\
- mmcu=at90usb162: -m avr3}\
+ mmcu=at90usb162|\
+ mmcu=attiny16*|\
+ mmcu=attiny32*: -m avr3}\
%{mmcu=atmega8*|\
- mmcu=atmega48|\
- mmcu=at90pwm*:-m avr4}\
+ mmcu=atmega48*|\
+ mmcu=at90pwm1|\
+ mmcu=at90pwm2|\
+ mmcu=at90pwm2b|\
+ mmcu=at90pwm3|\
+ mmcu=at90pwm3b:-m avr4}\
mmcu=atmega48*|\
mmcu=at90pwm1|\
mmcu=at90pwm2|\
mmcu=at90pwm2b|\
mmcu=at90pwm3|\
- mmcu=at90pwm3b: -m avr4}\
+ mmcu=at90pwm3b|\
+ mmcu=at90pwm81: -m avr4}\
%{mmcu=atmega16*|\
mmcu=atmega32*|\
mmcu=atmega406|\
mmcu=atmega64*|\
mmcu=atmega128*|\
@@ -838,9 +841,12 @@
mmcu=at90can*|\
- mmcu=at90usb*|\
+ mmcu=at90pwm216|\
+ mmcu=at90pwm316|\
+ mmcu=at90usb6*|\
+ mmcu=at90usb12*|\
mmcu=at94k:-m avr5}\
mmcu=at90pwm216|\
mmcu=at90pwm316|\
+ mmcu=at90scr100|\
mmcu=at90usb64*|\
mmcu=at90usb128*|\
- mmcu=at94k: -m avr5}\
+ mmcu=at94k|\
+ mmcu=m3000*|\
+ mmcu=m3001*: -m avr5}\
%{mmcu=atmega256*:-m avr6}\
%{mmcu=atmega324*|\
mmcu=atmega325*|\
+ mmcu=atmega328p|\
mmcu=atmega329*|\
mmcu=atmega406|\
- mmcu=atmega48|\
- mmcu=atmega88|\
+ mmcu=atmega48*|\
+ mmcu=atmega88*|\
mmcu=atmega64|\
mmcu=atmega644*|\
mmcu=atmega645*|\
mmcu=atmega649*|\
mmcu=atmega128|\
+ mmcu=atmega1284p|\
mmcu=atmega162|\
mmcu=atmega164*|\
mmcu=atmega165*|\
- mmcu=atmega168|\
+ mmcu=atmega168*|\
mmcu=atmega169*|\
mmcu=atmega8hva|\
mmcu=atmega16hva|\
+ mmcu=atmega32hvb|\
+ mmcu=attiny48|\
+ mmcu=attiny88|\
@@ -865,13 +871,26 @@
mmcu=atmega32hvb|\
mmcu=attiny48|\
mmcu=attiny88|\
+ mmcu=attiny87|\
+ mmcu=attiny167|\
+ mmcu=attiny327|\
mmcu=at90can*|\
mmcu=at90pwm*|\
+ mmcu=atmega32c1|\
+ mmcu=atmega64c1|\
+ mmcu=atmega16m1|\
+ mmcu=atmega32m1|\
+ mmcu=atmega16u4|\
+ mmcu=atmega32u*|\
+ mmcu=at90scr100|\
mmcu=at90usb*: -Tdata 0x800100}\
@@ -839,6 +853,9 @@
%{mmcu=attiny261:crttn261.o%s} \
%{mmcu=atmega640|\
mmcu=atmega1280|\
mmcu=atmega1281|\
- mmcu=atmega256*: -Tdata 0x800200} "
+ mmcu=atmega256*|\
+ mmcu=atmega128rfa1: -Tdata 0x800200}\
+%{mmcu=m3000*|\
+ mmcu=m3001*: -Tdata 0x801000}"
#define LIB_SPEC \
"%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}"
@@ -906,6 +925,7 @@
%{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=attiny24:crttn24.o%s} \
%{mmcu=attiny44:crttn44.o%s} \
@@ -917,14 +937,17 @@
%{mmcu=attiny461:crttn461.o%s} \
%{mmcu=attiny861:crttn861.o%s} \
+%{mmcu=attiny43u:crttn43u.o%s} \
+%{mmcu=attiny48:crttn48.o%s} \
+%{mmcu=attiny88:crttn88.o%s} \
%{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \
%{mmcu=atmega603:crtm603.o%s} \
%{mmcu=at43usb320:crt43320.o%s} \
@@ -846,12 +863,16 @@
%{mmcu=attiny43u:crttn43u.o%s} \
+%{mmcu=attiny87:crttn87.o%s} \
%{mmcu=attiny48:crttn48.o%s} \
%{mmcu=attiny88:crttn88.o%s} \
-%{mmcu=at43usb320|mmcu=avr3:crt43320.o%s} \
-%{mmcu=at43usb355:crt43355.o%s} \
+%{mmcu=at43usb355|mmcu=avr3:crt43355.o%s} \
%{mmcu=at76c711:crt76711.o%s} \
%{mmcu=atmega103|mmcu=avr31:crtm103.o%s} \
+%{mmcu=at43usb320:crt43320.o%s} \
%{mmcu=at90usb162|mmcu=avr35:crtusb162.o%s} \
%{mmcu=at90usb82:crtusb82.o%s} \
+%{mmcu=attiny167:crttn167.o%s} \
+%{mmcu=attiny327:crttn327.o%s} \
%{mmcu=atmega8|mmcu=avr4:crtm8.o%s} \
%{mmcu=atmega48:crtm48.o%s} \
+%{mmcu=atmega48p:crtm48p.o%s} \
%{mmcu=atmega88:crtm88.o%s} \
+%{mmcu=atmega88p:crtm88p.o%s} \
%{mmcu=atmega8515:crtm8515.o%s} \
%{mmcu=atmega8535:crtm8535.o%s} \
%{mmcu=at90pwm1:crt90pwm1.o%s} \
%{mmcu=at90pwm2:crt90pwm2.o%s} \
+%{mmcu=at90pwm2b:crt90pwm2b.o%s} \
%{mmcu=atmega48p:crtm48p.o%s} \
@@ -937,6 +960,7 @@
%{mmcu=at90pwm2b:crt90pwm2b.o%s} \
%{mmcu=at90pwm3:crt90pwm3.o%s} \
+%{mmcu=at90pwm3b:crt90pwm3b.o%s} \
%{mmcu=at90pwm3b:crt90pwm3b.o%s} \
+%{mmcu=at90pwm81:crt90pwm81.o%s} \
%{mmcu=atmega16:crtm16.o%s} \
%{mmcu=atmega161|mmcu=avr5:crtm161.o%s} \
%{mmcu=atmega162:crtm162.o%s} \
@@ -860,6 +881,7 @@
%{mmcu=atmega165:crtm165.o%s} \
%{mmcu=atmega165p:crtm165p.o%s} \
%{mmcu=atmega168:crtm168.o%s} \
+%{mmcu=atmega168p:crtm168p.o%s} \
%{mmcu=atmega169:crtm169.o%s} \
%{mmcu=atmega169p:crtm169p.o%s} \
%{mmcu=atmega32:crtm32.o%s} \
@@ -869,10 +891,12 @@
%{mmcu=atmega325p:crtm325p.o%s} \
%{mmcu=atmega3250:crtm3250.o%s} \
%{mmcu=atmega3250p:crtm3250p.o%s} \
+%{mmcu=atmega328p:crtm328p.o%s} \
%{mmcu=atmega329:crtm329.o%s} \
%{mmcu=atmega329p:crtm329p.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} \
@@ -885,11 +909,14 @@
%{mmcu=atmega128:crtm128.o%s} \
@@ -976,6 +1000,15 @@
%{mmcu=at90can64:crtcan64.o%s} \
%{mmcu=at90pwm216:crt90pwm216.o%s} \
%{mmcu=at90pwm316:crt90pwm316.o%s} \
+%{mmcu=atmega32c1:crtm32c1.o%s} \
+%{mmcu=atmega64c1:crtm64c1.o%s} \
+%{mmcu=atmega16m1:crtm16m1.o%s} \
+%{mmcu=atmega32m1:crtm32m1.o%s} \
+%{mmcu=atmega64m1:crtm64m1.o%s} \
+%{mmcu=atmega16u4:crtm16u4.o%s} \
+%{mmcu=atmega32u4:crtm32u4.o%s} \
+%{mmcu=atmega32u6:crtm32u6.o%s} \
+%{mmcu=at90scr100:crt90scr100.o%s} \
%{mmcu=at90usb646:crtusb646.o%s} \
%{mmcu=at90usb647:crtusb647.o%s} \
%{mmcu=at94k:crtat94k.o%s} \
@@ -983,11 +1016,15 @@
%{mmcu=atmega1280:crtm1280.o%s} \
%{mmcu=atmega1281:crtm1281.o%s} \
+%{mmcu=atmega1284p:crtm1284p.o%s} \
%{mmcu=atmega8hva:crtm8hva.o%s} \
%{mmcu=atmega16hva:crtm16hva.o%s} \
%{mmcu=at90can32:crtcan32.o%s} \
%{mmcu=at90can64:crtcan64.o%s} \
%{mmcu=atmega1284p:crtm1284p.o%s} \
-%{mmcu=atmega2560:crtm2560.o%s} \
-%{mmcu=atmega2561:crtm2561.o%s} \
%{mmcu=at90can128:crtcan128.o%s} \
+%{mmcu=at90pwm216:crt90pwm216.o%s} \
+%{mmcu=at90pwm316:crt90pwm316.o%s} \
%{mmcu=at90usb82:crtusb82.o%s} \
%{mmcu=at90usb162:crtusb162.o%s} \
%{mmcu=at90usb646:crtusb646.o%s} \
+%{mmcu=atmega128rfa1:crtm128rfa1.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}"
#define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS},

View File

@ -1,222 +0,0 @@
Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c (revision 129730)
+++ gcc/config/avr/avr.c (working copy)
@@ -48,6 +48,8 @@
#define MAX_LD_OFFSET(MODE) (64 - (signed)GET_MODE_SIZE (MODE))
static int avr_naked_function_p (tree);
+static int avr_OS_main_function_p (tree);
+static int avr_OS_task_function_p (tree);
static int interrupt_function_p (tree);
static int signal_function_p (tree);
static int avr_regs_to_save (HARD_REG_SET *);
@@ -400,6 +402,33 @@
return a != NULL_TREE;
}
+/* Return nonzero if FUNC is a OS_main function. */
+
+static int
+avr_OS_main_function_p (tree func)
+{
+ tree a;
+
+ gcc_assert (TREE_CODE (func) == FUNCTION_DECL);
+
+ a = lookup_attribute ("OS_main", TYPE_ATTRIBUTES (TREE_TYPE (func)));
+ return a != NULL_TREE;
+}
+
+/* Return nonzero if FUNC is a OS_task function. */
+
+static int
+avr_OS_task_function_p (tree func)
+{
+ tree a;
+
+ gcc_assert (TREE_CODE (func) == FUNCTION_DECL);
+
+ a = lookup_attribute ("OS_task", TYPE_ATTRIBUTES (TREE_TYPE (func)));
+ return a != NULL_TREE;
+}
+
+
/* Return nonzero if FUNC is an interrupt function as specified
by the "interrupt" attribute. */
@@ -445,8 +474,11 @@
CLEAR_HARD_REG_SET (*set);
count = 0;
- /* No need to save any registers if the function never returns. */
- if (TREE_THIS_VOLATILE (current_function_decl))
+ /* No need to save any registers if the function never returns or
+ is have "OS_main" or OS_task attribute. */
+ if (TREE_THIS_VOLATILE (current_function_decl)
+ || avr_OS_main_function_p (current_function_decl)
+ || avr_OS_task_function_p (current_function_decl))
return 0;
for (reg = 0; reg < 32; reg++)
@@ -497,7 +529,6 @@
&& ! interrupt_function_p (current_function_decl)
&& ! signal_function_p (current_function_decl)
&& ! avr_naked_function_p (current_function_decl)
- && ! MAIN_NAME_P (DECL_NAME (current_function_decl))
&& ! TREE_THIS_VOLATILE (current_function_decl));
}
@@ -666,7 +697,8 @@
int reg;
int interrupt_func_p;
int signal_func_p;
- int main_p;
+ int OS_main_p;
+ int OS_task_p;
int live_seq;
int minimize;
@@ -684,9 +716,11 @@
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));
+ OS_main_p = avr_OS_main_function_p (current_function_decl);
+ OS_task_p = avr_OS_task_function_p (current_function_decl);
live_seq = sequent_regs_live ();
minimize = (TARGET_CALL_PROLOGUES
+ && !OS_main_p && !OS_task_p
&& !interrupt_func_p && !signal_func_p && live_seq);
if (interrupt_func_p)
@@ -704,19 +738,8 @@
AS1 (clr,__zero_reg__) "\n");
prologue_size += 5;
}
- if (main_p)
+ if (minimize && (frame_pointer_needed || live_seq > 6))
{
- 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))
- {
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);
@@ -754,12 +777,17 @@
}
if (frame_pointer_needed)
{
+ if (!OS_main_p && !OS_task_p)
+ {
+ fprintf (file, "\t"
+ AS1 (push,r28) CR_TAB
+ AS1 (push,r29) "\n");
+ prologue_size += 2;
+ }
fprintf (file, "\t"
- AS1 (push,r28) CR_TAB
- AS1 (push,r29) CR_TAB
AS2 (in,r28,__SP_L__) CR_TAB
AS2 (in,r29,__SP_H__) "\n");
- prologue_size += 4;
+ prologue_size += 2;
if (size)
{
fputs ("\t", file);
@@ -769,7 +797,7 @@
{
prologue_size += out_set_stack_ptr (file, 1, 1);
}
- else if (signal_func_p)
+ else if (signal_func_p || OS_main_p)
{
prologue_size += out_set_stack_ptr (file, 0, 0);
}
@@ -793,7 +821,8 @@
int reg;
int interrupt_func_p;
int signal_func_p;
- int main_p;
+ int OS_main_p;
+ int OS_task_p;
int function_size;
int live_seq;
int minimize;
@@ -825,28 +854,15 @@
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));
+ OS_main_p = avr_OS_main_function_p (current_function_decl);
+ OS_task_p = avr_OS_task_function_p (current_function_decl);
live_seq = sequent_regs_live ();
minimize = (TARGET_CALL_PROLOGUES
+ && !OS_main_p && !OS_task_p
&& !interrupt_func_p && !signal_func_p && live_seq);
- if (main_p)
+ if (minimize && (frame_pointer_needed || live_seq > 4))
{
- /* 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))
- {
fprintf (file, ("\t" AS2 (ldi, r30, %d) CR_TAB), live_seq);
++epilogue_size;
if (frame_pointer_needed)
@@ -893,10 +909,13 @@
epilogue_size += out_set_stack_ptr (file, -1, -1);
}
}
- fprintf (file, "\t"
- AS1 (pop,r29) CR_TAB
- AS1 (pop,r28) "\n");
- epilogue_size += 2;
+ if (!OS_main_p && !OS_task_p)
+ {
+ fprintf (file, "\t"
+ AS1 (pop,r29) CR_TAB
+ AS1 (pop,r28) "\n");
+ epilogue_size += 2;
+ }
}
epilogue_size += avr_regs_to_save (&set);
@@ -4643,6 +4662,8 @@
interrupt - make a function to be hardware interrupt. After function
prologue interrupts are enabled;
naked - don't generate function prologue/epilogue and `ret' command.
+ OS_main - ...
+ OS_task - ...
Only `progmem' attribute valid for type. */
@@ -4653,6 +4674,8 @@
{ "signal", 0, 0, true, false, false, avr_handle_fndecl_attribute },
{ "interrupt", 0, 0, true, false, false, avr_handle_fndecl_attribute },
{ "naked", 0, 0, false, true, true, avr_handle_fntype_attribute },
+ { "OS_main", 0, 0, false, true, true, avr_handle_fntype_attribute },
+ { "OS_task", 0, 0, false, true, true, avr_handle_fntype_attribute },
{ NULL, 0, 0, false, false, false, NULL }
};

View File

@ -0,0 +1,812 @@
--- gcc/config/avr/avr.md.orig 2008-06-08 10:24:28.171355800 -0600
+++ gcc/config/avr/avr.md 2008-06-08 10:29:58.610141800 -0600
@@ -47,9 +47,6 @@
(TMP_REGNO 0) ; temporary register r0
(ZERO_REGNO 1) ; zero register r1
- (SREG_ADDR 0x5F)
- (RAMPZ_ADDR 0x5B)
-
(UNSPEC_STRLEN 0)
(UNSPEC_INDEX_JMP 1)
(UNSPEC_SEI 2)
@@ -2681,7 +2678,8 @@
"(optimize > 0)"
{
operands[2] = GEN_INT (exact_log2 (~INTVAL (operands[1]) & 0xff));
- return AS2 (cbi,%0-0x20,%2);
+ operands[3] = GEN_INT(AVR_IO_OFFSET);
+ return AS2 (cbi,%0-%3,%2);
}
[(set_attr "length" "1")
(set_attr "cc" "none")])
@@ -2693,7 +2691,8 @@
"(optimize > 0)"
{
operands[2] = GEN_INT (exact_log2 (INTVAL (operands[1]) & 0xff));
- return AS2 (sbi,%0-0x20,%2);
+ operands[3] = GEN_INT(AVR_IO_OFFSET);
+ return AS2 (sbi,%0-%3,%2);
}
[(set_attr "length" "1")
(set_attr "cc" "none")])
Index: gcc/config/avr/predicates.md
===================================================================
--- gcc/config/avr/predicates.md (revision 132445)
+++ gcc/config/avr/predicates.md (working copy)
@@ -45,12 +45,16 @@
;; Return true if OP is a valid address for lower half of I/O space.
(define_predicate "low_io_address_operand"
(and (match_code "const_int")
- (match_test "IN_RANGE((INTVAL (op)), 0x20, 0x3F)")))
+ (if_then_else (match_test "AVR_XMEGA")
+ (match_test "IN_RANGE((INTVAL (op)), 0x00, 0x1F)")
+ (match_test "IN_RANGE((INTVAL (op)), 0x20, 0x3F)"))))
;; Return true if OP is a valid address for high half of I/O space.
(define_predicate "high_io_address_operand"
(and (match_code "const_int")
- (match_test "IN_RANGE((INTVAL (op)), 0x40, 0x5F)")))
+ (if_then_else (match_test "AVR_XMEGA")
+ (match_test "IN_RANGE((INTVAL (op)), 0x20, 0x3F)")
+ (match_test "IN_RANGE((INTVAL (op)), 0x40, 0x5F)"))))
;; Return 1 if OP is the zero constant for MODE.
(define_predicate "const0_operand"
--- gcc/config/avr/t-avr.orig 2008-02-19 17:25:31.546827500 -0700
+++ gcc/config/avr/t-avr 2008-02-20 09:22:51.709554900 -0700
@@ -37,8 +37,8 @@ fp-bit.c: $(srcdir)/config/fp-bit.c $(sr
FPBIT = fp-bit.c
-MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6
-MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6
+MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6/mmcu=avrxmega4/mmcu=avrxmega5/mmcu=avrxmega6/mmcu=avrxmega7
+MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega4 avrxmega5 avrxmega6 avrxmega7
# The many avr2 matches are not listed here - this is the default.
MULTILIB_MATCHES = \
@@ -125,7 +125,13 @@ MULTILIB_MATCHES = \
mmcu?avr51=mmcu?at90usb1286 \
mmcu?avr51=mmcu?at90usb1287 \
mmcu?avr6=mmcu?atmega2560 \
- mmcu?avr6=mmcu?atmega2561
+ mmcu?avr6=mmcu?atmega2561 \
+ mmcu?avrxmega4=mmcu?atxmega64a3 \
+ mmcu?avrxmega5=mmcu?atxmega64a1 \
+ mmcu?avrxmega6=mmcu?atxmega128a3 \
+ mmcu?avrxmega6=mmcu?atxmega256a3 \
+ mmcu?avrxmega6=mmcu?atxmega256a3b \
+ mmcu?avrxmega7=mmcu?atxmega128a1
MULTILIB_EXCEPTIONS =
--- gcc/config/avr/avr.h.orig 2009-01-26 17:47:48.000000000 +0100
+++ gcc/config/avr/avr.h 2009-01-26 17:56:22.000000000 +0100
@@ -44,8 +44,11 @@
/* 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 @@
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) \
@@ -88,6 +98,17 @@
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)
@@ -107,10 +128,19 @@
#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 (!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 ()
@@ -848,6 +878,11 @@
mmcu=m3000*|\
mmcu=m3001*: -m avr5}\
%{mmcu=atmega256*:-m avr6}\
+%{mmcu=atxmega64a3:-m avrxmega4} \
+%{mmcu=atxmega64a1:-m avrxmega5} \
+%{mmcu=atxmega128a3| \
+ mmcu=atxmega256a3*:-m avrxmega6} \
+%{mmcu=atxmega128a1:-m avrxmega7} \
%{mmcu=atmega324*|\
mmcu=atmega325*|\
mmcu=atmega328p|\
@@ -1024,7 +1059,13 @@
%{mmcu=m3000s:crtm3000s.o%s} \
%{mmcu=m3001b:crtm3001b.o%s} \
%{mmcu=atmega2560|mmcu=avr6:crtm2560.o%s} \
-%{mmcu=atmega2561:crtm2561.o%s}"
+%{mmcu=atmega2561:crtm2561.o%s} \
+%{mmcu=atxmega4|mmcu=atxmega64a3:crtx64a3.o%s} \
+%{mmcu=atxmega5|mmcu=atxmega64a1:crtx64a1.o%s} \
+%{mmcu=atxmega6|mmcu=atxmega128a3:crtx128a3.o%s} \
+%{mmcu=atxmega256a3:crtx256a3.o%s} \
+%{mmcu=atxmega256a3b:crtx256a3b.o%s} \
+%{mmcu=atxmega7|mmcu=atxmega128a1:crtx128a1.o%s}"
#define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS},
@@ -1086,8 +1127,12 @@
/* '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;
};
--- gcc/config/avr/avr.c.orig 2009-01-26 17:44:48.000000000 +0100
+++ gcc/config/avr/avr.c 2009-01-26 17:54:54.000000000 +0100
@@ -51,6 +51,7 @@
static int avr_naked_function_p (tree);
static int interrupt_function_p (tree);
static int signal_function_p (tree);
+static int nmi_function_p (tree);
static int avr_OS_task_function_p (tree);
static int avr_regs_to_save (HARD_REG_SET *);
static int sequent_regs_live (void);
@@ -118,17 +119,24 @@
int avr_have_movw_lpmx_p = 0;
static const struct base_arch_s avr_arch_types[] = {
- { 1, 0, 0, 0, 0, 0, 0, 0, NULL }, /* unknown device specified */
- { 1, 0, 0, 0, 0, 0, 0, 0, "__AVR_ARCH__=1" },
- { 0, 0, 0, 0, 0, 0, 0, 0, "__AVR_ARCH__=2" },
- { 0, 0, 0, 1, 0, 0, 0, 0, "__AVR_ARCH__=25" },
- { 0, 0, 1, 0, 0, 0, 0, 0, "__AVR_ARCH__=3" },
- { 0, 0, 1, 0, 1, 0, 0, 0, "__AVR_ARCH__=31" },
- { 0, 0, 1, 1, 0, 0, 0, 0, "__AVR_ARCH__=35" },
- { 0, 1, 0, 1, 0, 0, 0, 0, "__AVR_ARCH__=4" },
- { 0, 1, 1, 1, 0, 0, 0, 0, "__AVR_ARCH__=5" },
- { 0, 1, 1, 1, 1, 1, 0, 0, "__AVR_ARCH__=51" },
- { 0, 1, 1, 1, 1, 1, 1, 0, "__AVR_ARCH__=6" }
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, NULL }, /* Unknown device specified. */
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, "__AVR_ARCH__=1" },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, "__AVR_ARCH__=2" },
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, "__AVR_ARCH__=25" },
+ { 0, 0, 1, 0, 0, 0, 0, 0, 0, "__AVR_ARCH__=3" },
+ { 0, 0, 1, 0, 1, 0, 0, 0, 0, "__AVR_ARCH__=31" },
+ { 0, 0, 1, 1, 0, 0, 0, 0, 0, "__AVR_ARCH__=35" },
+ { 0, 1, 0, 1, 0, 0, 0, 0, 0, "__AVR_ARCH__=4" },
+ { 0, 1, 1, 1, 0, 0, 0, 0, 0, "__AVR_ARCH__=5" },
+ { 0, 1, 1, 1, 1, 1, 0, 0, 0, "__AVR_ARCH__=51" },
+ { 0, 1, 1, 1, 1, 1, 1, 0, 0, "__AVR_ARCH__=6" },
+ { 0, 1, 0, 1, 0, 0, 0, 1, 0, "__AVR_ARCH__=101" },
+ { 0, 1, 1, 1, 0, 0, 0, 1, 0, "__AVR_ARCH__=102" },
+ { 0, 1, 1, 1, 0, 0, 0, 1, 1, "__AVR_ARCH__=103" },
+ { 0, 1, 1, 1, 1, 1, 0, 1, 0, "__AVR_ARCH__=104" },
+ { 0, 1, 1, 1, 1, 1, 0, 1, 1, "__AVR_ARCH__=105" },
+ { 0, 1, 1, 1, 1, 1, 1, 1, 0, "__AVR_ARCH__=106" },
+ { 0, 1, 1, 1, 1, 1, 1, 1, 1, "__AVR_ARCH__=107" }
};
/* These names are used as the index into the avr_arch_types[] table
@@ -146,7 +154,14 @@
ARCH_AVR4,
ARCH_AVR5,
ARCH_AVR51,
- ARCH_AVR6
+ ARCH_AVR6,
+ ARCH_AVRXMEGA1,
+ ARCH_AVRXMEGA2,
+ ARCH_AVRXMEGA3,
+ ARCH_AVRXMEGA4,
+ ARCH_AVRXMEGA5,
+ ARCH_AVRXMEGA6,
+ ARCH_AVRXMEGA7
};
struct mcu_type_s {
@@ -297,6 +312,24 @@
{ "avr6", ARCH_AVR6, NULL },
{ "atmega2560", ARCH_AVR6, "__AVR_ATmega2560__" },
{ "atmega2561", ARCH_AVR6, "__AVR_ATmega2561__" },
+ /* Enhanced, == 256K. */
+ /* Xmega, <= 8K FLASH. */
+ /* Xmega, > 8K, <= 64K FLASH, <= 64K RAM. */
+ /* Xmega, > 8K, <= 64K FLASH, > 64K RAM. */
+ /* Xmega, > 64K, <= 128K FLASH, <= 64K RAM. */
+ { "avrxmega4", ARCH_AVRXMEGA4, NULL },
+ { "atxmega64a3", ARCH_AVRXMEGA4, "__AVR_ATxmega64A3__" },
+ /* Xmega, > 64K, <= 128K FLASH, > 64K RAM. */
+ { "avrxmega5", ARCH_AVRXMEGA5, NULL },
+ { "atxmega64a1", ARCH_AVRXMEGA5, "__AVR_ATxmega64A1__" },
+ /* Xmega, > 128K, <= 256K FLASH, <= 64K RAM. */
+ { "avrxmega6", ARCH_AVRXMEGA6, NULL },
+ { "atxmega128a3", ARCH_AVRXMEGA6, "__AVR_ATxmega128A3__" },
+ { "atxmega256a3", ARCH_AVRXMEGA6, "__AVR_ATxmega256A3__" },
+ { "atxmega256a3b",ARCH_AVRXMEGA6, "__AVR_ATxmega256A3B__" },
+ /* Xmega, > 128K, <= 256K FLASH, > 64K RAM. */
+ { "avrxmega7", ARCH_AVRXMEGA7, NULL },
+ { "atxmega128a1", ARCH_AVRXMEGA7, "__AVR_ATxmega128A1__" },
/* Assembler only. */
{ "avr1", ARCH_AVR1, NULL },
{ "at90s1200", ARCH_AVR1, "__AVR_AT90S1200__" },
@@ -470,6 +503,21 @@
return a != NULL_TREE;
}
+/* Return nonzero if FUNC is a nmi function as specified
+ by the "nmi" attribute. */
+
+static int
+nmi_function_p (tree func)
+{
+ tree a;
+
+ if (TREE_CODE (func) != FUNCTION_DECL)
+ return 0;
+
+ a = lookup_attribute ("nmi", DECL_ATTRIBUTES (func));
+ return a != NULL_TREE;
+}
+
/* Return nonzero if FUNC is a OS_task function. */
static int
@@ -629,6 +677,7 @@
cfun->machine->is_naked = avr_naked_function_p (current_function_decl);
cfun->machine->is_interrupt = interrupt_function_p (current_function_decl);
cfun->machine->is_signal = signal_function_p (current_function_decl);
+ cfun->machine->is_nmi = nmi_function_p (current_function_decl);
cfun->machine->is_OS_task = avr_OS_task_function_p (current_function_decl);
/* Prologue: naked. */
@@ -664,17 +713,48 @@
/* Push SREG. */
insn = emit_move_insn (tmp_reg_rtx,
- gen_rtx_MEM (QImode, GEN_INT (SREG_ADDR)));
+ gen_rtx_MEM (QImode, GEN_INT (AVR_SREG_ADDR)));
RTX_FRAME_RELATED_P (insn) = 1;
insn = emit_move_insn (pushbyte, tmp_reg_rtx);
RTX_FRAME_RELATED_P (insn) = 1;
+ /* Push RAMPD, RAMPX, RAMPY. */
+ if (AVR_HAVE_RAMPX_Y_D)
+ {
+ /* Push RAMPD. */
+ insn = emit_move_insn (tmp_reg_rtx,
+ gen_rtx_MEM (QImode, GEN_INT (AVR_RAMPD_ADDR)));
+ RTX_FRAME_RELATED_P (insn) = 1;
+ insn = emit_move_insn (pushbyte, tmp_reg_rtx);
+ RTX_FRAME_RELATED_P (insn) = 1;
+
+ /* Push RAMPX. */
+ if (TEST_HARD_REG_BIT (set, REG_X) && TEST_HARD_REG_BIT (set, REG_X + 1))
+ {
+ insn = emit_move_insn (tmp_reg_rtx,
+ gen_rtx_MEM (QImode, GEN_INT (AVR_RAMPX_ADDR)));
+ RTX_FRAME_RELATED_P (insn) = 1;
+ insn = emit_move_insn (pushbyte, tmp_reg_rtx);
+ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+
+ /* Push RAMPY. */
+ if (TEST_HARD_REG_BIT (set, REG_Y) && TEST_HARD_REG_BIT (set, REG_Y + 1))
+ {
+ insn = emit_move_insn (tmp_reg_rtx,
+ gen_rtx_MEM (QImode, GEN_INT (AVR_RAMPY_ADDR)));
+ RTX_FRAME_RELATED_P (insn) = 1;
+ insn = emit_move_insn (pushbyte, tmp_reg_rtx);
+ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ }
+
/* Push RAMPZ. */
if(AVR_HAVE_RAMPZ
&& (TEST_HARD_REG_BIT (set, REG_Z) && TEST_HARD_REG_BIT (set, REG_Z + 1)))
{
insn = emit_move_insn (tmp_reg_rtx,
- gen_rtx_MEM (QImode, GEN_INT (RAMPZ_ADDR)));
+ gen_rtx_MEM (QImode, GEN_INT (AVR_RAMPZ_ADDR)));
RTX_FRAME_RELATED_P (insn) = 1;
insn = emit_move_insn (pushbyte, tmp_reg_rtx);
RTX_FRAME_RELATED_P (insn) = 1;
@@ -949,14 +1029,39 @@
&& (TEST_HARD_REG_BIT (set, REG_Z) && TEST_HARD_REG_BIT (set, REG_Z + 1)))
{
emit_insn (gen_popqi (tmp_reg_rtx));
- emit_move_insn (gen_rtx_MEM(QImode, GEN_INT(RAMPZ_ADDR)),
+ emit_move_insn (gen_rtx_MEM(QImode, GEN_INT(AVR_RAMPZ_ADDR)),
tmp_reg_rtx);
}
+ /* Restore RAMPY, RAMPX, RAMPD using tmp reg as scratch. */
+ if (AVR_HAVE_RAMPX_Y_D)
+ {
+ /* Pop RAMPY. */
+ if (TEST_HARD_REG_BIT (set, REG_Y) && TEST_HARD_REG_BIT (set, REG_Y + 1))
+ {
+ emit_insn (gen_popqi (tmp_reg_rtx));
+ emit_move_insn (gen_rtx_MEM (QImode, GEN_INT (AVR_RAMPY_ADDR)),
+ tmp_reg_rtx);
+ }
+
+ /* Pop RAMPX. */
+ if (TEST_HARD_REG_BIT (set, REG_X) && TEST_HARD_REG_BIT (set, REG_X + 1))
+ {
+ emit_insn (gen_popqi (tmp_reg_rtx));
+ emit_move_insn (gen_rtx_MEM (QImode, GEN_INT (AVR_RAMPX_ADDR)),
+ tmp_reg_rtx);
+ }
+
+ /* Pop RAMPD. */
+ emit_insn (gen_popqi (tmp_reg_rtx));
+ emit_move_insn (gen_rtx_MEM (QImode, GEN_INT (AVR_RAMPD_ADDR)),
+ tmp_reg_rtx);
+ }
+
/* Restore SREG using tmp reg as scratch. */
emit_insn (gen_popqi (tmp_reg_rtx));
- emit_move_insn (gen_rtx_MEM(QImode, GEN_INT(SREG_ADDR)),
+ emit_move_insn (gen_rtx_MEM(QImode, GEN_INT(AVR_SREG_ADDR)),
tmp_reg_rtx);
/* Restore tmp REG. */
@@ -1725,8 +1830,9 @@
}
/* Use simple load of stack pointer if no interrupts are used
or inside main or signal function prologue where they disabled. */
- else if (TARGET_NO_INTERRUPTS
- || (reload_completed
+ else if (TARGET_NO_INTERRUPTS
+ || (!AVR_XMEGA
+ && reload_completed
&& cfun->machine->is_signal
&& prologue_epilogue_contains (insn)))
{
@@ -1735,7 +1841,8 @@
AS2 (out,__SP_L__,%A1));
}
/* In interrupt prolog we know interrupts are enabled. */
- else if (reload_completed
+ else if (!AVR_XMEGA
+ && reload_completed
&& cfun->machine->is_interrupt
&& prologue_epilogue_contains (insn))
{
@@ -1745,12 +1852,25 @@
"sei" CR_TAB
AS2 (out,__SP_L__,%A1));
}
- *l = 5;
- return (AS2 (in,__tmp_reg__,__SREG__) CR_TAB
- "cli" CR_TAB
- AS2 (out,__SP_H__,%B1) CR_TAB
- AS2 (out,__SREG__,__tmp_reg__) CR_TAB
- AS2 (out,__SP_L__,%A1));
+ if(AVR_XMEGA)
+ {
+ *l = 6;
+ return (AS2 (mov,__tmp_reg__,r24) CR_TAB
+ AS2 (ldi,r24,0xD8) CR_TAB
+ AS2 (out,__CCP__,r24) CR_TAB
+ AS2 (out,__SP_H__,%B1) CR_TAB
+ AS2 (out,__SP_L__,%A1) CR_TAB
+ AS2 (mov,r24,__tmp_reg__));
+ }
+ else
+ {
+ *l = 5;
+ return (AS2 (in,__tmp_reg__,__SREG__) CR_TAB
+ "cli" CR_TAB
+ AS2 (out,__SP_H__,%B1) CR_TAB
+ AS2 (out,__SREG__,__tmp_reg__) CR_TAB
+ AS2 (out,__SP_L__,%A1));
+ }
}
else if (test_hard_reg_class (STACK_REG, src))
{
@@ -1885,7 +2005,7 @@
if (CONSTANT_ADDRESS_P (x))
{
- if (CONST_INT_P (x) && INTVAL (x) == SREG_ADDR)
+ if (CONST_INT_P (x) && INTVAL (x) == AVR_SREG_ADDR)
{
*l = 1;
return AS2 (in,%0,__SREG__);
@@ -1893,7 +2013,8 @@
if (avr_io_address_p (x, 1))
{
*l = 1;
- return AS2 (in,%0,%1-0x20);
+ op[2] = GEN_INT(AVR_IO_OFFSET);
+ return AS2 (in,%0,%1-%2);
}
*l = 2;
return AS2 (lds,%0,%1);
@@ -2081,8 +2202,9 @@
if (avr_io_address_p (base, 2))
{
*l = 2;
- return (AS2 (in,%A0,%A1-0x20) CR_TAB
- AS2 (in,%B0,%B1-0x20));
+ op[2] = GEN_INT(AVR_IO_OFFSET);
+ return (AS2 (in,%A0,%A1-%2) CR_TAB
+ AS2 (in,%B0,%B1-%2));
}
*l = 4;
return (AS2 (lds,%A0,%A1) CR_TAB
@@ -2573,7 +2695,7 @@
if (CONSTANT_ADDRESS_P (x))
{
- if (CONST_INT_P (x) && INTVAL (x) == SREG_ADDR)
+ if (CONST_INT_P (x) && INTVAL (x) == AVR_SREG_ADDR)
{
*l = 1;
return AS2 (out,__SREG__,%1);
@@ -2581,7 +2703,8 @@
if (avr_io_address_p (x, 1))
{
*l = 1;
- return AS2 (out,%0-0x20,%1);
+ op[2] = GEN_INT(AVR_IO_OFFSET);
+ return AS2 (out,%0-%2,%1);
}
*l = 2;
return AS2 (sts,%0,%1);
@@ -2660,11 +2783,20 @@
if (avr_io_address_p (base, 2))
{
*l = 2;
- return (AS2 (out,%B0-0x20,%B1) CR_TAB
- AS2 (out,%A0-0x20,%A1));
+ op[2] = GEN_INT(AVR_IO_OFFSET);
+ if (AVR_XMEGA)
+ return (AS2 (out,%A0-%2,%B1) CR_TAB
+ AS2 (out,%B0-%2,%A1));
+ else
+ return (AS2 (out,%B0-%2,%B1) CR_TAB
+ AS2 (out,%A0-%2,%A1));
}
- return *l = 4, (AS2 (sts,%B0,%B1) CR_TAB
- AS2 (sts,%A0,%A1));
+ if (AVR_XMEGA)
+ return *l = 4, (AS2 (sts,%A0,%A1) CR_TAB
+ AS2 (sts,%B0,%B1));
+ else
+ return *l = 4, (AS2 (sts,%B0,%B1) CR_TAB
+ AS2 (sts,%A0,%A1));
}
if (reg_base > 0)
{
@@ -2679,11 +2811,20 @@
AS2 (adiw,r26,1) CR_TAB
AS2 (st,X,__tmp_reg__));
else
- return *l=5, (AS2 (mov,__tmp_reg__,r27) CR_TAB
- AS2 (adiw,r26,1) CR_TAB
- AS2 (st,X,__tmp_reg__) CR_TAB
- AS2 (sbiw,r26,1) CR_TAB
- AS2 (st,X,r26));
+ {
+ if (!AVR_XMEGA)
+ return *l=5, (AS2 (mov,__tmp_reg__,r27) CR_TAB
+ AS2 (adiw,r26,1) CR_TAB
+ AS2 (st,X,__tmp_reg__) CR_TAB
+ AS2 (sbiw,r26,1) CR_TAB
+ AS2 (st,X,r26));
+ else
+ return *l=5, (AS2 (mov,__tmp_reg__,r27) CR_TAB
+ AS2 (st,X,r26) CR_TAB
+ AS2 (adiw,r26,1) CR_TAB
+ AS2 (st,X,__tmp_reg__) CR_TAB
+ AS2 (sbiw,r26,1));
+ }
}
else
{
@@ -2691,14 +2832,27 @@
return *l=2, (AS2 (st,X+,%A1) CR_TAB
AS2 (st,X,%B1));
else
- return *l=3, (AS2 (adiw,r26,1) CR_TAB
- AS2 (st,X,%B1) CR_TAB
- AS2 (st,-X,%A1));
+ {
+ if (!AVR_XMEGA)
+ return *l=3, (AS2 (adiw,r26,1) CR_TAB
+ AS2 (st,X,%B1) CR_TAB
+ AS2 (st,-X,%A1));
+ else
+ return *l=3, (AS2 (st,X+,%A1) CR_TAB
+ AS2 (st,X,%B1) CR_TAB
+ AS2 (sbiw,r26,1));
+ }
}
}
else
- return *l=2, (AS2 (std,%0+1,%B1) CR_TAB
- AS2 (st,%0,%A1));
+ {
+ if (!AVR_XMEGA)
+ return *l=2, (AS2 (std,%0+1,%B1) CR_TAB
+ AS2 (st,%0,%A1));
+ else
+ return *l=2, (AS2 (st,%0,%A1) CR_TAB
+ AS2 (std,%0+1,%B1));
+ }
}
else if (GET_CODE (base) == PLUS)
{
@@ -2709,48 +2863,104 @@
if (reg_base != REG_Y)
fatal_insn ("incorrect insn:",insn);
- if (disp <= 63 + MAX_LD_OFFSET (GET_MODE (dest)))
- return *l = 4, (AS2 (adiw,r28,%o0-62) CR_TAB
- AS2 (std,Y+63,%B1) CR_TAB
- AS2 (std,Y+62,%A1) CR_TAB
- AS2 (sbiw,r28,%o0-62));
-
- return *l = 6, (AS2 (subi,r28,lo8(-%o0)) CR_TAB
- AS2 (sbci,r29,hi8(-%o0)) CR_TAB
- AS2 (std,Y+1,%B1) CR_TAB
- AS2 (st,Y,%A1) CR_TAB
- AS2 (subi,r28,lo8(%o0)) CR_TAB
- AS2 (sbci,r29,hi8(%o0)));
+ if (!AVR_XMEGA)
+ {
+ if (disp <= 63 + MAX_LD_OFFSET (GET_MODE (dest)))
+ return *l = 4, (AS2 (adiw,r28,%o0-62) CR_TAB
+ AS2 (std,Y+63,%B1) CR_TAB
+ AS2 (std,Y+62,%A1) CR_TAB
+ AS2 (sbiw,r28,%o0-62));
+
+ return *l = 6, (AS2 (subi,r28,lo8(-%o0)) CR_TAB
+ AS2 (sbci,r29,hi8(-%o0)) CR_TAB
+ AS2 (std,Y+1,%B1) CR_TAB
+ AS2 (st,Y,%A1) CR_TAB
+ AS2 (subi,r28,lo8(%o0)) CR_TAB
+ AS2 (sbci,r29,hi8(%o0)));
+ }
+ else
+ {
+ if (disp <= 63 + MAX_LD_OFFSET (GET_MODE (dest)))
+ return *l = 4, (AS2 (adiw,r28,%o0-62) CR_TAB
+ AS2 (std,Y+62,%A1) CR_TAB
+ AS2 (std,Y+63,%B1) CR_TAB
+ AS2 (sbiw,r28,%o0-62));
+
+ return *l = 6, (AS2 (subi,r28,lo8(-%o0)) CR_TAB
+ AS2 (sbci,r29,hi8(-%o0)) CR_TAB
+ AS2 (st,Y,%A1) CR_TAB
+ AS2 (std,Y+1,%B1) CR_TAB
+ AS2 (subi,r28,lo8(%o0)) CR_TAB
+ AS2 (sbci,r29,hi8(%o0)));
+ }
}
if (reg_base == REG_X)
{
/* (X + d) = R */
if (reg_src == REG_X)
{
- *l = 7;
- return (AS2 (mov,__tmp_reg__,r26) CR_TAB
- AS2 (mov,__zero_reg__,r27) CR_TAB
- AS2 (adiw,r26,%o0+1) CR_TAB
- AS2 (st,X,__zero_reg__) CR_TAB
- AS2 (st,-X,__tmp_reg__) CR_TAB
- AS1 (clr,__zero_reg__) CR_TAB
+ if (!AVR_XMEGA)
+ {
+ *l = 7;
+ return (AS2 (mov,__tmp_reg__,r26) CR_TAB
+ AS2 (mov,__zero_reg__,r27) CR_TAB
+ AS2 (adiw,r26,%o0+1) CR_TAB
+ AS2 (st,X,__zero_reg__) CR_TAB
+ AS2 (st,-X,__tmp_reg__) CR_TAB
+ AS1 (clr,__zero_reg__) CR_TAB
+ AS2 (sbiw,r26,%o0));
+ }
+ else
+ {
+ *l = 7;
+ return (AS2 (mov,__tmp_reg__,r26) CR_TAB
+ AS2 (mov,__zero_reg__,r27) CR_TAB
+ AS2 (adiw,r26,%o0) CR_TAB
+ AS2 (st,X+,__tmp_reg__) CR_TAB
+ AS2 (st,X,__zero_reg__) CR_TAB
+ AS1 (clr,__zero_reg__) CR_TAB
+ AS2 (sbiw,r26,%o0+1));
+ }
+ }
+ if (!AVR_XMEGA)
+ {
+ *l = 4;
+ return (AS2 (adiw,r26,%o0+1) CR_TAB
+ AS2 (st,X,%B1) CR_TAB
+ AS2 (st,-X,%A1) CR_TAB
AS2 (sbiw,r26,%o0));
}
- *l = 4;
- return (AS2 (adiw,r26,%o0+1) CR_TAB
- AS2 (st,X,%B1) CR_TAB
- AS2 (st,-X,%A1) CR_TAB
- AS2 (sbiw,r26,%o0));
+ else
+ {
+ *l = 4;
+ return (AS2 (adiw,r26,%o0) CR_TAB
+ AS2 (st,X+,%A1) CR_TAB
+ AS2 (st,X,%B1) CR_TAB
+ AS2 (sbiw,r26,%o0+1));
+ }
}
- return *l=2, (AS2 (std,%B0,%B1) CR_TAB
- AS2 (std,%A0,%A1));
+
+ if (!AVR_XMEGA)
+ return *l=2, (AS2 (std,%B0,%B1) CR_TAB
+ AS2 (std,%A0,%A1));
+ else
+ return *l=2, (AS2 (std,%A0,%A1) CR_TAB
+ AS2 (std,%B0,%B1));
}
else if (GET_CODE (base) == PRE_DEC) /* (--R) */
- return *l=2, (AS2 (st,%0,%B1) CR_TAB
- AS2 (st,%0,%A1));
+ {
+ if (mem_volatile_p && AVR_XMEGA)
+ return *l = 4, (AS2 (sbiw,%r0,1) CR_TAB
+ AS2 (st,%p0+,%A1) CR_TAB
+ AS2 (st,%p0,%B1) CR_TAB
+ AS2 (sbiw,%r0,2));
+ else
+ return *l=2, (AS2 (st,%0,%B1) CR_TAB
+ AS2 (st,%0,%A1));
+ }
else if (GET_CODE (base) == POST_INC) /* (R++) */
{
- if (mem_volatile_p)
+ if (mem_volatile_p && !AVR_XMEGA)
{
if (REGNO (XEXP (base, 0)) == REG_X)
{
@@ -2771,7 +2981,7 @@
*l = 2;
return (AS2 (st,%0,%A1) CR_TAB
- AS2 (st,%0,%B1));
+ AS2 (st,%0,%B1));
}
fatal_insn ("unknown move insn:",insn);
return "";
@@ -4651,6 +4861,7 @@
{ "progmem", 0, 0, false, false, false, avr_handle_progmem_attribute },
{ "signal", 0, 0, true, false, false, avr_handle_fndecl_attribute },
{ "interrupt", 0, 0, true, false, false, avr_handle_fndecl_attribute },
+ { "nmi", 0, 0, true, false, false, avr_handle_fndecl_attribute },
{ "naked", 0, 0, false, true, true, avr_handle_fntype_attribute },
{ "OS_task", 0, 0, false, true, true, avr_handle_fntype_attribute },
{ NULL, 0, 0, false, false, false, NULL }
@@ -4739,6 +4950,14 @@
func_name);
}
}
+ else if (strncmp (attr, "nmi", strlen ("nmi")) == 0)
+ {
+ if (strncmp (func_name, "__vector", strlen ("__vector")) != 0)
+ {
+ warning (0, "%qs appears to be a misspelled nmi handler",
+ func_name);
+ }
+ }
}
return NULL_TREE;
@@ -4864,7 +5083,8 @@
/* fprintf (asm_out_file, "\t.arch %s\n", avr_mcu_name);*/
fputs ("__SREG__ = 0x3f\n"
"__SP_H__ = 0x3e\n"
- "__SP_L__ = 0x3d\n", asm_out_file);
+ "__SP_L__ = 0x3d\n"
+ "__CCP__ = 0x34\n", asm_out_file);
fputs ("__tmp_reg__ = 0\n"
"__zero_reg__ = 1\n", asm_out_file);
@@ -5754,15 +5974,18 @@
return !(regno & 1);
}
-/* Returns 1 if X is a valid address for an I/O register of size SIZE
- (1 or 2). Used for lds/sts -> in/out optimization. Add 0x20 to SIZE
- to check for the lower half of I/O space (for cbi/sbi/sbic/sbis). */
+/* Returns 1 if X is a valid address for an I/O register of size SIZE
+ (1 or 2). Used for lds/sts -> in/out optimization. */
int
avr_io_address_p (rtx x, int size)
{
- return (optimize > 0 && GET_CODE (x) == CONST_INT
- && INTVAL (x) >= 0x20 && INTVAL (x) <= 0x60 - size);
+ if(AVR_XMEGA)
+ return (optimize > 0 && GET_CODE (x) == CONST_INT
+ && INTVAL (x) >= 0 && INTVAL (x) <= 0x40 - size);
+ else
+ return (optimize > 0 && GET_CODE (x) == CONST_INT
+ && INTVAL (x) >= 0x20 && INTVAL (x) <= 0x60 - size);
}
const char *
@@ -5940,16 +6163,17 @@
if (GET_CODE (operands[1]) == CONST_INT)
{
- if (INTVAL (operands[1]) < 0x40)
+ operands[4] = GEN_INT(AVR_IO_OFFSET); /* operands[3] is for the jump */
+ if (low_io_address_operand (operands[1], VOIDmode))
{
if (comp == EQ)
- output_asm_insn (AS2 (sbis,%1-0x20,%2), operands);
+ output_asm_insn (AS2 (sbis,%1-%4,%2), operands);
else
- output_asm_insn (AS2 (sbic,%1-0x20,%2), operands);
+ output_asm_insn (AS2 (sbic,%1-%4,%2), operands);
}
else
{
- output_asm_insn (AS2 (in,__tmp_reg__,%1-0x20), operands);
+ output_asm_insn (AS2 (in,__tmp_reg__,%1-%4), operands);
if (comp == EQ)
output_asm_insn (AS2 (sbrs,__tmp_reg__,%2), operands);
else

View File

@ -0,0 +1,195 @@
Not committed
Adds OS_main attribute feature.
Written by Anatoly Sokolov.
Apply patch after XMEGA patch.
--------------------------------------------------------------------------------
Index: gcc/function.c
===================================================================
--- gcc/function.c (revision 133747)
+++ gcc/function.c (working copy)
@@ -4756,6 +4756,14 @@
}
int
+prologue_contains (const_rtx insn)
+{
+ if (contains (insn, &prologue))
+ return 1;
+ return 0;
+}
+
+int
prologue_epilogue_contains (const_rtx insn)
{
if (contains (insn, &prologue))
Index: gcc/rtl.h
===================================================================
--- gcc/rtl.h (revision 133747)
+++ gcc/rtl.h (working copy)
@@ -2128,6 +2128,7 @@
/* In function.c */
extern void reposition_prologue_and_epilogue_notes (void);
+extern int prologue_contains (const_rtx);
extern int prologue_epilogue_contains (const_rtx);
extern int sibcall_epilogue_contains (const_rtx);
extern void mark_temp_addr_taken (rtx);
--- gcc/config/avr/avr.h.orig 2008-03-31 16:48:03.477537900 -0600
+++ gcc/config/avr/avr.h 2008-03-31 17:07:51.442457900 -0600
@@ -1095,4 +1095,8 @@ struct machine_function GTY(())
/* '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;
};
--- gcc/config/avr/avr.c.orig Mon Mar 31 19:47:54 2008
+++ gcc/config/avr/avr.c Mon Mar 31 20:50:08 2008
@@ -53,6 +53,7 @@ static int interrupt_function_p (tree);
static int signal_function_p (tree);
static int nmi_function_p (tree);
static int avr_OS_task_function_p (tree);
+static int avr_OS_main_function_p (tree);
static int avr_regs_to_save (HARD_REG_SET *);
static void avr_args (HARD_REG_SET *);
static int sequent_regs_live (HARD_REG_SET *);
@@ -509,6 +513,19 @@ avr_OS_task_function_p (tree func)
return a != NULL_TREE;
}
+/* Return nonzero if FUNC is a OS_main function. */
+
+static int
+avr_OS_main_function_p (tree func)
+{
+ tree a;
+
+ gcc_assert (TREE_CODE (func) == FUNCTION_DECL);
+
+ a = lookup_attribute ("OS_main", TYPE_ATTRIBUTES (TREE_TYPE (func)));
+ return a != NULL_TREE;
+}
+
/* Return the number of hard registers to push/pop in the prologue/epilogue
of the current function, and optionally store these registers in SET. */
@@ -527,9 +544,10 @@ avr_regs_to_save (HARD_REG_SET *set)
count = 0;
/* No need to save any registers if the function never returns or
- is have "OS_task" attribute. */
+ is have "OS_task" or "OS_main" attribute. */
if (TREE_THIS_VOLATILE (current_function_decl)
- || cfun->machine->is_OS_task)
+ || cfun->machine->is_OS_task
+ || cfun->machine->is_OS_main)
return 0;
for (reg = 0; reg < 32; reg++)
@@ -646,6 +664,8 @@ expand_prologue (void)
rtx pushword = gen_rtx_MEM (HImode,
gen_rtx_POST_DEC (HImode, stack_pointer_rtx));
rtx insn;
+ int method1_length;
+ int sp_plus_length;
last_insn_address = 0;
@@ -655,6 +675,7 @@ expand_prologue (void)
cfun->machine->is_signal = signal_function_p (current_function_decl);
cfun->machine->is_nmi = nmi_function_p (current_function_decl);
cfun->machine->is_OS_task = avr_OS_task_function_p (current_function_decl);
+ cfun->machine->is_OS_main = avr_OS_main_function_p (current_function_decl);
/* Prologue: naked. */
if (cfun->machine->is_naked)
@@ -669,6 +690,7 @@ expand_prologue (void)
&& !cfun->machine->is_interrupt
&& !cfun->machine->is_signal
&& !cfun->machine->is_OS_task
+ && !cfun->machine->is_OS_main
&& live_seq);
if (cfun->machine->is_interrupt || cfun->machine->is_signal)
@@ -738,7 +760,7 @@ expand_prologue (void)
}
if (frame_pointer_needed)
{
- if(!cfun->machine->is_OS_task)
+ if (!(cfun->machine->is_OS_task || cfun->machine->is_OS_main))
{
/* Push frame pointer. */
insn = emit_move_insn (pushword, frame_pointer_rtx);
@@ -768,7 +790,7 @@ expand_prologue (void)
if (TARGET_TINY_STACK)
{
if (size < -63 || size > 63)
- warning (0, "large frame pointer change (%d) with -mtiny-stack", size);
+ warning (0, "large frame pointer change (%ld) with -mtiny-stack", size);
/* The high byte (r29) doesn't change - prefer 'subi' (1 cycle)
over 'sbiw' (2 cycles, same size). */
@@ -780,7 +802,6 @@ expand_prologue (void)
myfp = frame_pointer_rtx;
}
/* Calculate length. */
- int method1_length;
method1_length =
get_attr_length (gen_move_insn (frame_pointer_rtx, stack_pointer_rtx));
method1_length +=
@@ -878,6 +899,7 @@ expand_epilogue (void)
HARD_REG_SET set;
int minimize;
HOST_WIDE_INT size = get_frame_size();
+ int sp_plus_length;
/* epilogue: naked */
if (cfun->machine->is_naked)
@@ -893,6 +915,7 @@ expand_epilogue (void)
&& !cfun->machine->is_interrupt
&& !cfun->machine->is_signal
&& !cfun->machine->is_OS_task
+ && !cfun->machine->is_OS_main
&& live_seq);
if (minimize && (frame_pointer_needed || live_seq > 4))
@@ -955,7 +978,7 @@ expand_epilogue (void)
emit_move_insn (stack_pointer_rtx, frame_pointer_rtx);
}
}
- if(!cfun->machine->is_OS_task)
+ if (!(cfun->machine->is_OS_task || cfun->machine->is_OS_main))
{
/* Restore previous frame_pointer. */
emit_insn (gen_pophi (frame_pointer_rtx));
@@ -1787,10 +1810,18 @@ output_movhi (rtx insn, rtx operands[],
}
/* Use simple load of stack pointer if no interrupts are used
or inside main or signal function prologue where they disabled. */
- else if (TARGET_NO_INTERRUPTS
+ else if ((!AVR_XMEGA && TARGET_NO_INTERRUPTS)
|| (!AVR_XMEGA
- && reload_completed
+ && reload_completed
&& cfun->machine->is_signal
+ && prologue_epilogue_contains (insn))
+ || (!AVR_XMEGA
+ && reload_completed
+ && cfun->machine->is_OS_main
+ && prologue_contains (insn))
+ || (AVR_XMEGA
+ && reload_completed
+ && cfun->machine->is_nmi
&& prologue_epilogue_contains (insn)))
{
*l = 2;
@@ -4821,6 +4852,7 @@ const struct attribute_spec avr_attribut
{ "nmi", 0, 0, true, false, false, avr_handle_fndecl_attribute },
{ "naked", 0, 0, false, true, true, avr_handle_fntype_attribute },
{ "OS_task", 0, 0, false, true, true, avr_handle_fntype_attribute },
+ { "OS_main", 0, 0, false, true, true, avr_handle_fntype_attribute },
{ NULL, 0, 0, false, false, false, NULL }
};

View File

@ -1,129 +0,0 @@
Index: gcc/config/avr/avr.md
===================================================================
--- gcc/config/avr/avr.md (revision 126148)
+++ gcc/config/avr/avr.md (working copy)
@@ -1685,40 +1685,96 @@
;; xx<---x xx<---x xx<---x xx<---x xx<---x xx<---x xx<---x xx<---x xx<---x
;; zero extend
-(define_insn "zero_extendqihi2"
- [(set (match_operand:HI 0 "register_operand" "=r,r")
- (zero_extend:HI (match_operand:QI 1 "register_operand" "0,*r")))]
+(define_insn_and_split "zero_extendqihi2"
+ [(set (match_operand:HI 0 "register_operand" "=r")
+ (zero_extend:HI (match_operand:QI 1 "register_operand" "r")))]
""
- "@
- clr %B0
- mov %A0,%A1\;clr %B0"
- [(set_attr "length" "1,2")
- (set_attr "cc" "set_n,set_n")])
+ "#"
+ "reload_completed"
+ [(set (match_dup 2) (match_dup 1))
+ (set (match_dup 3) (const_int 0))]
+ "unsigned int low_off = subreg_lowpart_offset (QImode, HImode);
+ unsigned int high_off = subreg_highpart_offset (QImode, HImode);
+
+ operands[2] = simplify_gen_subreg (QImode, operands[0], HImode, low_off);
+ operands[3] = simplify_gen_subreg (QImode, operands[0], HImode, high_off);
+ ")
-(define_insn "zero_extendqisi2"
- [(set (match_operand:SI 0 "register_operand" "=r,r")
- (zero_extend:SI (match_operand:QI 1 "register_operand" "0,*r")))]
+(define_insn_and_split "zero_extendqisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (zero_extend:SI (match_operand:QI 1 "register_operand" "r")))]
""
- "@
- clr %B0\;clr %C0\;clr %D0
- mov %A0,%A1\;clr %B0\;clr %C0\;clr %D0"
- [(set_attr "length" "3,4")
- (set_attr "cc" "set_n,set_n")])
+ "#"
+ "reload_completed"
+ [(set (match_dup 2) (zero_extend:HI (match_dup 1)))
+ (set (match_dup 3) (const_int 0))]
+ "unsigned int low_off = subreg_lowpart_offset (HImode, SImode);
+ unsigned int high_off = subreg_highpart_offset (HImode, SImode);
+
+ operands[2] = simplify_gen_subreg (HImode, operands[0], SImode, low_off);
+ operands[3] = simplify_gen_subreg (HImode, operands[0], SImode, high_off);
+ ")
-(define_insn "zero_extendhisi2"
- [(set (match_operand:SI 0 "register_operand" "=r,&r")
- (zero_extend:SI (match_operand:HI 1 "register_operand" "0,*r")))]
+(define_insn_and_split "zero_extendhisi2"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (zero_extend:SI (match_operand:HI 1 "register_operand" "r")))]
""
- "@
- clr %C0\;clr %D0
- {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_have_movw" "yes")
- (const_int 3)
- (const_int 4))])
- (set_attr "cc" "set_n,set_n")])
+ "#"
+ "reload_completed"
+ [(set (match_dup 2) (match_dup 1))
+ (set (match_dup 3) (const_int 0))]
+ "unsigned int low_off = subreg_lowpart_offset (HImode, SImode);
+ unsigned int high_off = subreg_highpart_offset (HImode, SImode);
+
+ operands[2] = simplify_gen_subreg (HImode, operands[0], SImode, low_off);
+ operands[3] = simplify_gen_subreg (HImode, operands[0], SImode, high_off);
+ ")
+(define_insn_and_split "zero_extendqidi2"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (zero_extend:DI (match_operand:QI 1 "register_operand" "r")))]
+ ""
+ "#"
+ "reload_completed"
+ [(set (match_dup 2) (zero_extend:SI (match_dup 1)))
+ (set (match_dup 3) (const_int 0))]
+ "unsigned int low_off = subreg_lowpart_offset (SImode, DImode);
+ unsigned int high_off = subreg_highpart_offset (SImode, DImode);
+
+ operands[2] = simplify_gen_subreg (SImode, operands[0], DImode, low_off);
+ operands[3] = simplify_gen_subreg (SImode, operands[0], DImode, high_off);
+ ")
+
+(define_insn_and_split "zero_extendhidi2"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (zero_extend:DI (match_operand:HI 1 "register_operand" "r")))]
+ ""
+ "#"
+ "reload_completed"
+ [(set (match_dup 2) (zero_extend:SI (match_dup 1)))
+ (set (match_dup 3) (const_int 0))]
+ "unsigned int low_off = subreg_lowpart_offset (SImode, DImode);
+ unsigned int high_off = subreg_highpart_offset (SImode, DImode);
+
+ operands[2] = simplify_gen_subreg (SImode, operands[0], DImode, low_off);
+ operands[3] = simplify_gen_subreg (SImode, operands[0], DImode, high_off);
+ ")
+
+(define_insn_and_split "zero_extendsidi2"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (zero_extend:DI (match_operand:SI 1 "register_operand" "r")))]
+ ""
+ "#"
+ "reload_completed"
+ [(set (match_dup 2) (match_dup 1))
+ (set (match_dup 3) (const_int 0))]
+ "unsigned int low_off = subreg_lowpart_offset (SImode, DImode);
+ unsigned int high_off = subreg_highpart_offset (SImode, DImode);
+
+ operands[2] = simplify_gen_subreg (SImode, operands[0], DImode, low_off);
+ operands[3] = simplify_gen_subreg (SImode, operands[0], DImode, high_off);
+ ")
+
;;<=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=>
;; compare

View File

@ -4,19 +4,20 @@ Included is the basic C++ compiler, although this is only of limited
use without a libstdc++, and it is little tested.
Supported debugging formats: -gdwarf-2 [default], -gstabs
Local patch added: recognizes 0bXXX binary constants
Local patch added: OS_main and OS_task attributes
Local patch added: OS_main attribute
Locally added support for the following AVR devices:
ATtiny43U
ATtiny48/88
AT90PWM2B/PWM3B
AT90PWM216/PWM316
ATmega48P/88P/168P/328P
ATmega32HVB
ATmega1284
ATmega2560/ATmega2561
ATmega32C1, ATmega64C1, ATmega32M1, ATmega64M1
ATmega16U4, ATmega32U4, ATmega32U6
ATmega128RFA1
M3000F, M3000S, M3001B
AT90SCR100
ATtiny13A
ATtiny87, ATtiny167, ATtiny327
AT90PWM81
ATxmega64A1, ATxmega128A1, ATxmega64A3, ATxmega128A3, ATxmega256A3,
ATxmega256A3B
WWW: http://gcc.gnu.org/
WWW: http://www.nongnu.org/avr-libc/

View File

@ -5,59 +5,65 @@ bin/avr-c++
bin/avr-cpp
bin/avr-g++
bin/avr-gcc
bin/avr-gcc-4.2.2
bin/avr-gcc-4.3.2
bin/avr-gccbug
lib/gcc/avr/4.2.2/avr25/libgcc.a
lib/gcc/avr/4.2.2/avr25/libgcov.a
lib/gcc/avr/4.2.2/avr3/libgcc.a
lib/gcc/avr/4.2.2/avr3/libgcov.a
lib/gcc/avr/4.2.2/avr35/libgcc.a
lib/gcc/avr/4.2.2/avr35/libgcov.a
lib/gcc/avr/4.2.2/avr4/libgcc.a
lib/gcc/avr/4.2.2/avr4/libgcov.a
lib/gcc/avr/4.2.2/avr5/libgcc.a
lib/gcc/avr/4.2.2/avr5/libgcov.a
lib/gcc/avr/4.2.2/avr6/libgcc.a
lib/gcc/avr/4.2.2/avr6/libgcov.a
lib/gcc/avr/4.2.2/include/README
lib/gcc/avr/4.2.2/include/decfloat.h
lib/gcc/avr/4.2.2/include/fixed
lib/gcc/avr/4.2.2/include/float.h
lib/gcc/avr/4.2.2/include/iso646.h
lib/gcc/avr/4.2.2/include/limits.h
lib/gcc/avr/4.2.2/include/stdarg.h
lib/gcc/avr/4.2.2/include/stdbool.h
lib/gcc/avr/4.2.2/include/stddef.h
lib/gcc/avr/4.2.2/include/syslimits.h
lib/gcc/avr/4.2.2/include/unwind.h
lib/gcc/avr/4.2.2/include/varargs.h
lib/gcc/avr/4.2.2/install-tools/gsyslimits.h
lib/gcc/avr/4.2.2/install-tools/include/README
lib/gcc/avr/4.2.2/install-tools/include/decfloat.h
lib/gcc/avr/4.2.2/install-tools/include/float.h
lib/gcc/avr/4.2.2/install-tools/include/iso646.h
lib/gcc/avr/4.2.2/install-tools/include/limits.h
lib/gcc/avr/4.2.2/install-tools/include/stdarg.h
lib/gcc/avr/4.2.2/install-tools/include/stdbool.h
lib/gcc/avr/4.2.2/install-tools/include/stddef.h
lib/gcc/avr/4.2.2/install-tools/include/unwind.h
lib/gcc/avr/4.2.2/install-tools/include/varargs.h
lib/gcc/avr/4.2.2/install-tools/macro_list
lib/gcc/avr/4.2.2/install-tools/mkheaders.conf
lib/gcc/avr/4.2.2/libgcc.a
lib/gcc/avr/4.2.2/libgcov.a
libexec/gcc/avr/4.2.2/cc1
libexec/gcc/avr/4.2.2/cc1plus
libexec/gcc/avr/4.2.2/collect2
libexec/gcc/avr/4.2.2/install-tools/fix-header
libexec/gcc/avr/4.2.2/install-tools/fixinc.sh
libexec/gcc/avr/4.2.2/install-tools/fixincl
libexec/gcc/avr/4.2.2/install-tools/fixproto
libexec/gcc/avr/4.2.2/install-tools/mkheaders
lib/gcc/avr/4.3.2/avr25/libgcc.a
lib/gcc/avr/4.3.2/avr25/libgcov.a
lib/gcc/avr/4.3.2/avr3/libgcc.a
lib/gcc/avr/4.3.2/avr3/libgcov.a
lib/gcc/avr/4.3.2/avr31/libgcc.a
lib/gcc/avr/4.3.2/avr31/libgcov.a
lib/gcc/avr/4.3.2/avr35/libgcc.a
lib/gcc/avr/4.3.2/avr35/libgcov.a
lib/gcc/avr/4.3.2/avr4/libgcc.a
lib/gcc/avr/4.3.2/avr4/libgcov.a
lib/gcc/avr/4.3.2/avr5/libgcc.a
lib/gcc/avr/4.3.2/avr5/libgcov.a
lib/gcc/avr/4.3.2/avr51/libgcc.a
lib/gcc/avr/4.3.2/avr51/libgcov.a
lib/gcc/avr/4.3.2/avr6/libgcc.a
lib/gcc/avr/4.3.2/avr6/libgcov.a
lib/gcc/avr/4.3.2/avrxmega4/libgcc.a
lib/gcc/avr/4.3.2/avrxmega4/libgcov.a
lib/gcc/avr/4.3.2/avrxmega5/libgcc.a
lib/gcc/avr/4.3.2/avrxmega5/libgcov.a
lib/gcc/avr/4.3.2/avrxmega6/libgcc.a
lib/gcc/avr/4.3.2/avrxmega6/libgcov.a
lib/gcc/avr/4.3.2/avrxmega7/libgcc.a
lib/gcc/avr/4.3.2/avrxmega7/libgcov.a
lib/gcc/avr/4.3.2/include-fixed/README
lib/gcc/avr/4.3.2/include-fixed/fixed
lib/gcc/avr/4.3.2/include-fixed/limits.h
lib/gcc/avr/4.3.2/include-fixed/syslimits.h
lib/gcc/avr/4.3.2/include/float.h
lib/gcc/avr/4.3.2/include/iso646.h
lib/gcc/avr/4.3.2/include/stdarg.h
lib/gcc/avr/4.3.2/include/stdbool.h
lib/gcc/avr/4.3.2/include/stddef.h
lib/gcc/avr/4.3.2/include/stdfix.h
lib/gcc/avr/4.3.2/include/tgmath.h
lib/gcc/avr/4.3.2/include/unwind.h
lib/gcc/avr/4.3.2/include/varargs.h
lib/gcc/avr/4.3.2/install-tools/fixinc_list
lib/gcc/avr/4.3.2/install-tools/gsyslimits.h
lib/gcc/avr/4.3.2/install-tools/include/README
lib/gcc/avr/4.3.2/install-tools/include/limits.h
lib/gcc/avr/4.3.2/install-tools/macro_list
lib/gcc/avr/4.3.2/install-tools/mkheaders.conf
lib/gcc/avr/4.3.2/libgcc.a
lib/gcc/avr/4.3.2/libgcov.a
libexec/gcc/avr/4.3.2/cc1
libexec/gcc/avr/4.3.2/cc1plus
libexec/gcc/avr/4.3.2/collect2
libexec/gcc/avr/4.3.2/install-tools/fix-header
libexec/gcc/avr/4.3.2/install-tools/fixinc.sh
libexec/gcc/avr/4.3.2/install-tools/fixincl
libexec/gcc/avr/4.3.2/install-tools/fixproto
libexec/gcc/avr/4.3.2/install-tools/mkheaders
libexec/gcc/avr/4.3.2/install-tools/mkinstalldirs
share/locale/be/LC_MESSAGES/cpplib.mo
share/locale/be/LC_MESSAGES/gcc.mo
share/locale/ca/LC_MESSAGES/cpplib.mo
share/locale/ca/LC_MESSAGES/gcc.mo
share/locale/da/LC_MESSAGES/cpplib.mo
share/locale/da/LC_MESSAGES/gcc.mo
share/locale/de/LC_MESSAGES/cpplib.mo
@ -73,8 +79,6 @@ share/locale/ja/LC_MESSAGES/gcc.mo
share/locale/nl/LC_MESSAGES/cpplib.mo
share/locale/nl/LC_MESSAGES/gcc.mo
share/locale/ru/LC_MESSAGES/gcc.mo
share/locale/rw/LC_MESSAGES/cpplib.mo
share/locale/rw/LC_MESSAGES/gcc.mo
share/locale/sr/LC_MESSAGES/gcc.mo
share/locale/sv/LC_MESSAGES/cpplib.mo
share/locale/sv/LC_MESSAGES/gcc.mo
@ -86,21 +90,27 @@ share/locale/zh_CN/LC_MESSAGES/cpplib.mo
share/locale/zh_CN/LC_MESSAGES/gcc.mo
share/locale/zh_TW/LC_MESSAGES/cpplib.mo
share/locale/zh_TW/LC_MESSAGES/gcc.mo
@dirrmtry share/locale/rw/LC_MESSAGES
@dirrmtry share/locale/rw
@dirrm lib/gcc/avr/4.2.2/avr25
@dirrm lib/gcc/avr/4.2.2/avr3
@dirrm lib/gcc/avr/4.2.2/avr35
@dirrm lib/gcc/avr/4.2.2/avr4
@dirrm lib/gcc/avr/4.2.2/avr5
@dirrm lib/gcc/avr/4.2.2/avr6
@dirrm lib/gcc/avr/4.2.2/include
@dirrm lib/gcc/avr/4.2.2/install-tools/include
@dirrm lib/gcc/avr/4.2.2/install-tools
@dirrm lib/gcc/avr/4.2.2
@dirrm lib/gcc/avr/4.3.2/avr25
@dirrm lib/gcc/avr/4.3.2/avr3
@dirrm lib/gcc/avr/4.3.2/avr31
@dirrm lib/gcc/avr/4.3.2/avr35
@dirrm lib/gcc/avr/4.3.2/avr4
@dirrm lib/gcc/avr/4.3.2/avr5
@dirrm lib/gcc/avr/4.3.2/avr51
@dirrm lib/gcc/avr/4.3.2/avr6
@dirrm lib/gcc/avr/4.3.2/avrxmega4
@dirrm lib/gcc/avr/4.3.2/avrxmega5
@dirrm lib/gcc/avr/4.3.2/avrxmega6
@dirrm lib/gcc/avr/4.3.2/avrxmega7
@dirrm lib/gcc/avr/4.3.2/include
@dirrm lib/gcc/avr/4.3.2/include-fixed
@dirrm lib/gcc/avr/4.3.2/install-tools/include
@dirrm lib/gcc/avr/4.3.2/install-tools
@dirrm lib/gcc/avr/4.3.2
@dirrm lib/gcc/avr
@dirrm lib/gcc
@dirrm libexec/gcc/avr/4.2.2/install-tools
@dirrm libexec/gcc/avr/4.2.2
@dirrm libexec/gcc/avr/4.3.2/install-tools
@dirrm libexec/gcc/avr/4.3.2
@dirrm libexec/gcc/avr
@dirrm libexec/gcc
@dirrm avr/bin