1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Merge some patches that have meanwhile be integrated in binutil's CVS,

and apply them to the latest released version (2.15).  This mainly
adds support for new AVR devices that appeared on the market recently,
and fixes one relocation bug for the EEPROM section that could be
noted when a bootloader section is also present.
This commit is contained in:
Joerg Wunsch 2005-03-10 21:11:07 +00:00
parent ed404348d3
commit a9256f5bf4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=130832
4 changed files with 132 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= binutils
PORTVERSION= 2.15
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEWARE}
MASTER_SITE_SUBDIR= binutils/releases

View File

@ -0,0 +1,97 @@
2004-04-02 Theodore A. Roth <troth@openavr.org>
* gas/config/tc-avr.c:
* include/opcode/avr.h:
Add support for atmega48, atmega88, atmega168, attiny13, attiny2313 and
at90can128.
Index: gas/config/tc-avr.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-avr.c,v
retrieving revision 1.20
diff -u -p -p -r1.20 tc-avr.c
--- gas/config/tc-avr.c 30 Nov 2002 08:39:43 -0000 1.20
+++ gas/config/tc-avr.c 3 Apr 2004 00:03:09 -0000
@@ -90,20 +90,26 @@ static struct mcu_type_s mcu_types[] =
{"at43usb320",AVR_ISA_M103, bfd_mach_avr3},
{"at43usb355",AVR_ISA_M603, bfd_mach_avr3},
{"at76c711", AVR_ISA_M603, bfd_mach_avr3},
+ {"atmega48", AVR_ISA_M8, bfd_mach_avr4},
{"atmega8", AVR_ISA_M8, bfd_mach_avr4},
{"atmega83", AVR_ISA_M8, bfd_mach_avr4}, /* XXX -> m8535 */
{"atmega85", AVR_ISA_M8, bfd_mach_avr4}, /* XXX -> m8 */
+ {"atmega88", AVR_ISA_M8, bfd_mach_avr4},
{"atmega8515",AVR_ISA_M8, bfd_mach_avr4},
{"atmega8535",AVR_ISA_M8, bfd_mach_avr4},
+ {"attiny13", AVR_ISA_TINY2, bfd_mach_avr2},
+ {"attiny2313",AVR_ISA_TINY2, bfd_mach_avr2},
{"atmega16", AVR_ISA_M323, bfd_mach_avr5},
{"atmega161", AVR_ISA_M161, bfd_mach_avr5},
{"atmega162", AVR_ISA_M323, bfd_mach_avr5},
{"atmega163", AVR_ISA_M161, bfd_mach_avr5},
+ {"atmega168", AVR_ISA_M323, bfd_mach_avr5},
{"atmega169", AVR_ISA_M323, bfd_mach_avr5},
{"atmega32", AVR_ISA_M323, bfd_mach_avr5},
{"atmega323", AVR_ISA_M323, bfd_mach_avr5},
{"atmega64", AVR_ISA_M323, bfd_mach_avr5},
{"atmega128", AVR_ISA_M128, bfd_mach_avr5},
+ {"at90can128",AVR_ISA_M128, bfd_mach_avr5},
{"at94k", AVR_ISA_94K, bfd_mach_avr5},
{NULL, 0, 0}
};
@@ -531,7 +537,8 @@ avr_operands (opcode, line)
/* Warn if the previous opcode was cpse/sbic/sbis/sbrc/sbrs
(AVR core bug, fixed in the newer devices). */
- if (!(avr_opt.no_skip_bug || (avr_mcu->isa & AVR_ISA_MUL))
+ if (!(avr_opt.no_skip_bug ||
+ (avr_mcu->isa & (AVR_ISA_MUL | AVR_ISA_MOVW)))
&& AVR_SKIP_P (prev))
as_warn (_("skipping two-word instruction"));
Index: include/opcode/avr.h
===================================================================
RCS file: /cvs/src/src/include/opcode/avr.h,v
retrieving revision 1.5
diff -u -p -p -r1.5 avr.h
--- include/opcode/avr.h 10 Nov 2001 09:40:53 -0000 1.5
+++ include/opcode/avr.h 3 Apr 2004 00:03:14 -0000
@@ -23,20 +23,25 @@
#define AVR_ISA_SRAM 0x0008 /* device has SRAM (LD, ST, PUSH, POP, ...) */
#define AVR_ISA_MEGA 0x0020 /* device has >8K program memory (JMP and CALL
supported, no 8K wrap on RJMP and RCALL) */
-#define AVR_ISA_MUL 0x0040 /* device has new core (MUL, MOVW, ...) */
+#define AVR_ISA_MUL 0x0040 /* device has new core (MUL, FMUL, ...) */
#define AVR_ISA_ELPM 0x0080 /* device has >64K program memory (ELPM) */
#define AVR_ISA_ELPMX 0x0100 /* device has ELPM Rd,Z[+] */
#define AVR_ISA_SPM 0x0200 /* device can program itself */
#define AVR_ISA_BRK 0x0400 /* device has BREAK (on-chip debug) */
#define AVR_ISA_EIND 0x0800 /* device has >128K program memory (none yet) */
+#define AVR_ISA_MOVW 0x1000 /* device has MOVW */
#define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
#define AVR_ISA_2xxx (AVR_ISA_TINY1 | AVR_ISA_SRAM)
-#define AVR_ISA_M8 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
+#define AVR_ISA_TINY2 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX | \
+ AVR_ISA_SPM | AVR_ISA_BRK)
+#define AVR_ISA_M8 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_MOVW | \
+ AVR_ISA_LPMX | AVR_ISA_SPM)
#define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA)
#define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM)
-#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
-#define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX)
+#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | \
+ AVR_ISA_LPMX | AVR_ISA_SPM)
+#define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | AVR_ISA_LPMX)
#define AVR_ISA_M323 (AVR_ISA_M161 | AVR_ISA_BRK)
#define AVR_ISA_M128 (AVR_ISA_M323 | AVR_ISA_ELPM | AVR_ISA_ELPMX)
@@ -236,7 +241,7 @@ AVR_INSN (ror, "r", "1001010rrrrr0111
AVR_INSN (swap, "r", "1001010rrrrr0010", 1, AVR_ISA_1200, 0x9402)
/* Known to be decoded as `nop' by the old core. */
-AVR_INSN (movw, "v,v", "00000001ddddrrrr", 1, AVR_ISA_MUL, 0x0100)
+AVR_INSN (movw, "v,v", "00000001ddddrrrr", 1, AVR_ISA_MOVW, 0x0100)
AVR_INSN (muls, "d,d", "00000010ddddrrrr", 1, AVR_ISA_MUL, 0x0200)
AVR_INSN (mulsu,"a,a", "000000110ddd0rrr", 1, AVR_ISA_MUL, 0x0300)
AVR_INSN (fmul, "a,a", "000000110ddd1rrr", 1, AVR_ISA_MUL, 0x0308)

View File

@ -0,0 +1,19 @@
2005-03-04 Eric B. Weddington <ericw@evcohs.com>
* gas/config/tc-avr.c:
Add support for atmega325, atmega3250, atmega645, atmega6450.
--- gas/config/tc-avr.c.old 2005-03-04 09:52:14.321375000 -0700
+++ gas/config/tc-avr.c 2005-03-04 09:25:06.805750000 -0700
@@ -107,7 +107,11 @@
{"atmega169", AVR_ISA_M323, bfd_mach_avr5},
{"atmega32", AVR_ISA_M323, bfd_mach_avr5},
{"atmega323", AVR_ISA_M323, bfd_mach_avr5},
+ {"atmega325", AVR_ISA_M323, bfd_mach_avr5},
+ {"atmega3250",AVR_ISA_M323, bfd_mach_avr5},
{"atmega64", AVR_ISA_M323, bfd_mach_avr5},
+ {"atmega645", AVR_ISA_M323, bfd_mach_avr5},
+ {"atmega6450",AVR_ISA_M323, bfd_mach_avr5},
{"atmega128", AVR_ISA_M128, bfd_mach_avr5},
{"at90can128",AVR_ISA_M128, bfd_mach_avr5},
{"at94k", AVR_ISA_94K, bfd_mach_avr5},

View File

@ -0,0 +1,15 @@
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/avr.sc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ld/scripttempl/avr.sc 2002/06/01 23:28:59 1.2
+++ ld/scripttempl/avr.sc 2004/05/08 21:52:56 1.3
@@ -145,7 +145,6 @@
} ${RELOCATING+ > data}
.eeprom ${RELOCATING-0}:
- ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text) + SIZEOF (.data))}
{
*(.eeprom*)
${RELOCATING+ __eeprom_end = . ; }