From 65aa24b6e8082b40bb8de63732b35908cbfd088a Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 27 Jun 2000 01:45:30 +0000 Subject: Applied Marek Michalkiewicz 's patch to ehance the AVR port. --- bfd/cpu-avr.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'bfd/cpu-avr.c') diff --git a/bfd/cpu-avr.c b/bfd/cpu-avr.c index 637b13f..9180d90 100644 --- a/bfd/cpu-avr.c +++ b/bfd/cpu-avr.c @@ -45,17 +45,20 @@ static const bfd_arch_info_type *compatible static const bfd_arch_info_type arch_info_struct[] = { - /* AT90S1200 */ + /* AT90S1200, ATtiny1x, ATtiny28 */ N (16, bfd_mach_avr1, "avr:1", false, & arch_info_struct[1]), - /* AT90S2xxx, AT90S4xxx, AT90S81xx, ATtiny22 */ + /* AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22 */ N (16, bfd_mach_avr2, "avr:2", false, & arch_info_struct[2]), /* ATmega103, ATmega603 */ N (22, bfd_mach_avr3, "avr:3", false, & arch_info_struct[3]), - /* ATmega161 */ - N (16, bfd_mach_avr4, "avr:4", false, NULL) + /* ATmega83, ATmega85 */ + N (16, bfd_mach_avr4, "avr:4", false, & arch_info_struct[4]), + + /* ATmega161, ATmega163, ATmega32, AT94K */ + N (22, bfd_mach_avr5, "avr:5", false, NULL) }; const bfd_arch_info_type bfd_avr_arch = @@ -74,7 +77,7 @@ compatible (a,b) if (a->arch != b->arch) return NULL; - /* Special case for ATmega[16]03 (avr:3) and ATmega161 (avr:4). */ + /* Special case for ATmega[16]03 (avr:3) and ATmega83 (avr:4). */ if ((a->mach == 3 && b->mach == 4) || (a->mach == 4 && b->mach == 3)) return NULL; @@ -84,6 +87,9 @@ compatible (a,b) if (a->mach <= b->mach) return b; + if (a->mach >= b->mach) + return a; + /* Never reached! */ return NULL; } -- cgit v1.1