diff options
author | Nick Clifton <nickc@redhat.com> | 2000-06-27 01:45:30 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2000-06-27 01:45:30 +0000 |
commit | 65aa24b6e8082b40bb8de63732b35908cbfd088a (patch) | |
tree | fdf3cf5418105392e2b0cc7fec1c89ee566de17b /bfd/cpu-avr.c | |
parent | cc040812f5558d0d2b9c876ea0bfbb3c46e9b6dd (diff) | |
download | gdb-65aa24b6e8082b40bb8de63732b35908cbfd088a.zip gdb-65aa24b6e8082b40bb8de63732b35908cbfd088a.tar.gz gdb-65aa24b6e8082b40bb8de63732b35908cbfd088a.tar.bz2 |
Applied Marek Michalkiewicz <marekm@linux.org.pl>'s patch to ehance the AVR port.
Diffstat (limited to 'bfd/cpu-avr.c')
-rw-r--r-- | bfd/cpu-avr.c | 16 |
1 files changed, 11 insertions, 5 deletions
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; } |