diff options
author | Tristan Gingold <gingold@adacore.com> | 2008-12-09 09:51:08 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2008-12-09 09:51:08 +0000 |
commit | 3e22044af11526161ac614fbdc9d0522e1d7221b (patch) | |
tree | 6a0f3219b530d9710d7cb4745075bbe5a6a34953 /bfd/cpu-avr.c | |
parent | f5f53991eaa54e4e418d0106ee9ba9ffa1e832c8 (diff) | |
download | gdb-3e22044af11526161ac614fbdc9d0522e1d7221b.zip gdb-3e22044af11526161ac614fbdc9d0522e1d7221b.tar.gz gdb-3e22044af11526161ac614fbdc9d0522e1d7221b.tar.bz2 |
2008-12-09 Tristan Gingold <gingold@adacore.com>
* cpu-avr.c (compatible): Makes avr-6 compatible only with itself.
Diffstat (limited to 'bfd/cpu-avr.c')
-rw-r--r-- | bfd/cpu-avr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bfd/cpu-avr.c b/bfd/cpu-avr.c index 364f64e..ddc410b 100644 --- a/bfd/cpu-avr.c +++ b/bfd/cpu-avr.c @@ -38,7 +38,13 @@ compatible (const bfd_arch_info_type * a, if (a->mach == b->mach) return a; - if (a->mach <= bfd_mach_avr6 && b->mach <= bfd_mach_avr6) + /* avr-6 is compatible only with itself as its call convention is not + compatible with other avr (the mcu saves the return address on 3 bytes + instead of 2). */ + if (a->mach == bfd_mach_avr6 || b->mach == bfd_mach_avr6) + return NULL; + + if (a->mach < bfd_mach_avr6 && b->mach < bfd_mach_avr6) { /* Special case for ATmega[16]03 (avr:3) and ATmega83 (avr:4). */ if ((a->mach == bfd_mach_avr3 && b->mach == bfd_mach_avr4) |