diff options
author | Eric B. Weddington <eric.weddington@atmel.com> | 2011-03-22 18:10:48 +0000 |
---|---|---|
committer | Eric B. Weddington <eric.weddington@atmel.com> | 2011-03-22 18:10:48 +0000 |
commit | 8cc66334fa03f92b70da1a17685a093b6b0850ba (patch) | |
tree | 3c347ee26f7d734336dbf0c44bbffdc0af9ccd7a /bfd | |
parent | 3167638f1e8e74e15650adda08449c2e32572552 (diff) | |
download | gdb-8cc66334fa03f92b70da1a17685a093b6b0850ba.zip gdb-8cc66334fa03f92b70da1a17685a093b6b0850ba.tar.gz gdb-8cc66334fa03f92b70da1a17685a093b6b0850ba.tar.bz2 |
/bfd:
2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
* archures.c: Add AVR XMEGA architecture information.
* cpu-avr.c (arch_info_struct): Likewise.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
(elf32_avr_object_p): Likewise.
/gas:
2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (struct avr_opcodes_s): Add opcode field.
(AVR_INSN): Change definition to match.
(avr_opcodes): Likewise, change to match.
(mcu_types): Add XMEGA architecture names and new XMEGA device names.
(md_show_usage): Add XMEGA architecture names.
(avr_operand): Add 'E' constraint for DES instruction of XMEGA devices.
Add support for SPM Z+ instruction.
* doc/c-avr.texi: Add documentation for XMEGA architectures and
devices.
/include/opcode:
2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
* avr.h (AVR_ISA_SPMX,AVR_ISA_DES,AVR_ISA_M256,AVR_ISA_XMEGA):
New instruction set flags.
(AVR_INSN): Add new instructions for SPM Z+, DES for XMEGA.
/ld:
2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
* Makefile.am (ALL_EMULATION_SOURCES): Add AVR XMEGA architectures.
(eavrxmega?.c): Likewise.
* configure.tgt (targ_extra_emuls): Likewise.
* emulparams/avrxmega1.sh: New file.
* emulparams/avrxmega2.sh: Likewise.
* emulparams/avrxmega3.sh: Likewise.
* emulparams/avrxmega4.sh: Likewise.
* emulparams/avrxmega5.sh: Likewise.
* emulparams/avrxmega6.sh: Likewise.
* emulparams/avrxmega7.sh: Likewise.
* emultempl/avrelf.em (avr_elf_${EMULATION_NAME}_before_allocation):
Add avrxmega6, avrxmega7 to list of architectures for no stubs.
/opcodes:
2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
* avr-dis.c (avr_operand): Add opcode_str parameter. Check for
post-increment to support LPM Z+ instruction. Add support for 'E'
constraint for DES instruction.
(print_insn_avr): Adjust calls to avr_operand. Rename variable.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/archures.c | 7 | ||||
-rw-r--r-- | bfd/cpu-avr.c | 24 | ||||
-rw-r--r-- | bfd/elf32-avr.c | 56 |
4 files changed, 93 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a1131c8..c9e1fc3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2011-03-22 Eric B. Weddington <eric.weddington@atmel.com> + + * archures.c: Add AVR XMEGA architecture information. + * cpu-avr.c (arch_info_struct): Likewise. + * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise. + (elf32_avr_object_p): Likewise. + 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org> * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation. diff --git a/bfd/archures.c b/bfd/archures.c index 0efc658..cd8500f 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -376,6 +376,13 @@ DESCRIPTION .#define bfd_mach_avr5 5 .#define bfd_mach_avr51 51 .#define bfd_mach_avr6 6 +.#define bfd_mach_avrxmega1 101 +.#define bfd_mach_avrxmega2 102 +.#define bfd_mach_avrxmega3 103 +.#define bfd_mach_avrxmega4 104 +.#define bfd_mach_avrxmega5 105 +.#define bfd_mach_avrxmega6 106 +.#define bfd_mach_avrxmega7 107 . bfd_arch_bfin, {* ADI Blackfin *} .#define bfd_mach_bfin 1 . bfd_arch_cr16, {* National Semiconductor CompactRISC (ie CR16). *} diff --git a/bfd/cpu-avr.c b/bfd/cpu-avr.c index 9e62ab4..07ba6dc 100644 --- a/bfd/cpu-avr.c +++ b/bfd/cpu-avr.c @@ -133,7 +133,29 @@ static const bfd_arch_info_type arch_info_struct[] = N (22, bfd_mach_avr51, "avr:51", FALSE, & arch_info_struct[9]), /* 3-Byte PC. */ - N (22, bfd_mach_avr6, "avr:6", FALSE, NULL) + N (22, bfd_mach_avr6, "avr:6", FALSE, & arch_info_struct[10]), + + /* Xmega 1 */ + N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[11]), + + /* Xmega 2 */ + N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[12]), + + /* Xmega 3 */ + N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[13]), + + /* Xmega 4 */ + N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[14]), + + /* Xmega 5 */ + N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[15]), + + /* Xmega 6 */ + N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[16]), + + /* Xmega 7 */ + N (24, bfd_mach_avrxmega7, "avr:107", FALSE, NULL) + }; const bfd_arch_info_type bfd_avr_arch = diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index ecc60de..1bc40c4 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -1298,6 +1298,34 @@ bfd_elf_avr_final_write_processing (bfd *abfd, case bfd_mach_avr6: val = E_AVR_MACH_AVR6; break; + + case bfd_mach_avrxmega1: + val = E_AVR_MACH_XMEGA1; + break; + + case bfd_mach_avrxmega2: + val = E_AVR_MACH_XMEGA2; + break; + + case bfd_mach_avrxmega3: + val = E_AVR_MACH_XMEGA3; + break; + + case bfd_mach_avrxmega4: + val = E_AVR_MACH_XMEGA4; + break; + + case bfd_mach_avrxmega5: + val = E_AVR_MACH_XMEGA5; + break; + + case bfd_mach_avrxmega6: + val = E_AVR_MACH_XMEGA6; + break; + + case bfd_mach_avrxmega7: + val = E_AVR_MACH_XMEGA7; + break; } elf_elfheader (abfd)->e_machine = EM_AVR; @@ -1360,6 +1388,34 @@ elf32_avr_object_p (bfd *abfd) case E_AVR_MACH_AVR6: e_set = bfd_mach_avr6; break; + + case E_AVR_MACH_XMEGA1: + e_set = bfd_mach_avrxmega1; + break; + + case E_AVR_MACH_XMEGA2: + e_set = bfd_mach_avrxmega2; + break; + + case E_AVR_MACH_XMEGA3: + e_set = bfd_mach_avrxmega3; + break; + + case E_AVR_MACH_XMEGA4: + e_set = bfd_mach_avrxmega4; + break; + + case E_AVR_MACH_XMEGA5: + e_set = bfd_mach_avrxmega5; + break; + + case E_AVR_MACH_XMEGA6: + e_set = bfd_mach_avrxmega6; + break; + + case E_AVR_MACH_XMEGA7: + e_set = bfd_mach_avrxmega7; + break; } } return bfd_default_set_arch_mach (abfd, bfd_arch_avr, |