2000-03-27 10:39:14 +02:00
|
|
|
/* tc-avr.c -- Assembler code for the ATMEL AVR
|
|
|
|
|
2019-01-01 11:31:27 +01:00
|
|
|
Copyright (C) 1999-2019 Free Software Foundation, Inc.
|
2000-03-27 10:39:14 +02:00
|
|
|
Contributed by Denis Chertykov <denisc@overta.ru>
|
|
|
|
|
|
|
|
This file is part of GAS, the GNU Assembler.
|
|
|
|
|
|
|
|
GAS is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-07-03 13:01:12 +02:00
|
|
|
the Free Software Foundation; either version 3, or (at your option)
|
2000-03-27 10:39:14 +02:00
|
|
|
any later version.
|
|
|
|
|
|
|
|
GAS is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with GAS; see the file COPYING. If not, write to
|
2005-05-05 11:13:19 +02:00
|
|
|
the Free Software Foundation, 51 Franklin Street - Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA. */
|
2000-03-27 10:39:14 +02:00
|
|
|
|
|
|
|
#include "as.h"
|
2001-09-19 07:33:36 +02:00
|
|
|
#include "safe-ctype.h"
|
2000-03-27 10:39:14 +02:00
|
|
|
#include "subsegs.h"
|
2013-01-23 13:01:12 +01:00
|
|
|
#include "dwarf2dbg.h"
|
2011-03-29 20:16:16 +02:00
|
|
|
#include "dw2gencfi.h"
|
2014-11-23 00:19:31 +01:00
|
|
|
#include "elf/avr.h"
|
2015-01-08 21:55:10 +01:00
|
|
|
#include "elf32-avr.h"
|
|
|
|
|
|
|
|
/* For building a linked list of AVR_PROPERTY_RECORD structures. */
|
|
|
|
struct avr_property_record_link
|
|
|
|
{
|
|
|
|
struct avr_property_record record;
|
|
|
|
struct avr_property_record_link *next;
|
|
|
|
};
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2000-06-07 19:42:44 +02:00
|
|
|
struct avr_opcodes_s
|
|
|
|
{
|
2016-02-25 17:55:21 +01:00
|
|
|
const char * name;
|
|
|
|
const char * constraints;
|
|
|
|
const char * opcode;
|
2005-10-12 12:56:46 +02:00
|
|
|
int insn_size; /* In words. */
|
|
|
|
int isa;
|
|
|
|
unsigned int bin_opcode;
|
2000-06-07 19:42:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#define AVR_INSN(NAME, CONSTR, OPCODE, SIZE, ISA, BIN) \
|
2011-03-22 19:10:48 +01:00
|
|
|
{#NAME, CONSTR, OPCODE, SIZE, ISA, BIN},
|
2000-06-07 19:42:44 +02:00
|
|
|
|
|
|
|
struct avr_opcodes_s avr_opcodes[] =
|
|
|
|
{
|
|
|
|
#include "opcode/avr.h"
|
2011-03-22 19:10:48 +01:00
|
|
|
{NULL, NULL, NULL, 0, 0, 0}
|
2000-06-07 19:42:44 +02:00
|
|
|
};
|
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
|
|
|
|
/* Stuff for the `__gcc_isr' pseudo instruction.
|
|
|
|
|
|
|
|
Purpose of the pseudo instruction is to emit more efficient ISR prologues
|
|
|
|
and epilogues than GCC currently does. GCC has no explicit (on RTL level)
|
|
|
|
modelling of SREG, TMP_REG or ZERO_REG. These regs are used implicitly
|
|
|
|
during instruction printing. That doesn't hurt too much for ordinary
|
|
|
|
functions, however for small ISRs there might be some overhead.
|
|
|
|
|
|
|
|
As implementing http://gcc.gnu.org/PR20296 would imply an almost complete
|
|
|
|
rewite of GCC's AVR back-end (which might pop up less optimized code in
|
|
|
|
other places), we provide a pseudo-instruction which is resolved by GAS
|
|
|
|
into ISR prologue / epilogue as expected by GCC.
|
|
|
|
|
|
|
|
Using GAS for this purpose has the additional benefit that it can scan
|
|
|
|
code emit by inline asm which is opaque to GCC.
|
|
|
|
|
|
|
|
The pseudo-instruction is only supposed to handle the starting of
|
|
|
|
prologue and the ending of epilogues (without RETI) which deal with
|
|
|
|
SREG, TMP_REG and ZERO_REG and one additional, optional general purpose
|
|
|
|
register.
|
|
|
|
|
|
|
|
__gcc_isr consists of 3 different "chunks":
|
|
|
|
|
|
|
|
__gcc_isr 1
|
|
|
|
Chunk 1 (ISR_CHUNK_Prologue)
|
|
|
|
Start the ISR code. Will be replaced by ISR prologue by next Done chunk.
|
|
|
|
Must be the 1st chunk in a file or follow a Done chunk from previous
|
|
|
|
ISR (which has been patched already).
|
|
|
|
|
|
|
|
It will finish the current frag and emit a new frag of
|
|
|
|
type rs_machine_dependent, subtype ISR_CHUNK_Prologue.
|
|
|
|
|
|
|
|
__gcc_isr 2
|
|
|
|
Chunk 2 (ISR_CHUNK_Epilogue)
|
|
|
|
Will be replaced by ISR epilogue by next Done chunk. Must follow
|
|
|
|
chunk 1 (Prologue) or chunk 2 (Epilogue). Functions might come
|
|
|
|
without epilogue or with more than one epilogue, and even code
|
|
|
|
located statically after the last epilogue might belong to a function.
|
|
|
|
|
|
|
|
It will finish the current frag and emit a new frag of
|
|
|
|
type rs_machine_dependent, subtype ISR_CHUNK_Epilogue.
|
|
|
|
|
|
|
|
__gcc_isr 0, Rx
|
|
|
|
Chunk 0 (ISR_CHUNK_Done)
|
|
|
|
Must follow chunk 1 (Prologue) or chunk 2 (Epilogue) and finishes
|
|
|
|
the ISR code. Only GCC can know where a function's code ends.
|
|
|
|
|
|
|
|
It triggers the patch-up of all rs_machine_dependent frags in the
|
|
|
|
current frag chain and turns them into ordinary rs_fill code frags.
|
|
|
|
|
|
|
|
If Rx is a register > ZERO_REG then GCC also wants to push / pop Rx.
|
|
|
|
If neither TMP_REG nor ZERO_REG are needed, Rx will be used in
|
|
|
|
the push / pop sequence avoiding the need for TMP_REG / ZERO_REG.
|
|
|
|
If Rx <= ZERO_REG then GCC doesn't assume anything about Rx.
|
|
|
|
|
|
|
|
Assumptions:
|
|
|
|
|
|
|
|
o GCC takes care of code that is opaque to GAS like tail calls
|
|
|
|
or non-local goto.
|
|
|
|
|
|
|
|
o Using SEI / CLI does not count as clobbering SREG. This is
|
|
|
|
because a final RETI will restore the I-flag.
|
|
|
|
|
|
|
|
o Using OUT or ST* is supposed not to clobber SREG. Sequences like
|
|
|
|
|
|
|
|
IN-SREG + CLI + Atomic-Code + OUT-SREG
|
|
|
|
|
|
|
|
will still work as expected because the scan will reveal any
|
|
|
|
clobber of SREG other than I-flag and emit PUSH / POP of SREG.
|
|
|
|
*/
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
ISR_CHUNK_Done = 0,
|
|
|
|
ISR_CHUNK_Prologue = 1,
|
|
|
|
ISR_CHUNK_Epilogue = 2
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct
|
|
|
|
{
|
|
|
|
/* Previous __gcc_isr chunk (one of the enums above)
|
|
|
|
and it's location for diagnostics. */
|
|
|
|
int prev_chunk;
|
|
|
|
unsigned line;
|
|
|
|
const char *file;
|
|
|
|
/* Replacer for __gcc_isr.n_pushed once we know how many regs are
|
|
|
|
pushed by the Prologue chunk. */
|
|
|
|
symbolS *sym_n_pushed;
|
|
|
|
|
|
|
|
/* Set and used during parse from chunk 1 (Prologue) up to chunk 0 (Done).
|
|
|
|
Set by `avr_update_gccisr' and used by `avr_patch_gccisr_frag'. */
|
|
|
|
int need_reg_tmp;
|
|
|
|
int need_reg_zero;
|
|
|
|
int need_sreg;
|
|
|
|
} avr_isr;
|
|
|
|
|
|
|
|
static void avr_gccisr_operands (struct avr_opcodes_s*, char**);
|
|
|
|
static void avr_update_gccisr (struct avr_opcodes_s*, int, int);
|
|
|
|
static struct avr_opcodes_s *avr_gccisr_opcode;
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
const char comment_chars[] = ";";
|
|
|
|
const char line_comment_chars[] = "#";
|
|
|
|
const char line_separator_chars[] = "$";
|
|
|
|
|
|
|
|
const char *md_shortopts = "m:";
|
|
|
|
struct mcu_type_s
|
|
|
|
{
|
2016-02-25 17:55:21 +01:00
|
|
|
const char *name;
|
2000-03-27 10:39:14 +02:00
|
|
|
int isa;
|
|
|
|
int mach;
|
|
|
|
};
|
|
|
|
|
2001-11-10 10:35:53 +01:00
|
|
|
/* XXX - devices that don't seem to exist (renamed, replaced with larger
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
ones, or planned but never produced), left here for compatibility. */
|
2001-11-10 10:35:53 +01:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
static struct mcu_type_s mcu_types[] =
|
|
|
|
{
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"avr1", AVR_ISA_AVR1, bfd_mach_avr1},
|
2017-01-23 16:23:07 +01:00
|
|
|
/* TODO: instruction set for avr2 architecture should be AVR_ISA_AVR2,
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
but set to AVR_ISA_AVR25 for some following version
|
|
|
|
of GCC (from 4.3) for backward compatibility. */
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"avr2", AVR_ISA_AVR25, bfd_mach_avr2},
|
|
|
|
{"avr25", AVR_ISA_AVR25, bfd_mach_avr25},
|
2017-01-23 16:23:07 +01:00
|
|
|
/* TODO: instruction set for avr3 architecture should be AVR_ISA_AVR3,
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
but set to AVR_ISA_AVR3_ALL for some following version
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
of GCC (from 4.3) for backward compatibility. */
|
|
|
|
{"avr3", AVR_ISA_AVR3_ALL, bfd_mach_avr3},
|
|
|
|
{"avr31", AVR_ISA_AVR31, bfd_mach_avr31},
|
|
|
|
{"avr35", AVR_ISA_AVR35, bfd_mach_avr35},
|
|
|
|
{"avr4", AVR_ISA_AVR4, bfd_mach_avr4},
|
2017-01-23 16:23:07 +01:00
|
|
|
/* TODO: instruction set for avr5 architecture should be AVR_ISA_AVR5,
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
but set to AVR_ISA_AVR51 for some following version
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
of GCC (from 4.3) for backward compatibility. */
|
|
|
|
{"avr5", AVR_ISA_AVR51, bfd_mach_avr5},
|
|
|
|
{"avr51", AVR_ISA_AVR51, bfd_mach_avr51},
|
|
|
|
{"avr6", AVR_ISA_AVR6, bfd_mach_avr6},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"avrxmega1", AVR_ISA_XMEGA, bfd_mach_avrxmega1},
|
|
|
|
{"avrxmega2", AVR_ISA_XMEGA, bfd_mach_avrxmega2},
|
|
|
|
{"avrxmega3", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"avrxmega4", AVR_ISA_XMEGA, bfd_mach_avrxmega4},
|
|
|
|
{"avrxmega5", AVR_ISA_XMEGA, bfd_mach_avrxmega5},
|
|
|
|
{"avrxmega6", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
|
|
|
|
{"avrxmega7", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
|
2014-07-01 11:20:17 +02:00
|
|
|
{"avrtiny", AVR_ISA_AVRTINY, bfd_mach_avrtiny},
|
2006-05-24 09:36:12 +02:00
|
|
|
{"at90s1200", AVR_ISA_1200, bfd_mach_avr1},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"attiny11", AVR_ISA_AVR1, bfd_mach_avr1},
|
|
|
|
{"attiny12", AVR_ISA_AVR1, bfd_mach_avr1},
|
|
|
|
{"attiny15", AVR_ISA_AVR1, bfd_mach_avr1},
|
|
|
|
{"attiny28", AVR_ISA_AVR1, bfd_mach_avr1},
|
|
|
|
{"at90s2313", AVR_ISA_AVR2, bfd_mach_avr2},
|
|
|
|
{"at90s2323", AVR_ISA_AVR2, bfd_mach_avr2},
|
|
|
|
{"at90s2333", AVR_ISA_AVR2, bfd_mach_avr2}, /* XXX -> 4433 */
|
|
|
|
{"at90s2343", AVR_ISA_AVR2, bfd_mach_avr2},
|
|
|
|
{"attiny22", AVR_ISA_AVR2, bfd_mach_avr2}, /* XXX -> 2343 */
|
2008-02-14 14:04:29 +01:00
|
|
|
{"attiny26", AVR_ISA_2xxe, bfd_mach_avr2},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"at90s4414", AVR_ISA_AVR2, bfd_mach_avr2}, /* XXX -> 8515 */
|
|
|
|
{"at90s4433", AVR_ISA_AVR2, bfd_mach_avr2},
|
|
|
|
{"at90s4434", AVR_ISA_AVR2, bfd_mach_avr2}, /* XXX -> 8535 */
|
|
|
|
{"at90s8515", AVR_ISA_AVR2, bfd_mach_avr2},
|
|
|
|
{"at90c8534", AVR_ISA_AVR2, bfd_mach_avr2},
|
|
|
|
{"at90s8535", AVR_ISA_AVR2, bfd_mach_avr2},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"ata5272", AVR_ISA_AVR25, bfd_mach_avr25},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"attiny13", AVR_ISA_AVR25, bfd_mach_avr25},
|
|
|
|
{"attiny13a", AVR_ISA_AVR25, bfd_mach_avr25},
|
|
|
|
{"attiny2313", AVR_ISA_AVR25, bfd_mach_avr25},
|
2009-08-05 14:47:33 +02:00
|
|
|
{"attiny2313a",AVR_ISA_AVR25, bfd_mach_avr25},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"attiny24", AVR_ISA_AVR25, bfd_mach_avr25},
|
2009-08-05 14:47:33 +02:00
|
|
|
{"attiny24a", AVR_ISA_AVR25, bfd_mach_avr25},
|
|
|
|
{"attiny4313", AVR_ISA_AVR25, bfd_mach_avr25},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"attiny44", AVR_ISA_AVR25, bfd_mach_avr25},
|
2009-08-05 14:47:33 +02:00
|
|
|
{"attiny44a", AVR_ISA_AVR25, bfd_mach_avr25},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"attiny84", AVR_ISA_AVR25, bfd_mach_avr25},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"attiny84a", AVR_ISA_AVR25, bfd_mach_avr25},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"attiny25", AVR_ISA_AVR25, bfd_mach_avr25},
|
|
|
|
{"attiny45", AVR_ISA_AVR25, bfd_mach_avr25},
|
|
|
|
{"attiny85", AVR_ISA_AVR25, bfd_mach_avr25},
|
|
|
|
{"attiny261", AVR_ISA_AVR25, bfd_mach_avr25},
|
2009-08-05 14:47:33 +02:00
|
|
|
{"attiny261a", AVR_ISA_AVR25, bfd_mach_avr25},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"attiny461", AVR_ISA_AVR25, bfd_mach_avr25},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"attiny461a", AVR_ISA_AVR25, bfd_mach_avr25},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"attiny861", AVR_ISA_AVR25, bfd_mach_avr25},
|
2009-08-05 14:47:33 +02:00
|
|
|
{"attiny861a", AVR_ISA_AVR25, bfd_mach_avr25},
|
* config/tc-avr.c (mcu_types): Add attiny87, attiny327, atmega4hvd,
atmega8hvd, atmega16hvb, atmega32hvb, atmega64c1, atmega16m1,
atmega64m1, atmega32u6, atmega128rfa1, at90pwm81, at90scr100,
m3000f, m3000s and m3001b devices.
* doc/c-avr.texi: Likewise.
2008-12-23 10:51:38 +01:00
|
|
|
{"attiny87", AVR_ISA_AVR25, bfd_mach_avr25},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"attiny43u", AVR_ISA_AVR25, bfd_mach_avr25},
|
|
|
|
{"attiny48", AVR_ISA_AVR25, bfd_mach_avr25},
|
|
|
|
{"attiny88", AVR_ISA_AVR25, bfd_mach_avr25},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"attiny828", AVR_ISA_AVR25, bfd_mach_avr25},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"at86rf401", AVR_ISA_RF401, bfd_mach_avr25},
|
|
|
|
{"at43usb355", AVR_ISA_AVR3, bfd_mach_avr3},
|
|
|
|
{"at76c711", AVR_ISA_AVR3, bfd_mach_avr3},
|
|
|
|
{"atmega103", AVR_ISA_AVR31, bfd_mach_avr31},
|
|
|
|
{"at43usb320", AVR_ISA_AVR31, bfd_mach_avr31},
|
|
|
|
{"attiny167", AVR_ISA_AVR35, bfd_mach_avr35},
|
|
|
|
{"at90usb82", AVR_ISA_AVR35, bfd_mach_avr35},
|
|
|
|
{"at90usb162", AVR_ISA_AVR35, bfd_mach_avr35},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"ata5505", AVR_ISA_AVR35, bfd_mach_avr35},
|
2009-08-01 18:17:23 +02:00
|
|
|
{"atmega8u2", AVR_ISA_AVR35, bfd_mach_avr35},
|
|
|
|
{"atmega16u2", AVR_ISA_AVR35, bfd_mach_avr35},
|
|
|
|
{"atmega32u2", AVR_ISA_AVR35, bfd_mach_avr35},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"attiny1634", AVR_ISA_AVR35, bfd_mach_avr35},
|
2006-05-24 09:36:12 +02:00
|
|
|
{"atmega8", AVR_ISA_M8, bfd_mach_avr4},
|
2013-07-18 13:47:30 +02:00
|
|
|
{"ata6289", AVR_ISA_AVR4, bfd_mach_avr4},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega8a", AVR_ISA_M8, bfd_mach_avr4},
|
|
|
|
{"ata6285", AVR_ISA_AVR4, bfd_mach_avr4},
|
|
|
|
{"ata6286", AVR_ISA_AVR4, bfd_mach_avr4},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega48", AVR_ISA_AVR4, bfd_mach_avr4},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega48a", AVR_ISA_AVR4, bfd_mach_avr4},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega48pa", AVR_ISA_AVR4, bfd_mach_avr4},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega48p", AVR_ISA_AVR4, bfd_mach_avr4},
|
|
|
|
{"atmega88", AVR_ISA_AVR4, bfd_mach_avr4},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega88a", AVR_ISA_AVR4, bfd_mach_avr4},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega88p", AVR_ISA_AVR4, bfd_mach_avr4},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega88pa", AVR_ISA_AVR4, bfd_mach_avr4},
|
2006-05-24 09:36:12 +02:00
|
|
|
{"atmega8515", AVR_ISA_M8, bfd_mach_avr4},
|
|
|
|
{"atmega8535", AVR_ISA_M8, bfd_mach_avr4},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega8hva", AVR_ISA_AVR4, bfd_mach_avr4},
|
|
|
|
{"at90pwm1", AVR_ISA_AVR4, bfd_mach_avr4},
|
|
|
|
{"at90pwm2", AVR_ISA_AVR4, bfd_mach_avr4},
|
|
|
|
{"at90pwm2b", AVR_ISA_AVR4, bfd_mach_avr4},
|
|
|
|
{"at90pwm3", AVR_ISA_AVR4, bfd_mach_avr4},
|
|
|
|
{"at90pwm3b", AVR_ISA_AVR4, bfd_mach_avr4},
|
* config/tc-avr.c (mcu_types): Add attiny87, attiny327, atmega4hvd,
atmega8hvd, atmega16hvb, atmega32hvb, atmega64c1, atmega16m1,
atmega64m1, atmega32u6, atmega128rfa1, at90pwm81, at90scr100,
m3000f, m3000s and m3001b devices.
* doc/c-avr.texi: Likewise.
2008-12-23 10:51:38 +01:00
|
|
|
{"at90pwm81", AVR_ISA_AVR4, bfd_mach_avr4},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"at90pwm161", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"ata5790", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"ata5795", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega16", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega16a", AVR_ISA_AVR5, bfd_mach_avr5},
|
2006-05-24 09:36:12 +02:00
|
|
|
{"atmega161", AVR_ISA_M161, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega162", AVR_ISA_AVR5, bfd_mach_avr5},
|
2006-05-24 09:36:12 +02:00
|
|
|
{"atmega163", AVR_ISA_M161, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega164a", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega164p", AVR_ISA_AVR5, bfd_mach_avr5},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega164pa",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega165", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega165a", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega165p", AVR_ISA_AVR5, bfd_mach_avr5},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega165pa",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega168", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega168a", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega168p", AVR_ISA_AVR5, bfd_mach_avr5},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega168pa",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega169", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega169a", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega169p", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega169pa",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega32", AVR_ISA_AVR5, bfd_mach_avr5},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega32a", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega323", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega324a", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega324p", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega324pa",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega325", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega325a", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega325p", AVR_ISA_AVR5, bfd_mach_avr5},
|
2011-03-24 18:03:03 +01:00
|
|
|
{"atmega325pa",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega3250", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega3250a",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega3250p",AVR_ISA_AVR5, bfd_mach_avr5},
|
2011-03-24 18:03:03 +01:00
|
|
|
{"atmega3250pa",AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega328", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega328p", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega329", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega329a", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega329p", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega329pa",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega3290", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega3290a",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega3290p",AVR_ISA_AVR5, bfd_mach_avr5},
|
2011-03-24 18:03:03 +01:00
|
|
|
{"atmega3290pa",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega406", AVR_ISA_AVR5, bfd_mach_avr5},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega64rfr2", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega644rfr2",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega64", AVR_ISA_AVR5, bfd_mach_avr5},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega64a", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega640", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega644", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega644a", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega644p", AVR_ISA_AVR5, bfd_mach_avr5},
|
2009-08-05 14:47:33 +02:00
|
|
|
{"atmega644pa",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega645", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega645a", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega645p", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega649", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega649a", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega649p", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega6450", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega6450a",AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega6450p",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega6490", AVR_ISA_AVR5, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega6490a",AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega6490p",AVR_ISA_AVR5, bfd_mach_avr5},
|
2013-04-09 17:39:37 +02:00
|
|
|
{"atmega64rfr2",AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega644rfr2",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega16hva",AVR_ISA_AVR5, bfd_mach_avr5},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega16hva2",AVR_ISA_AVR5, bfd_mach_avr5},
|
* config/tc-avr.c (mcu_types): Add attiny87, attiny327, atmega4hvd,
atmega8hvd, atmega16hvb, atmega32hvb, atmega64c1, atmega16m1,
atmega64m1, atmega32u6, atmega128rfa1, at90pwm81, at90scr100,
m3000f, m3000s and m3001b devices.
* doc/c-avr.texi: Likewise.
2008-12-23 10:51:38 +01:00
|
|
|
{"atmega16hvb",AVR_ISA_AVR5, bfd_mach_avr5},
|
2011-03-24 18:03:03 +01:00
|
|
|
{"atmega16hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
|
* config/tc-avr.c (mcu_types): Add attiny87, attiny327, atmega4hvd,
atmega8hvd, atmega16hvb, atmega32hvb, atmega64c1, atmega16m1,
atmega64m1, atmega32u6, atmega128rfa1, at90pwm81, at90scr100,
m3000f, m3000s and m3001b devices.
* doc/c-avr.texi: Likewise.
2008-12-23 10:51:38 +01:00
|
|
|
{"atmega32hvb",AVR_ISA_AVR5, bfd_mach_avr5},
|
2011-03-24 18:03:03 +01:00
|
|
|
{"atmega32hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"atmega64hve",AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"at90can32" , AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"at90can64" , AVR_ISA_AVR5, bfd_mach_avr5},
|
2011-03-24 18:03:03 +01:00
|
|
|
{"at90pwm161", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"at90pwm216", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"at90pwm316", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega32c1", AVR_ISA_AVR5, bfd_mach_avr5},
|
* config/tc-avr.c (mcu_types): Add attiny87, attiny327, atmega4hvd,
atmega8hvd, atmega16hvb, atmega32hvb, atmega64c1, atmega16m1,
atmega64m1, atmega32u6, atmega128rfa1, at90pwm81, at90scr100,
m3000f, m3000s and m3001b devices.
* doc/c-avr.texi: Likewise.
2008-12-23 10:51:38 +01:00
|
|
|
{"atmega64c1", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega16m1", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega32m1", AVR_ISA_AVR5, bfd_mach_avr5},
|
* config/tc-avr.c (mcu_types): Add attiny87, attiny327, atmega4hvd,
atmega8hvd, atmega16hvb, atmega32hvb, atmega64c1, atmega16m1,
atmega64m1, atmega32u6, atmega128rfa1, at90pwm81, at90scr100,
m3000f, m3000s and m3001b devices.
* doc/c-avr.texi: Likewise.
2008-12-23 10:51:38 +01:00
|
|
|
{"atmega64m1", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"atmega16u4", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega32u4", AVR_ISA_AVR5, bfd_mach_avr5},
|
* config/tc-avr.c (mcu_types): Add attiny87, attiny327, atmega4hvd,
atmega8hvd, atmega16hvb, atmega32hvb, atmega64c1, atmega16m1,
atmega64m1, atmega32u6, atmega128rfa1, at90pwm81, at90scr100,
m3000f, m3000s and m3001b devices.
* doc/c-avr.texi: Likewise.
2008-12-23 10:51:38 +01:00
|
|
|
{"atmega32u6", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"at90usb646", AVR_ISA_AVR5, bfd_mach_avr5},
|
|
|
|
{"at90usb647", AVR_ISA_AVR5, bfd_mach_avr5},
|
* config/tc-avr.c (mcu_types): Add attiny87, attiny327, atmega4hvd,
atmega8hvd, atmega16hvb, atmega32hvb, atmega64c1, atmega16m1,
atmega64m1, atmega32u6, atmega128rfa1, at90pwm81, at90scr100,
m3000f, m3000s and m3001b devices.
* doc/c-avr.texi: Likewise.
2008-12-23 10:51:38 +01:00
|
|
|
{"at90scr100", AVR_ISA_AVR5, bfd_mach_avr5},
|
2006-05-24 09:36:12 +02:00
|
|
|
{"at94k", AVR_ISA_94K, bfd_mach_avr5},
|
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
atmega164a, atmega165a, atmega169a, atmega169pa, atmega16hva2,
atmega324a, atmega324pa, atmega325a, atmega3250a, atmega328,
atmega329a, atmega329pa, atmega3290a, atmega48a, atmega644a,
atmega645a, atmega645p, atmega6450a, atmega6450p, atmega649a,
atmega649p, atmega6490a, atmega6490p, atmega64hve, atmega88a,
atmega88pa, attiny461a, attiny84a, m3000.
Remove support for atmega8m1, atmega8c1, atmega16c1, atmega4hvd,
atmega8hvd, attiny327, m3000f, m3000s, m3001b.
* doc/c-avr.texi: Same.
2010-04-09 05:48:54 +02:00
|
|
|
{"m3000", AVR_ISA_AVR5, bfd_mach_avr5},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega128", AVR_ISA_AVR51, bfd_mach_avr51},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega128a", AVR_ISA_AVR51, bfd_mach_avr51},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega1280", AVR_ISA_AVR51, bfd_mach_avr51},
|
|
|
|
{"atmega1281", AVR_ISA_AVR51, bfd_mach_avr51},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atmega1284", AVR_ISA_AVR51, bfd_mach_avr51},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"atmega1284p",AVR_ISA_AVR51, bfd_mach_avr51},
|
2009-01-26 14:38:52 +01:00
|
|
|
{"atmega128rfa1",AVR_ISA_AVR51, bfd_mach_avr51},
|
2013-04-09 17:39:37 +02:00
|
|
|
{"atmega128rfr2",AVR_ISA_AVR51, bfd_mach_avr51},
|
|
|
|
{"atmega1284rfr2",AVR_ISA_AVR51, bfd_mach_avr51},
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
{"at90can128", AVR_ISA_AVR51, bfd_mach_avr51},
|
|
|
|
{"at90usb1286",AVR_ISA_AVR51, bfd_mach_avr51},
|
|
|
|
{"at90usb1287",AVR_ISA_AVR51, bfd_mach_avr51},
|
|
|
|
{"atmega2560", AVR_ISA_AVR6, bfd_mach_avr6},
|
|
|
|
{"atmega2561", AVR_ISA_AVR6, bfd_mach_avr6},
|
2013-04-09 17:39:37 +02:00
|
|
|
{"atmega256rfr2", AVR_ISA_AVR6, bfd_mach_avr6},
|
|
|
|
{"atmega2564rfr2", AVR_ISA_AVR6, bfd_mach_avr6},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega16a4", AVR_ISA_XMEGA, bfd_mach_avrxmega2},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega16a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
|
|
|
|
{"atxmega16c4", AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega16d4", AVR_ISA_XMEGA, bfd_mach_avrxmega2},
|
|
|
|
{"atxmega32a4", AVR_ISA_XMEGA, bfd_mach_avrxmega2},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega32a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
|
|
|
|
{"atxmega32c4", AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega32d4", AVR_ISA_XMEGA, bfd_mach_avrxmega2},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega32e5", AVR_ISA_XMEGA, bfd_mach_avrxmega2},
|
|
|
|
{"atxmega16e5", AVR_ISA_XMEGA, bfd_mach_avrxmega2},
|
|
|
|
{"atxmega8e5", AVR_ISA_XMEGA, bfd_mach_avrxmega2},
|
2011-03-23 16:02:06 +01:00
|
|
|
{"atxmega32x1", AVR_ISA_XMEGA, bfd_mach_avrxmega2},
|
Update assembler documentation on some AVR cores.
PR 21472
* config/tc-avr.c (mcu_types): Add entries for: attiny212,
attiny214, attiny412, attiny414, attiny814, attiny1614,
attiny1616, attiny1617, attiny3214, attiny3216, attiny3217.
(md_show_usage): Adjust doc for "avrxmega3".
* doc/c-avr.texi (AVR options) [-mmcu=]: Adjust doc for avrxmega3.
Add MCUs: attiny212, attiny214, attiny412, attiny414, attiny416,
attiny417, attiny814, attiny816, attiny817, attiny1614,
attiny1616, attiny1617, attiny3214, attiny3216, attiny3217.
2017-07-17 11:23:10 +02:00
|
|
|
{"attiny212", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"attiny214", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"attiny412", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"attiny414", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
2017-05-19 16:06:33 +02:00
|
|
|
{"attiny416", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"attiny417", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
Update assembler documentation on some AVR cores.
PR 21472
* config/tc-avr.c (mcu_types): Add entries for: attiny212,
attiny214, attiny412, attiny414, attiny814, attiny1614,
attiny1616, attiny1617, attiny3214, attiny3216, attiny3217.
(md_show_usage): Adjust doc for "avrxmega3".
* doc/c-avr.texi (AVR options) [-mmcu=]: Adjust doc for avrxmega3.
Add MCUs: attiny212, attiny214, attiny412, attiny414, attiny416,
attiny417, attiny814, attiny816, attiny817, attiny1614,
attiny1616, attiny1617, attiny3214, attiny3216, attiny3217.
2017-07-17 11:23:10 +02:00
|
|
|
{"attiny814", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
2017-05-19 16:06:33 +02:00
|
|
|
{"attiny816", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"attiny817", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
Update assembler documentation on some AVR cores.
PR 21472
* config/tc-avr.c (mcu_types): Add entries for: attiny212,
attiny214, attiny412, attiny414, attiny814, attiny1614,
attiny1616, attiny1617, attiny3214, attiny3216, attiny3217.
(md_show_usage): Adjust doc for "avrxmega3".
* doc/c-avr.texi (AVR options) [-mmcu=]: Adjust doc for avrxmega3.
Add MCUs: attiny212, attiny214, attiny412, attiny414, attiny416,
attiny417, attiny814, attiny816, attiny817, attiny1614,
attiny1616, attiny1617, attiny3214, attiny3216, attiny3217.
2017-07-17 11:23:10 +02:00
|
|
|
{"attiny1614", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"attiny1616", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"attiny1617", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"attiny3214", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"attiny3216", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
|
|
|
{"attiny3217", AVR_ISA_XMEGA, bfd_mach_avrxmega3},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega64a3", AVR_ISA_XMEGA, bfd_mach_avrxmega4},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega64a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
|
|
|
|
{"atxmega64a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
|
|
|
|
{"atxmega64b1", AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
|
|
|
|
{"atxmega64b3", AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
|
|
|
|
{"atxmega64c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega64d3", AVR_ISA_XMEGA, bfd_mach_avrxmega4},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega64d4", AVR_ISA_XMEGA, bfd_mach_avrxmega4},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega64a1", AVR_ISA_XMEGA, bfd_mach_avrxmega5},
|
2013-06-01 09:14:44 +02:00
|
|
|
{"atxmega64a1u",AVR_ISA_XMEGAU, bfd_mach_avrxmega5},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega128a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega128a3u",AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
|
2013-06-01 09:14:44 +02:00
|
|
|
{"atxmega128b1", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega128b3", AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
|
|
|
|
{"atxmega128c3", AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega128d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega128d4", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega192a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega192a3u",AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
|
|
|
|
{"atxmega192c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega192d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
|
|
|
|
{"atxmega256a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega256a3u",AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega256a3b",AVR_ISA_XMEGA, bfd_mach_avrxmega6},
|
2013-06-01 09:14:44 +02:00
|
|
|
{"atxmega256a3bu",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega256c3", AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega256d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega384c3", AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
|
|
|
|
{"atxmega384d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
|
2011-03-22 19:10:48 +01:00
|
|
|
{"atxmega128a1", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
|
2013-06-01 09:14:44 +02:00
|
|
|
{"atxmega128a1u", AVR_ISA_XMEGAU, bfd_mach_avrxmega7},
|
* gas/tc-avr.c: Add new devices
avr25: ata5272, attiny828
avr35: ata5505, attiny1634
avr4: atmega8a, ata6285, ata6286, atmega48pa
avr5: at90pwm161, ata5790, ata5795, atmega164pa, atmega165pa,
atmega168pa, atmega32a, atmega64rfr2, atmega644rfr2, atmega64a,
atmega16hva2
avr51: atmega128a, atmega1284
avrxmega2: atxmega16a4u, atxmega16c4, atxmega32a4u, atxmega32c4,
atxmega32e5, atxmega16e5, atxmega8e5
avrxmega4: atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3,
atxmega64c3, atxmega64d4
avrxmega6: atxmega128a3u, atxmega128b3, atxmega128c3,
atxmega128d4, atxmega192a3u, atxmega192c3, atxmega256a3u,
atxmega256c3, atxmega384c3, atxmega384d3
avrxmega7: atxmega128a4u
* doc/c-avr.texi: Ditto.
2014-03-06 15:59:05 +01:00
|
|
|
{"atxmega128a4u", AVR_ISA_XMEGAU, bfd_mach_avrxmega7},
|
2014-07-01 11:20:17 +02:00
|
|
|
{"attiny4", AVR_ISA_AVRTINY, bfd_mach_avrtiny},
|
|
|
|
{"attiny5", AVR_ISA_AVRTINY, bfd_mach_avrtiny},
|
|
|
|
{"attiny9", AVR_ISA_AVRTINY, bfd_mach_avrtiny},
|
|
|
|
{"attiny10", AVR_ISA_AVRTINY, bfd_mach_avrtiny},
|
|
|
|
{"attiny20", AVR_ISA_AVRTINY, bfd_mach_avrtiny},
|
|
|
|
{"attiny40", AVR_ISA_AVRTINY, bfd_mach_avrtiny},
|
2000-03-27 10:39:14 +02:00
|
|
|
{NULL, 0, 0}
|
|
|
|
};
|
|
|
|
|
2014-03-29 06:53:16 +01:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
/* Current MCU type. */
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
static struct mcu_type_s default_mcu = {"avr2", AVR_ISA_AVR2, bfd_mach_avr2};
|
2014-03-29 06:53:16 +01:00
|
|
|
static struct mcu_type_s specified_mcu;
|
2005-10-12 12:56:46 +02:00
|
|
|
static struct mcu_type_s * avr_mcu = & default_mcu;
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2000-07-04 00:25:33 +02:00
|
|
|
/* AVR target-specific switches. */
|
|
|
|
struct avr_opt_s
|
|
|
|
{
|
2005-10-12 12:56:46 +02:00
|
|
|
int all_opcodes; /* -mall-opcodes: accept all known AVR opcodes. */
|
|
|
|
int no_skip_bug; /* -mno-skip-bug: no warnings for skipping 2-word insns. */
|
|
|
|
int no_wrap; /* -mno-wrap: reject rjmp/rcall with 8K wrap-around. */
|
2014-10-27 11:51:17 +01:00
|
|
|
int no_link_relax; /* -mno-link-relax / -mlink-relax: generate (or not)
|
|
|
|
relocations for linker relaxation. */
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
int have_gccisr; /* Whether "__gcc_isr" is a known (pseudo) insn. */
|
2000-07-04 00:25:33 +02:00
|
|
|
};
|
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
static struct avr_opt_s avr_opt = { 0, 0, 0, 0, 0 };
|
2000-07-04 00:25:33 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
const char EXP_CHARS[] = "eE";
|
|
|
|
const char FLT_CHARS[] = "dD";
|
2005-10-12 12:56:46 +02:00
|
|
|
|
|
|
|
static void avr_set_arch (int);
|
2000-03-27 10:39:14 +02:00
|
|
|
|
|
|
|
/* The target specific pseudo-ops which we support. */
|
|
|
|
const pseudo_typeS md_pseudo_table[] =
|
|
|
|
{
|
|
|
|
{"arch", avr_set_arch, 0},
|
|
|
|
{ NULL, NULL, 0}
|
|
|
|
};
|
|
|
|
|
|
|
|
#define LDI_IMMEDIATE(x) (((x) & 0xf) | (((x) << 4) & 0xf00))
|
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
#define EXP_MOD_NAME(i) exp_mod[i].name
|
|
|
|
#define EXP_MOD_RELOC(i) exp_mod[i].reloc
|
|
|
|
#define EXP_MOD_NEG_RELOC(i) exp_mod[i].neg_reloc
|
|
|
|
#define HAVE_PM_P(i) exp_mod[i].have_pm
|
2000-03-27 10:39:14 +02:00
|
|
|
|
|
|
|
struct exp_mod_s
|
|
|
|
{
|
2016-02-25 17:55:21 +01:00
|
|
|
const char * name;
|
2005-10-12 12:56:46 +02:00
|
|
|
bfd_reloc_code_real_type reloc;
|
|
|
|
bfd_reloc_code_real_type neg_reloc;
|
|
|
|
int have_pm;
|
2000-03-27 10:39:14 +02:00
|
|
|
};
|
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
static struct exp_mod_s exp_mod[] =
|
|
|
|
{
|
2000-03-27 10:39:14 +02:00
|
|
|
{"hh8", BFD_RELOC_AVR_HH8_LDI, BFD_RELOC_AVR_HH8_LDI_NEG, 1},
|
|
|
|
{"pm_hh8", BFD_RELOC_AVR_HH8_LDI_PM, BFD_RELOC_AVR_HH8_LDI_PM_NEG, 0},
|
|
|
|
{"hi8", BFD_RELOC_AVR_HI8_LDI, BFD_RELOC_AVR_HI8_LDI_NEG, 1},
|
|
|
|
{"pm_hi8", BFD_RELOC_AVR_HI8_LDI_PM, BFD_RELOC_AVR_HI8_LDI_PM_NEG, 0},
|
|
|
|
{"lo8", BFD_RELOC_AVR_LO8_LDI, BFD_RELOC_AVR_LO8_LDI_NEG, 1},
|
|
|
|
{"pm_lo8", BFD_RELOC_AVR_LO8_LDI_PM, BFD_RELOC_AVR_LO8_LDI_PM_NEG, 0},
|
2006-03-03 16:25:31 +01:00
|
|
|
{"hlo8", BFD_RELOC_AVR_HH8_LDI, BFD_RELOC_AVR_HH8_LDI_NEG, 0},
|
2012-06-11 16:26:41 +02:00
|
|
|
{"hhi8", BFD_RELOC_AVR_MS8_LDI, BFD_RELOC_AVR_MS8_LDI_NEG, 0},
|
2000-03-27 10:39:14 +02:00
|
|
|
};
|
|
|
|
|
2016-11-25 21:01:41 +01:00
|
|
|
/* A union used to store indices into the exp_mod[] array
|
2006-01-11 18:39:50 +01:00
|
|
|
in a hash table which expects void * data types. */
|
|
|
|
typedef union
|
|
|
|
{
|
|
|
|
void * ptr;
|
|
|
|
int index;
|
|
|
|
} mod_index;
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
/* Opcode hash table. */
|
|
|
|
static struct hash_control *avr_hash;
|
|
|
|
|
|
|
|
/* Reloc modifiers hash control (hh8,hi8,lo8,pm_xx). */
|
|
|
|
static struct hash_control *avr_mod_hash;
|
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
/* Whether some opcode does not change SREG. */
|
|
|
|
static struct hash_control *avr_no_sreg_hash;
|
|
|
|
|
|
|
|
static const char* const avr_no_sreg[] =
|
|
|
|
{
|
|
|
|
/* Arithmetic */
|
|
|
|
"ldi", "swap", "mov", "movw",
|
|
|
|
/* Special instructions. I-Flag will be restored by RETI, and we don't
|
|
|
|
consider I-Flag as being clobbered when changed. */
|
|
|
|
"sei", "cli", "reti", "brie", "brid",
|
|
|
|
"nop", "wdr", "sleep",
|
|
|
|
/* Load / Store */
|
|
|
|
"ld", "ldd", "lds", "pop", "in", "lpm", "elpm",
|
|
|
|
"st", "std", "sts", "push", "out",
|
|
|
|
/* Jumps and Calls. Calls might call code that changes SREG.
|
|
|
|
GCC has to filter out ABI calls. The non-ABI transparent calls
|
|
|
|
must use [R]CALL and are filtered out now by not mentioning them. */
|
|
|
|
"rjmp", "jmp", "ijmp", "ret",
|
|
|
|
/* Skipping. Branches need SREG to be set, hence we regard them
|
|
|
|
as if they changed SREG and don't list them here. */
|
|
|
|
"sbrc", "sbrs", "sbic", "sbis", "cpse",
|
|
|
|
/* I/O Manipulation */
|
|
|
|
"sbi", "cbi",
|
|
|
|
/* Read-Modify-Write */
|
|
|
|
"lac", "las", "lat", "xch"
|
|
|
|
};
|
|
|
|
|
2000-07-04 00:25:33 +02:00
|
|
|
#define OPTION_MMCU 'm'
|
2005-10-12 12:56:46 +02:00
|
|
|
enum options
|
|
|
|
{
|
|
|
|
OPTION_ALL_OPCODES = OPTION_MD_BASE + 1,
|
|
|
|
OPTION_NO_SKIP_BUG,
|
2014-03-29 06:53:16 +01:00
|
|
|
OPTION_NO_WRAP,
|
2014-04-10 17:50:33 +02:00
|
|
|
OPTION_ISA_RMW,
|
2014-10-27 11:51:17 +01:00
|
|
|
OPTION_LINK_RELAX,
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
OPTION_NO_LINK_RELAX,
|
|
|
|
OPTION_HAVE_GCCISR
|
2005-10-12 12:56:46 +02:00
|
|
|
};
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
struct option md_longopts[] =
|
|
|
|
{
|
2000-07-04 00:25:33 +02:00
|
|
|
{ "mmcu", required_argument, NULL, OPTION_MMCU },
|
|
|
|
{ "mall-opcodes", no_argument, NULL, OPTION_ALL_OPCODES },
|
|
|
|
{ "mno-skip-bug", no_argument, NULL, OPTION_NO_SKIP_BUG },
|
|
|
|
{ "mno-wrap", no_argument, NULL, OPTION_NO_WRAP },
|
2014-03-29 06:53:16 +01:00
|
|
|
{ "mrmw", no_argument, NULL, OPTION_ISA_RMW },
|
2014-04-10 17:50:33 +02:00
|
|
|
{ "mlink-relax", no_argument, NULL, OPTION_LINK_RELAX },
|
2014-10-27 11:51:17 +01:00
|
|
|
{ "mno-link-relax", no_argument, NULL, OPTION_NO_LINK_RELAX },
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
{ "mgcc-isr", no_argument, NULL, OPTION_HAVE_GCCISR },
|
2000-07-04 00:25:33 +02:00
|
|
|
{ NULL, no_argument, NULL, 0 }
|
2000-03-27 10:39:14 +02:00
|
|
|
};
|
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
size_t md_longopts_size = sizeof (md_longopts);
|
2000-07-04 00:25:33 +02:00
|
|
|
|
|
|
|
/* Display nicely formatted list of known MCU names. */
|
2000-07-28 02:42:18 +02:00
|
|
|
|
2000-07-04 00:25:33 +02:00
|
|
|
static void
|
2005-10-12 12:56:46 +02:00
|
|
|
show_mcu_list (FILE *stream)
|
2000-07-04 00:25:33 +02:00
|
|
|
{
|
|
|
|
int i, x;
|
|
|
|
|
|
|
|
fprintf (stream, _("Known MCU names:"));
|
|
|
|
x = 1000;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-04 00:25:33 +02:00
|
|
|
for (i = 0; mcu_types[i].name; i++)
|
|
|
|
{
|
|
|
|
int len = strlen (mcu_types[i].name);
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-04 00:25:33 +02:00
|
|
|
x += len + 1;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-04 00:25:33 +02:00
|
|
|
if (x < 75)
|
2000-07-28 02:42:18 +02:00
|
|
|
fprintf (stream, " %s", mcu_types[i].name);
|
2000-07-04 00:25:33 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
fprintf (stream, "\n %s", mcu_types[i].name);
|
|
|
|
x = len + 2;
|
|
|
|
}
|
|
|
|
}
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
fprintf (stream, "\n");
|
2000-07-04 00:25:33 +02:00
|
|
|
}
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
static inline char *
|
2005-10-12 12:56:46 +02:00
|
|
|
skip_space (char *s)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
while (*s == ' ' || *s == '\t')
|
|
|
|
++s;
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Extract one word from FROM and copy it to TO. */
|
2000-07-28 02:42:18 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
static char *
|
|
|
|
extract_word (char *from, char *to, int limit)
|
|
|
|
{
|
|
|
|
char *op_end;
|
|
|
|
int size = 0;
|
|
|
|
|
|
|
|
/* Drop leading whitespace. */
|
|
|
|
from = skip_space (from);
|
|
|
|
*to = 0;
|
2000-07-28 02:42:18 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
/* Find the op code end. */
|
* config/obj-evax.h (S_SET_OTHER, S_SET_TYPE, S_SET_DESC): Don't define.
* config/tc-crx.c (gettrap): Constify arg.
(handle_LoadStor, get_cinv_parameters): Likewise.
(getreg_image): Fix enum warning
(md_assemble): Restore input line char.
* config/tc-hppa.c (tc_gen_reloc): Fix enum warning.
* config/tc-i960.c (mem_fmt): Rename var to fix shadow warning.
* config/tc-sh.c (sh_fdpic): Only define when OBJ_ELF.
(build_Mytes): Fix build failure for non-elf targets.
* config/tc-tic4x.c (tic4x_eval): Restore terminator char.
* config/tc-xtensa.c (xtensa_end_directive): Fix switch enum warning.
* cgen.c (gas_cgen_md_apply_fix): Avoid set but unused warning.
* ecoff.c (add_ecoff_symbol): Likewise.
* itbl-ops.c (append_insns_as_macros): Likewise.
* listing.c (debugging_pseudo): Likewise.
* read.c (s_mri_common, stringer): Likewise.
* config/obj-coff.c (coff_frob_section): Likewise.
* config/tc-alpha.c (emit_ldgp, s_alpha_proc): Likewise.
* config/tc-arm.c (my_get_expression): Likewise.
* config/tc-hppa.c (process_exit, pa_type_args): Likewise.
* config/tc-m32c.c (md_assemble): Likewise.
* config/tc-microblaze.c (md_convert_frag): Likewise.
* config/tc-mips.c (s_change_section): Likewise.
* config/tc-mt.c (mt_fix_adjustable): Likewise.
* config/tc-xtensa.c (xtensa_literal_pseudo): Likewise.
* config/obj-aout.c (obj_aout_frob_symbol): Delete set but otherwise
unused vars.
* config/tc-alpha.c (load_expression): Likewise.
(s_alpha_rdata, s_alpha_section, s_alpha_prologue): Likewise.
* config/tc-arm.c (parse_neon_el_struct_list): Likewise.
* config/tc-avr.c (extract_word): Likewise.
* config/tc-cris.c (cris_get_expression): Likewise.
* config/tc-d30v.c (build_insn, find_format): Likewise.
* config/tc-dlx.c (machine_ip): Likewise.
* config/tc-hppa.c (pa_get_absolute_expression): Likewise.
* config/tc-i370.c (md_assemble): Likewise.
* config/tc-i960.c (brtab_emit): Likewise.
* config/tc-iq2000.c (s_iq2000_ent): Likewise.
* config/tc-m32c.c (md_convert_frag): Likewise.
* config/tc-m68hc11.c (fixup24, build_jump_insn): Likewise.
(md_estimate_size_before_relax, md_apply_fix): Likewise.
* config/tc-m68k.c (md_show_usage): Likewise.
* config/tc-microblaze.c (microblaze_s_lcomm): Likewise.
* config/tc-mips.c (s_mips_end): Likewise.
* config/tc-mmix.c (mmix_byte, mmix_cons): Likewise.
* config/tc-mn10300.c (md_assemble): Likewise.
* config/tc-msp430.c (extract_word): Likewise.
* config/tc-mt.c (md_assemble): Likewise.
* config/tc-or32.c (machine_ip): Likewise.
* config/tc-pj.c (md_apply_fix): Likewise.
* config/tc-s390.c (md_gather_operands): Likewise.
* config/tc-sh.c (sh_cons_align): Likewise.
* config/tc-sparc.c (sparc_cons_align): Likewise.
* config/tc-tic4x.c (tic4x_sect): Likewise.
* config/tc-tic54x.c (tic54x_stringer): Likewise.
* config/tc-vax.c (vip_op): Likewise.
* config/tc-xstormy16.c (xstormy16_cons_fix_new): Likewise.
* config/tc-xtensa.c (md_assemble): Likewise.
(xtensa_fix_short_loop_frags, convert_frag_immed): Likewise.
(xtensa_move_literals): Likewise.
2010-06-28 16:06:57 +02:00
|
|
|
for (op_end = from; *op_end != 0 && is_part_of_name (*op_end);)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
to[size++] = *op_end++;
|
|
|
|
if (size + 1 >= limit)
|
|
|
|
break;
|
|
|
|
}
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
to[size] = 0;
|
|
|
|
return op_end;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2005-10-12 12:56:46 +02:00
|
|
|
md_estimate_size_before_relax (fragS *fragp ATTRIBUTE_UNUSED,
|
|
|
|
asection *seg ATTRIBUTE_UNUSED)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
abort ();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-10-12 12:56:46 +02:00
|
|
|
md_show_usage (FILE *stream)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2000-07-04 00:25:33 +02:00
|
|
|
fprintf (stream,
|
2011-03-21 21:25:56 +01:00
|
|
|
_("AVR Assembler options:\n"
|
2000-03-27 10:39:14 +02:00
|
|
|
" -mmcu=[avr-name] select microcontroller variant\n"
|
|
|
|
" [avr-name] can be:\n"
|
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.
include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.
ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.
2008-08-09 07:35:13 +02:00
|
|
|
" avr1 - classic AVR core without data RAM\n"
|
|
|
|
" avr2 - classic AVR core with up to 8K program memory\n"
|
|
|
|
" avr25 - classic AVR core with up to 8K program memory\n"
|
|
|
|
" plus the MOVW instruction\n"
|
|
|
|
" avr3 - classic AVR core with up to 64K program memory\n"
|
|
|
|
" avr31 - classic AVR core with up to 128K program memory\n"
|
|
|
|
" avr35 - classic AVR core with up to 64K program memory\n"
|
|
|
|
" plus the MOVW instruction\n"
|
|
|
|
" avr4 - enhanced AVR core with up to 8K program memory\n"
|
|
|
|
" avr5 - enhanced AVR core with up to 64K program memory\n"
|
|
|
|
" avr51 - enhanced AVR core with up to 128K program memory\n"
|
|
|
|
" avr6 - enhanced AVR core with up to 256K program memory\n"
|
2013-07-18 13:52:47 +02:00
|
|
|
" avrxmega2 - XMEGA, > 8K, < 64K FLASH, < 64K RAM\n"
|
Update assembler documentation on some AVR cores.
PR 21472
* config/tc-avr.c (mcu_types): Add entries for: attiny212,
attiny214, attiny412, attiny414, attiny814, attiny1614,
attiny1616, attiny1617, attiny3214, attiny3216, attiny3217.
(md_show_usage): Adjust doc for "avrxmega3".
* doc/c-avr.texi (AVR options) [-mmcu=]: Adjust doc for avrxmega3.
Add MCUs: attiny212, attiny214, attiny412, attiny414, attiny416,
attiny417, attiny814, attiny816, attiny817, attiny1614,
attiny1616, attiny1617, attiny3214, attiny3216, attiny3217.
2017-07-17 11:23:10 +02:00
|
|
|
" avrxmega3 - XMEGA, RAM + FLASH < 64K, Flash visible in RAM\n"
|
2011-03-22 19:10:48 +01:00
|
|
|
" avrxmega4 - XMEGA, > 64K, <= 128K FLASH, <= 64K RAM\n"
|
|
|
|
" avrxmega5 - XMEGA, > 64K, <= 128K FLASH, > 64K RAM\n"
|
|
|
|
" avrxmega6 - XMEGA, > 128K, <= 256K FLASH, <= 64K RAM\n"
|
|
|
|
" avrxmega7 - XMEGA, > 128K, <= 256K FLASH, > 64K RAM\n"
|
2014-07-01 11:20:17 +02:00
|
|
|
" avrtiny - AVR Tiny core with 16 gp registers\n"));
|
2000-07-04 00:25:33 +02:00
|
|
|
fprintf (stream,
|
|
|
|
_(" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n"
|
|
|
|
" -mno-skip-bug disable warnings for skipping two-word instructions\n"
|
|
|
|
" (default for avr4, avr5)\n"
|
|
|
|
" -mno-wrap reject rjmp/rcall instructions with 8K wrap-around\n"
|
2014-03-29 06:53:16 +01:00
|
|
|
" (default for avr3, avr5)\n"
|
|
|
|
" -mrmw accept Read-Modify-Write instructions\n"
|
2014-10-27 11:51:17 +01:00
|
|
|
" -mlink-relax generate relocations for linker relaxation (default)\n"
|
|
|
|
" -mno-link-relax don't generate relocations for linker relaxation.\n"
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
" -mgcc-isr accept the __gcc_isr pseudo-instruction.\n"
|
2014-10-27 11:51:17 +01:00
|
|
|
));
|
2000-07-04 00:25:33 +02:00
|
|
|
show_mcu_list (stream);
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2005-10-12 12:56:46 +02:00
|
|
|
avr_set_arch (int dummy ATTRIBUTE_UNUSED)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2005-10-12 12:56:46 +02:00
|
|
|
char str[20];
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
input_line_pointer = extract_word (input_line_pointer, str, 20);
|
2000-07-04 00:25:33 +02:00
|
|
|
md_parse_option (OPTION_MMCU, str);
|
2000-03-27 10:39:14 +02:00
|
|
|
bfd_set_arch_mach (stdoutput, TARGET_ARCH, avr_mcu->mach);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2016-02-27 15:35:32 +01:00
|
|
|
md_parse_option (int c, const char *arg)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2000-07-04 00:25:33 +02:00
|
|
|
switch (c)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2000-07-04 00:25:33 +02:00
|
|
|
case OPTION_MMCU:
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; mcu_types[i].name; ++i)
|
2016-04-02 13:57:10 +02:00
|
|
|
if (strcasecmp (mcu_types[i].name, arg) == 0)
|
2000-07-04 00:25:33 +02:00
|
|
|
break;
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2000-07-04 00:25:33 +02:00
|
|
|
if (!mcu_types[i].name)
|
|
|
|
{
|
|
|
|
show_mcu_list (stderr);
|
|
|
|
as_fatal (_("unknown MCU: %s\n"), arg);
|
|
|
|
}
|
2000-06-27 03:45:30 +02:00
|
|
|
|
2000-07-04 00:25:33 +02:00
|
|
|
/* It is OK to redefine mcu type within the same avr[1-5] bfd machine
|
|
|
|
type - this for allows passing -mmcu=... via gcc ASM_SPEC as well
|
|
|
|
as .arch ... in the asm output at the same time. */
|
|
|
|
if (avr_mcu == &default_mcu || avr_mcu->mach == mcu_types[i].mach)
|
2016-03-21 17:31:46 +01:00
|
|
|
{
|
|
|
|
specified_mcu.name = mcu_types[i].name;
|
|
|
|
specified_mcu.isa |= mcu_types[i].isa;
|
|
|
|
specified_mcu.mach = mcu_types[i].mach;
|
|
|
|
avr_mcu = &specified_mcu;
|
|
|
|
}
|
2000-07-04 00:25:33 +02:00
|
|
|
else
|
|
|
|
as_fatal (_("redefinition of mcu type `%s' to `%s'"),
|
|
|
|
avr_mcu->name, mcu_types[i].name);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
case OPTION_ALL_OPCODES:
|
|
|
|
avr_opt.all_opcodes = 1;
|
|
|
|
return 1;
|
|
|
|
case OPTION_NO_SKIP_BUG:
|
|
|
|
avr_opt.no_skip_bug = 1;
|
|
|
|
return 1;
|
|
|
|
case OPTION_NO_WRAP:
|
|
|
|
avr_opt.no_wrap = 1;
|
2000-03-27 10:39:14 +02:00
|
|
|
return 1;
|
2014-03-29 06:53:16 +01:00
|
|
|
case OPTION_ISA_RMW:
|
|
|
|
specified_mcu.isa |= AVR_ISA_RMW;
|
|
|
|
return 1;
|
2014-04-10 17:50:33 +02:00
|
|
|
case OPTION_LINK_RELAX:
|
2014-10-27 11:51:17 +01:00
|
|
|
avr_opt.no_link_relax = 0;
|
|
|
|
return 1;
|
|
|
|
case OPTION_NO_LINK_RELAX:
|
|
|
|
avr_opt.no_link_relax = 1;
|
2014-04-10 17:50:33 +02:00
|
|
|
return 1;
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
case OPTION_HAVE_GCCISR:
|
|
|
|
avr_opt.have_gccisr = 1;
|
|
|
|
return 1;
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
|
|
|
|
/* Implement `md_undefined_symbol' */
|
|
|
|
/* If we are in `__gcc_isr' chunk, pop up `__gcc_isr.n_pushed.<NUM>'
|
|
|
|
instead of `__gcc_isr.n_pushed'. This will be resolved by the Done
|
|
|
|
chunk in `avr_patch_gccisr_frag' to the number of PUSHes produced by
|
|
|
|
the Prologue chunk. */
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
symbolS *
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
avr_undefined_symbol (char *name)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
if (ISR_CHUNK_Done != avr_isr.prev_chunk
|
|
|
|
&& 0 == strcmp (name, "__gcc_isr.n_pushed"))
|
|
|
|
{
|
|
|
|
if (!avr_isr.sym_n_pushed)
|
|
|
|
{
|
|
|
|
static unsigned suffix;
|
|
|
|
char xname[30];
|
|
|
|
sprintf (xname, "%s.%03u", name, (++suffix) % 1000);
|
|
|
|
avr_isr.sym_n_pushed = symbol_new (xname, undefined_section,
|
|
|
|
(valueT) 0, &zero_address_frag);
|
|
|
|
}
|
|
|
|
return avr_isr.sym_n_pushed;
|
|
|
|
}
|
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
return NULL;
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
|
2016-04-01 14:07:50 +02:00
|
|
|
const char *
|
2005-10-12 12:56:46 +02:00
|
|
|
md_atof (int type, char *litP, int *sizeP)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2007-10-17 18:45:56 +02:00
|
|
|
return ieee_md_atof (type, litP, sizeP, FALSE);
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-10-12 12:56:46 +02:00
|
|
|
md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
|
|
|
|
asection *sec ATTRIBUTE_UNUSED,
|
|
|
|
fragS *fragP ATTRIBUTE_UNUSED)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
abort ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-10-12 12:56:46 +02:00
|
|
|
md_begin (void)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2000-05-01 13:14:05 +02:00
|
|
|
unsigned int i;
|
2000-03-27 10:39:14 +02:00
|
|
|
struct avr_opcodes_s *opcode;
|
2005-10-12 12:56:46 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
avr_hash = hash_new ();
|
2000-03-27 10:39:14 +02:00
|
|
|
|
|
|
|
/* Insert unique names into hash table. This hash table then provides a
|
|
|
|
quick index to the first opcode with a particular name in the opcode
|
|
|
|
table. */
|
|
|
|
for (opcode = avr_opcodes; opcode->name; opcode++)
|
|
|
|
hash_insert (avr_hash, opcode->name, (char *) opcode);
|
|
|
|
|
|
|
|
avr_mod_hash = hash_new ();
|
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
for (i = 0; i < ARRAY_SIZE (exp_mod); ++i)
|
2006-01-11 18:39:50 +01:00
|
|
|
{
|
|
|
|
mod_index m;
|
|
|
|
|
|
|
|
m.index = i + 10;
|
|
|
|
hash_insert (avr_mod_hash, EXP_MOD_NAME (i), m.ptr);
|
|
|
|
}
|
2000-07-28 02:42:18 +02:00
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
avr_no_sreg_hash = hash_new ();
|
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE (avr_no_sreg); ++i)
|
|
|
|
{
|
|
|
|
gas_assert (hash_find (avr_hash, avr_no_sreg[i]));
|
|
|
|
hash_insert (avr_no_sreg_hash, avr_no_sreg[i], (char*) 4 /* dummy */);
|
|
|
|
}
|
|
|
|
|
|
|
|
avr_gccisr_opcode = (struct avr_opcodes_s*) hash_find (avr_hash, "__gcc_isr");
|
|
|
|
gas_assert (avr_gccisr_opcode);
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
bfd_set_arch_mach (stdoutput, TARGET_ARCH, avr_mcu->mach);
|
2014-10-27 11:51:17 +01:00
|
|
|
linkrelax = !avr_opt.no_link_relax;
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
|
2000-05-01 13:14:05 +02:00
|
|
|
/* Resolve STR as a constant expression and return the result.
|
2000-07-28 02:42:18 +02:00
|
|
|
If result greater than MAX then error. */
|
2000-05-01 13:14:05 +02:00
|
|
|
|
|
|
|
static unsigned int
|
2005-10-12 12:56:46 +02:00
|
|
|
avr_get_constant (char *str, int max)
|
2000-05-01 13:14:05 +02:00
|
|
|
{
|
|
|
|
expressionS ex;
|
2005-10-12 12:56:46 +02:00
|
|
|
|
2000-05-01 13:14:05 +02:00
|
|
|
str = skip_space (str);
|
|
|
|
input_line_pointer = str;
|
2005-10-12 12:56:46 +02:00
|
|
|
expression (& ex);
|
2000-05-01 13:14:05 +02:00
|
|
|
|
|
|
|
if (ex.X_op != O_constant)
|
|
|
|
as_bad (_("constant value required"));
|
|
|
|
|
|
|
|
if (ex.X_add_number > max || ex.X_add_number < 0)
|
2007-10-03 16:35:06 +02:00
|
|
|
as_bad (_("number must be positive and less than %d"), max + 1);
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-05-01 13:14:05 +02:00
|
|
|
return ex.X_add_number;
|
|
|
|
}
|
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
/* Parse for ldd/std offset. */
|
2000-05-01 13:14:05 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
static void
|
|
|
|
avr_offset_expression (expressionS *exp)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2005-10-12 12:56:46 +02:00
|
|
|
char *str = input_line_pointer;
|
|
|
|
char *tmp;
|
|
|
|
char op[8];
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
tmp = str;
|
|
|
|
str = extract_word (str, op, sizeof (op));
|
|
|
|
|
|
|
|
input_line_pointer = tmp;
|
|
|
|
expression (exp);
|
|
|
|
|
|
|
|
/* Warn about expressions that fail to use lo8 (). */
|
|
|
|
if (exp->X_op == O_constant)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2005-10-12 12:56:46 +02:00
|
|
|
int x = exp->X_add_number;
|
2006-05-24 09:36:12 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
if (x < -255 || x > 255)
|
|
|
|
as_warn (_("constant out of 8-bit range: %d"), x);
|
|
|
|
}
|
|
|
|
}
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
/* Parse ordinary expression. */
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
static char *
|
|
|
|
parse_exp (char *s, expressionS *op)
|
|
|
|
{
|
|
|
|
input_line_pointer = s;
|
|
|
|
expression (op);
|
|
|
|
if (op->X_op == O_absent)
|
|
|
|
as_bad (_("missing operand"));
|
|
|
|
return input_line_pointer;
|
|
|
|
}
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
/* Parse special expressions (needed for LDI command):
|
|
|
|
xx8 (address)
|
|
|
|
xx8 (-address)
|
|
|
|
pm_xx8 (address)
|
|
|
|
pm_xx8 (-address)
|
|
|
|
where xx is: hh, hi, lo. */
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
static bfd_reloc_code_real_type
|
|
|
|
avr_ldi_expression (expressionS *exp)
|
|
|
|
{
|
|
|
|
char *str = input_line_pointer;
|
|
|
|
char *tmp;
|
|
|
|
char op[8];
|
|
|
|
int mod;
|
2006-05-24 09:36:12 +02:00
|
|
|
int linker_stubs_should_be_generated = 0;
|
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
tmp = str;
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
str = extract_word (str, op, sizeof (op));
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
if (op[0])
|
|
|
|
{
|
2006-01-11 18:39:50 +01:00
|
|
|
mod_index m;
|
2006-05-24 09:36:12 +02:00
|
|
|
|
2006-01-11 18:39:50 +01:00
|
|
|
m.ptr = hash_find (avr_mod_hash, op);
|
|
|
|
mod = m.index;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
if (mod)
|
|
|
|
{
|
|
|
|
int closes = 0;
|
2000-05-01 10:48:32 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
mod -= 10;
|
|
|
|
str = skip_space (str);
|
2000-07-04 00:25:33 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
if (*str == '(')
|
|
|
|
{
|
2006-05-24 09:36:12 +02:00
|
|
|
bfd_reloc_code_real_type reloc_to_return;
|
2005-10-12 12:56:46 +02:00
|
|
|
int neg_p = 0;
|
2000-07-04 00:25:33 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
++str;
|
2000-07-04 00:25:33 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
if (strncmp ("pm(", str, 3) == 0
|
2006-05-24 09:36:12 +02:00
|
|
|
|| strncmp ("gs(",str,3) == 0
|
|
|
|
|| strncmp ("-(gs(",str,5) == 0
|
2005-10-12 12:56:46 +02:00
|
|
|
|| strncmp ("-(pm(", str, 5) == 0)
|
|
|
|
{
|
|
|
|
if (HAVE_PM_P (mod))
|
|
|
|
{
|
|
|
|
++mod;
|
|
|
|
++closes;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
as_bad (_("illegal expression"));
|
2000-05-01 10:48:32 +02:00
|
|
|
|
2006-05-24 09:36:12 +02:00
|
|
|
if (str[0] == 'g' || str[2] == 'g')
|
|
|
|
linker_stubs_should_be_generated = 1;
|
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
if (*str == '-')
|
|
|
|
{
|
|
|
|
neg_p = 1;
|
|
|
|
++closes;
|
|
|
|
str += 5;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
str += 3;
|
|
|
|
}
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
if (*str == '-' && *(str + 1) == '(')
|
|
|
|
{
|
|
|
|
neg_p ^= 1;
|
|
|
|
++closes;
|
|
|
|
str += 2;
|
|
|
|
}
|
2004-12-22 15:25:42 +01:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
input_line_pointer = str;
|
|
|
|
expression (exp);
|
2004-12-22 15:25:42 +01:00
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
do
|
|
|
|
{
|
|
|
|
if (*input_line_pointer != ')')
|
|
|
|
{
|
|
|
|
as_bad (_("`)' required"));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
input_line_pointer++;
|
|
|
|
}
|
|
|
|
while (closes--);
|
|
|
|
|
2006-05-24 09:36:12 +02:00
|
|
|
reloc_to_return =
|
|
|
|
neg_p ? EXP_MOD_NEG_RELOC (mod) : EXP_MOD_RELOC (mod);
|
|
|
|
if (linker_stubs_should_be_generated)
|
|
|
|
{
|
|
|
|
switch (reloc_to_return)
|
|
|
|
{
|
|
|
|
case BFD_RELOC_AVR_LO8_LDI_PM:
|
|
|
|
reloc_to_return = BFD_RELOC_AVR_LO8_LDI_GS;
|
|
|
|
break;
|
|
|
|
case BFD_RELOC_AVR_HI8_LDI_PM:
|
|
|
|
reloc_to_return = BFD_RELOC_AVR_HI8_LDI_GS;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2008-05-30 16:20:27 +02:00
|
|
|
/* PR 5523: Do not generate a warning here,
|
|
|
|
legitimate code can trigger this case. */
|
|
|
|
break;
|
2006-05-24 09:36:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return reloc_to_return;
|
2005-10-12 12:56:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2004-12-22 15:25:42 +01:00
|
|
|
|
|
|
|
input_line_pointer = tmp;
|
|
|
|
expression (exp);
|
|
|
|
|
|
|
|
/* Warn about expressions that fail to use lo8 (). */
|
|
|
|
if (exp->X_op == O_constant)
|
|
|
|
{
|
|
|
|
int x = exp->X_add_number;
|
2005-10-12 12:56:46 +02:00
|
|
|
|
2004-12-22 15:25:42 +01:00
|
|
|
if (x < -255 || x > 255)
|
|
|
|
as_warn (_("constant out of 8-bit range: %d"), x);
|
|
|
|
}
|
2005-10-12 12:56:46 +02:00
|
|
|
|
|
|
|
return BFD_RELOC_AVR_LDI;
|
2004-12-22 15:25:42 +01:00
|
|
|
}
|
|
|
|
|
2000-05-01 13:14:05 +02:00
|
|
|
/* Parse one instruction operand.
|
2000-07-28 02:42:18 +02:00
|
|
|
Return operand bitmask. Also fixups can be generated. */
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
static unsigned int
|
2005-10-12 12:56:46 +02:00
|
|
|
avr_operand (struct avr_opcodes_s *opcode,
|
|
|
|
int where,
|
2016-02-25 17:55:21 +01:00
|
|
|
const char *op,
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
char **line,
|
|
|
|
int *pregno)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
expressionS op_expr;
|
2000-05-01 13:14:05 +02:00
|
|
|
unsigned int op_mask = 0;
|
|
|
|
char *str = skip_space (*line);
|
2000-03-27 10:39:14 +02:00
|
|
|
|
|
|
|
switch (*op)
|
|
|
|
{
|
|
|
|
/* Any register operand. */
|
|
|
|
case 'w':
|
|
|
|
case 'd':
|
|
|
|
case 'r':
|
2000-05-01 10:48:32 +02:00
|
|
|
case 'a':
|
|
|
|
case 'v':
|
2014-07-07 17:15:19 +02:00
|
|
|
{
|
|
|
|
char * old_str = str;
|
|
|
|
char *lower;
|
|
|
|
char r_name[20];
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2014-07-07 17:15:19 +02:00
|
|
|
str = extract_word (str, r_name, sizeof (r_name));
|
|
|
|
for (lower = r_name; *lower; ++lower)
|
|
|
|
{
|
|
|
|
if (*lower >= 'A' && *lower <= 'Z')
|
|
|
|
*lower += 'a' - 'A';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (r_name[0] == 'r' && ISDIGIT (r_name[1]) && r_name[2] == 0)
|
|
|
|
/* Single-digit register number, ie r0-r9. */
|
|
|
|
op_mask = r_name[1] - '0';
|
|
|
|
else if (r_name[0] == 'r' && ISDIGIT (r_name[1])
|
|
|
|
&& ISDIGIT (r_name[2]) && r_name[3] == 0)
|
|
|
|
/* Double-digit register number, ie r10 - r32. */
|
|
|
|
op_mask = (r_name[1] - '0') * 10 + r_name[2] - '0';
|
|
|
|
else if (r_name[0] >= 'x' && r_name[0] <= 'z'
|
|
|
|
&& (r_name[1] == 'l' || r_name[1] == 'h') && r_name[2] == 0)
|
|
|
|
/* Registers r26-r31 referred to by name, ie xl, xh, yl, yh, zl, zh. */
|
|
|
|
op_mask = (r_name[0] - 'x') * 2 + (r_name[1] == 'h') + 26;
|
|
|
|
else if ((*op == 'v' || *op == 'w')
|
|
|
|
&& r_name[0] >= 'x' && r_name[0] <= 'z' && r_name[1] == 0)
|
|
|
|
/* For the movw and addiw instructions, refer to registers x, y and z by name. */
|
|
|
|
op_mask = (r_name[0] - 'x') * 2 + 26;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Numeric or symbolic constant register number. */
|
|
|
|
op_mask = avr_get_constant (old_str, 31);
|
|
|
|
str = input_line_pointer;
|
|
|
|
}
|
|
|
|
}
|
2014-07-01 11:20:17 +02:00
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
if (pregno)
|
|
|
|
*pregno = op_mask;
|
|
|
|
|
2014-07-01 11:20:17 +02:00
|
|
|
if (avr_mcu->mach == bfd_mach_avrtiny)
|
|
|
|
{
|
|
|
|
if (op_mask < 16 || op_mask > 31)
|
|
|
|
{
|
|
|
|
as_bad (_("register name or number from 16 to 31 required"));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (op_mask > 31)
|
|
|
|
{
|
|
|
|
as_bad (_("register name or number from 0 to 31 required"));
|
|
|
|
break;
|
|
|
|
}
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
switch (*op)
|
|
|
|
{
|
|
|
|
case 'a':
|
|
|
|
if (op_mask < 16 || op_mask > 23)
|
|
|
|
as_bad (_("register r16-r23 required"));
|
|
|
|
op_mask -= 16;
|
|
|
|
break;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
case 'd':
|
|
|
|
if (op_mask < 16)
|
|
|
|
as_bad (_("register number above 15 required"));
|
|
|
|
op_mask -= 16;
|
|
|
|
break;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
case 'v':
|
|
|
|
if (op_mask & 1)
|
|
|
|
as_bad (_("even register number required"));
|
|
|
|
op_mask >>= 1;
|
|
|
|
break;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
case 'w':
|
2000-08-06 16:03:58 +02:00
|
|
|
if ((op_mask & 1) || op_mask < 24)
|
2000-07-28 02:42:18 +02:00
|
|
|
as_bad (_("register r24, r26, r28 or r30 required"));
|
2000-08-06 16:03:58 +02:00
|
|
|
op_mask = (op_mask - 24) >> 1;
|
2000-07-28 02:42:18 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
2000-03-27 10:39:14 +02:00
|
|
|
|
|
|
|
case 'e':
|
|
|
|
{
|
|
|
|
char c;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
if (*str == '-')
|
|
|
|
{
|
2000-07-28 02:42:18 +02:00
|
|
|
str = skip_space (str + 1);
|
2000-03-27 10:39:14 +02:00
|
|
|
op_mask = 0x1002;
|
|
|
|
}
|
2001-09-19 07:33:36 +02:00
|
|
|
c = TOLOWER (*str);
|
2000-03-27 10:39:14 +02:00
|
|
|
if (c == 'x')
|
|
|
|
op_mask |= 0x100c;
|
|
|
|
else if (c == 'y')
|
|
|
|
op_mask |= 0x8;
|
|
|
|
else if (c != 'z')
|
2000-07-04 00:25:33 +02:00
|
|
|
as_bad (_("pointer register (X, Y or Z) required"));
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
str = skip_space (str + 1);
|
2000-03-27 10:39:14 +02:00
|
|
|
if (*str == '+')
|
|
|
|
{
|
|
|
|
++str;
|
|
|
|
if (op_mask & 2)
|
2000-07-04 00:25:33 +02:00
|
|
|
as_bad (_("cannot both predecrement and postincrement"));
|
2000-03-27 10:39:14 +02:00
|
|
|
op_mask |= 0x1001;
|
|
|
|
}
|
2000-06-07 20:56:15 +02:00
|
|
|
|
2000-06-07 19:42:44 +02:00
|
|
|
/* avr1 can do "ld r,Z" and "st Z,r" but no other pointer
|
2000-06-07 20:56:15 +02:00
|
|
|
registers, no predecrement, no postincrement. */
|
2000-07-04 00:25:33 +02:00
|
|
|
if (!avr_opt.all_opcodes && (op_mask & 0x100F)
|
|
|
|
&& !(avr_mcu->isa & AVR_ISA_SRAM))
|
|
|
|
as_bad (_("addressing mode not supported"));
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2000-05-01 10:48:32 +02:00
|
|
|
case 'z':
|
2000-07-28 02:42:18 +02:00
|
|
|
if (*str == '-')
|
|
|
|
as_bad (_("can't predecrement"));
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
if (! (*str == 'z' || *str == 'Z'))
|
|
|
|
as_bad (_("pointer register Z required"));
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
str = skip_space (str + 1);
|
|
|
|
|
|
|
|
if (*str == '+')
|
|
|
|
{
|
|
|
|
++str;
|
2016-02-25 17:55:21 +01:00
|
|
|
const char *s;
|
2011-03-22 19:10:48 +01:00
|
|
|
for (s = opcode->opcode; *s; ++s)
|
|
|
|
{
|
|
|
|
if (*s == '+')
|
|
|
|
op_mask |= (1 << (15 - (s - opcode->opcode)));
|
|
|
|
}
|
2000-07-28 02:42:18 +02:00
|
|
|
}
|
2008-02-14 14:04:29 +01:00
|
|
|
|
|
|
|
/* attiny26 can do "lpm" and "lpm r,Z" but not "lpm r,Z+". */
|
|
|
|
if (!avr_opt.all_opcodes
|
|
|
|
&& (op_mask & 0x0001)
|
|
|
|
&& !(avr_mcu->isa & AVR_ISA_MOVW))
|
|
|
|
as_bad (_("postincrement not supported"));
|
2000-05-01 10:48:32 +02:00
|
|
|
break;
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
case 'b':
|
|
|
|
{
|
2001-09-19 07:33:36 +02:00
|
|
|
char c = TOLOWER (*str++);
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
if (c == 'y')
|
|
|
|
op_mask |= 0x8;
|
|
|
|
else if (c != 'z')
|
2000-07-04 00:25:33 +02:00
|
|
|
as_bad (_("pointer register (Y or Z) required"));
|
2000-03-27 10:39:14 +02:00
|
|
|
str = skip_space (str);
|
|
|
|
if (*str++ == '+')
|
|
|
|
{
|
2004-12-22 15:25:42 +01:00
|
|
|
input_line_pointer = str;
|
|
|
|
avr_offset_expression (& op_expr);
|
2000-03-27 10:39:14 +02:00
|
|
|
str = input_line_pointer;
|
2004-12-22 15:25:42 +01:00
|
|
|
fix_new_exp (frag_now, where, 3,
|
|
|
|
&op_expr, FALSE, BFD_RELOC_AVR_6);
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'h':
|
2000-07-28 02:42:18 +02:00
|
|
|
str = parse_exp (str, &op_expr);
|
|
|
|
fix_new_exp (frag_now, where, opcode->insn_size * 2,
|
2002-11-30 09:39:46 +01:00
|
|
|
&op_expr, FALSE, BFD_RELOC_AVR_CALL);
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'L':
|
2000-07-28 02:42:18 +02:00
|
|
|
str = parse_exp (str, &op_expr);
|
|
|
|
fix_new_exp (frag_now, where, opcode->insn_size * 2,
|
2002-11-30 09:39:46 +01:00
|
|
|
&op_expr, TRUE, BFD_RELOC_AVR_13_PCREL);
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'l':
|
2000-07-28 02:42:18 +02:00
|
|
|
str = parse_exp (str, &op_expr);
|
|
|
|
fix_new_exp (frag_now, where, opcode->insn_size * 2,
|
2002-11-30 09:39:46 +01:00
|
|
|
&op_expr, TRUE, BFD_RELOC_AVR_7_PCREL);
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'i':
|
2000-07-28 02:42:18 +02:00
|
|
|
str = parse_exp (str, &op_expr);
|
|
|
|
fix_new_exp (frag_now, where + 2, opcode->insn_size * 2,
|
2002-11-30 09:39:46 +01:00
|
|
|
&op_expr, FALSE, BFD_RELOC_16);
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
|
|
|
|
2014-07-01 11:20:17 +02:00
|
|
|
case 'j':
|
|
|
|
str = parse_exp (str, &op_expr);
|
|
|
|
fix_new_exp (frag_now, where, opcode->insn_size * 2,
|
|
|
|
&op_expr, FALSE, BFD_RELOC_AVR_LDS_STS_16);
|
|
|
|
break;
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
case 'M':
|
|
|
|
{
|
|
|
|
bfd_reloc_code_real_type r_type;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
input_line_pointer = str;
|
|
|
|
r_type = avr_ldi_expression (&op_expr);
|
|
|
|
str = input_line_pointer;
|
2000-03-27 10:39:14 +02:00
|
|
|
fix_new_exp (frag_now, where, 3,
|
2002-11-30 09:39:46 +01:00
|
|
|
&op_expr, FALSE, r_type);
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'n':
|
|
|
|
{
|
|
|
|
unsigned int x;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
x = ~avr_get_constant (str, 255);
|
|
|
|
str = input_line_pointer;
|
|
|
|
op_mask |= (x & 0xf) | ((x << 4) & 0xf00);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
case 'N':
|
|
|
|
{
|
|
|
|
unsigned int x;
|
|
|
|
|
|
|
|
x = avr_get_constant (str, 255);
|
|
|
|
str = input_line_pointer;
|
|
|
|
op_mask = x;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
case 'K':
|
2004-12-22 15:25:42 +01:00
|
|
|
input_line_pointer = str;
|
|
|
|
avr_offset_expression (& op_expr);
|
|
|
|
str = input_line_pointer;
|
|
|
|
fix_new_exp (frag_now, where, 3,
|
|
|
|
& op_expr, FALSE, BFD_RELOC_AVR_6_ADIW);
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'S':
|
|
|
|
case 's':
|
|
|
|
{
|
|
|
|
unsigned int x;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
x = avr_get_constant (str, 7);
|
|
|
|
str = input_line_pointer;
|
|
|
|
if (*op == 'S')
|
|
|
|
x <<= 4;
|
|
|
|
op_mask |= x;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'P':
|
2014-07-07 17:15:19 +02:00
|
|
|
str = parse_exp (str, &op_expr);
|
|
|
|
fix_new_exp (frag_now, where, opcode->insn_size * 2,
|
|
|
|
&op_expr, FALSE, BFD_RELOC_AVR_PORT6);
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'p':
|
2014-07-07 17:15:19 +02:00
|
|
|
str = parse_exp (str, &op_expr);
|
|
|
|
fix_new_exp (frag_now, where, opcode->insn_size * 2,
|
|
|
|
&op_expr, FALSE, BFD_RELOC_AVR_PORT5);
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2011-03-22 19:10:48 +01:00
|
|
|
case 'E':
|
|
|
|
{
|
|
|
|
unsigned int x;
|
|
|
|
|
|
|
|
x = avr_get_constant (str, 15);
|
|
|
|
str = input_line_pointer;
|
|
|
|
op_mask |= (x << 4);
|
|
|
|
}
|
|
|
|
break;
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
|
2000-06-07 19:42:44 +02:00
|
|
|
case '?':
|
|
|
|
break;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
default:
|
2000-07-04 00:25:33 +02:00
|
|
|
as_bad (_("unknown constraint `%c'"), *op);
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
*line = str;
|
|
|
|
return op_mask;
|
|
|
|
}
|
|
|
|
|
2017-10-19 17:21:51 +02:00
|
|
|
/* TC_FRAG_INIT hook */
|
|
|
|
|
|
|
|
void
|
|
|
|
avr_frag_init (fragS *frag)
|
|
|
|
{
|
|
|
|
memset (& frag->tc_frag_data, 0, sizeof frag->tc_frag_data);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
/* Parse instruction operands.
|
|
|
|
Return binary opcode. */
|
|
|
|
|
|
|
|
static unsigned int
|
|
|
|
avr_operands (struct avr_opcodes_s *opcode, char **line)
|
|
|
|
{
|
2016-02-25 17:55:21 +01:00
|
|
|
const char *op = opcode->constraints;
|
2005-10-12 12:56:46 +02:00
|
|
|
unsigned int bin = opcode->bin_opcode;
|
|
|
|
char *frag = frag_more (opcode->insn_size * 2);
|
|
|
|
char *str = *line;
|
|
|
|
int where = frag - frag_now->fr_literal;
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
int regno1 = -2;
|
|
|
|
int regno2 = -2;
|
2005-10-12 12:56:46 +02:00
|
|
|
|
|
|
|
/* Opcode have operands. */
|
|
|
|
if (*op)
|
|
|
|
{
|
|
|
|
unsigned int reg1 = 0;
|
|
|
|
unsigned int reg2 = 0;
|
|
|
|
int reg1_present = 0;
|
|
|
|
int reg2_present = 0;
|
|
|
|
|
|
|
|
/* Parse first operand. */
|
|
|
|
if (REGISTER_P (*op))
|
|
|
|
reg1_present = 1;
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
reg1 = avr_operand (opcode, where, op, &str, ®no1);
|
2005-10-12 12:56:46 +02:00
|
|
|
++op;
|
|
|
|
|
|
|
|
/* Parse second operand. */
|
|
|
|
if (*op)
|
|
|
|
{
|
|
|
|
if (*op == ',')
|
|
|
|
++op;
|
|
|
|
|
|
|
|
if (*op == '=')
|
|
|
|
{
|
|
|
|
reg2 = reg1;
|
|
|
|
reg2_present = 1;
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
regno2 = regno1;
|
2005-10-12 12:56:46 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (REGISTER_P (*op))
|
|
|
|
reg2_present = 1;
|
|
|
|
|
|
|
|
str = skip_space (str);
|
|
|
|
if (*str++ != ',')
|
|
|
|
as_bad (_("`,' required"));
|
|
|
|
str = skip_space (str);
|
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
reg2 = avr_operand (opcode, where, op, &str, ®no2);
|
2005-10-12 12:56:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (reg1_present && reg2_present)
|
|
|
|
reg2 = (reg2 & 0xf) | ((reg2 << 5) & 0x200);
|
|
|
|
else if (reg2_present)
|
|
|
|
reg2 <<= 4;
|
|
|
|
}
|
|
|
|
if (reg1_present)
|
|
|
|
reg1 <<= 4;
|
|
|
|
bin |= reg1 | reg2;
|
|
|
|
}
|
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
if (avr_opt.have_gccisr)
|
|
|
|
avr_update_gccisr (opcode, regno1, regno2);
|
|
|
|
|
2005-10-12 12:56:46 +02:00
|
|
|
/* Detect undefined combinations (like ld r31,Z+). */
|
|
|
|
if (!avr_opt.all_opcodes && AVR_UNDEF_P (bin))
|
|
|
|
as_warn (_("undefined combination of operands"));
|
|
|
|
|
|
|
|
if (opcode->insn_size == 2)
|
|
|
|
{
|
|
|
|
/* 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 | AVR_ISA_MOVW)))
|
2017-10-19 17:21:51 +02:00
|
|
|
&& AVR_SKIP_P (frag_now->tc_frag_data.prev_opcode))
|
2005-10-12 12:56:46 +02:00
|
|
|
as_warn (_("skipping two-word instruction"));
|
|
|
|
|
|
|
|
bfd_putl32 ((bfd_vma) bin, frag);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
bfd_putl16 ((bfd_vma) bin, frag);
|
|
|
|
|
2017-10-19 17:21:51 +02:00
|
|
|
frag_now->tc_frag_data.prev_opcode = bin;
|
2005-10-12 12:56:46 +02:00
|
|
|
*line = str;
|
|
|
|
return bin;
|
|
|
|
}
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
/* GAS will call this function for each section at the end of the assembly,
|
|
|
|
to permit the CPU backend to adjust the alignment of a section. */
|
2000-07-28 02:42:18 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
valueT
|
2005-10-12 12:56:46 +02:00
|
|
|
md_section_align (asection *seg, valueT addr)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
bfd_section_* macros
This large patch removes the unnecessary bfd parameter from various
bfd section macros and functions. The bfd is hardly ever used and if
needed for the bfd_set_section_* or bfd_rename_section functions can
be found via section->owner except for the com, und, abs, and ind
std_section special sections. Those sections shouldn't be modified
anyway.
The patch also removes various bfd_get_section_<field> macros,
replacing their use with bfd_section_<field>, and adds
bfd_set_section_lma. I've also fixed a minor bug in gas where
compressed section renaming was done directly rather than calling
bfd_rename_section. This would have broken bfd_get_section_by_name
and similar functions, but that hardly mattered at such a late stage
in gas processing.
bfd/
* bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
(bfd_get_section_lma, bfd_get_section_alignment),
(bfd_get_section_size, bfd_get_section_flags),
(bfd_get_section_userdata): Delete.
(bfd_section_name, bfd_section_size, bfd_section_vma),
(bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
(bfd_section_flags, bfd_section_userdata): New.
(bfd_is_com_section): Rename parameter.
* section.c (bfd_set_section_userdata, bfd_set_section_vma),
(bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
(bfd_set_section_size): Delete bfd parameter, rename section parameter.
(bfd_set_section_lma): New.
* bfd-in2.h: Regenerate.
* mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
update callers.
* aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
* coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
* compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
* elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
* elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
* elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
* elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
* elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
* elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
* elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
* elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
* elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
* elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
* elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
* elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
* elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
* elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
* elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
* elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
* elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
* elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
* elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
* elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
* mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
* peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
* xcofflink.c: Update throughout for bfd section macro and function
changes.
binutils/
* addr2line.c, * bucomm.c, * coffgrok.c, * dlltool.c, * nm.c,
* objcopy.c, * objdump.c, * od-elf32_avr.c, * od-macho.c,
* od-xcoff.c, * prdbg.c, * rdcoff.c, * rddbg.c, * rescoff.c,
* resres.c, * size.c, * srconv.c, * strings.c, * windmc.c: Update
throughout for bfd section macro and function changes.
gas/
* as.c, * as.h, * dw2gencfi.c, * dwarf2dbg.c, * ecoff.c,
* read.c, * stabs.c, * subsegs.c, * subsegs.h, * write.c,
* config/obj-coff-seh.c, * config/obj-coff.c, * config/obj-ecoff.c,
* config/obj-elf.c, * config/obj-macho.c, * config/obj-som.c,
* config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c,
* config/tc-arm.c, * config/tc-avr.c, * config/tc-bfin.c,
* config/tc-bpf.c, * config/tc-d10v.c, * config/tc-d30v.c,
* config/tc-epiphany.c, * config/tc-fr30.c, * config/tc-frv.c,
* config/tc-h8300.c, * config/tc-hppa.c, * config/tc-i386.c,
* config/tc-ia64.c, * config/tc-ip2k.c, * config/tc-iq2000.c,
* config/tc-lm32.c, * config/tc-m32c.c, * config/tc-m32r.c,
* config/tc-m68hc11.c, * config/tc-mep.c, * config/tc-microblaze.c,
* config/tc-mips.c, * config/tc-mmix.c, * config/tc-mn10200.c,
* config/tc-mn10300.c, * config/tc-msp430.c, * config/tc-mt.c,
* config/tc-nds32.c, * config/tc-or1k.c, * config/tc-ppc.c,
* config/tc-pru.c, * config/tc-rl78.c, * config/tc-rx.c,
* config/tc-s12z.c, * config/tc-s390.c, * config/tc-score.c,
* config/tc-score7.c, * config/tc-sh.c, * config/tc-sparc.c,
* config/tc-spu.c, * config/tc-tic4x.c, * config/tc-tic54x.c,
* config/tc-tic6x.c, * config/tc-tilegx.c, * config/tc-tilepro.c,
* config/tc-v850.c, * config/tc-visium.c, * config/tc-wasm32.c,
* config/tc-xc16x.c, * config/tc-xgate.c, * config/tc-xstormy16.c,
* config/tc-xtensa.c, * config/tc-z8k.c: Update throughout for
bfd section macro and function changes.
* write.c (compress_debug): Use bfd_rename_section.
gdb/
* aarch64-linux-tdep.c, * arm-tdep.c, * auto-load.c,
* coff-pe-read.c, * coffread.c, * corelow.c, * dbxread.c,
* dicos-tdep.c, * dwarf2-frame.c, * dwarf2read.c, * elfread.c,
* exec.c, * fbsd-tdep.c, * gcore.c, * gdb_bfd.c, * gdb_bfd.h,
* hppa-tdep.c, * i386-cygwin-tdep.c, * i386-fbsd-tdep.c,
* i386-linux-tdep.c, * jit.c, * linux-tdep.c, * machoread.c,
* maint.c, * mdebugread.c, * minidebug.c, * mips-linux-tdep.c,
* mips-sde-tdep.c, * mips-tdep.c, * mipsread.c, * nto-tdep.c,
* objfiles.c, * objfiles.h, * osabi.c, * ppc-linux-tdep.c,
* ppc64-tdep.c, * record-btrace.c, * record-full.c, * remote.c,
* rs6000-aix-tdep.c, * rs6000-tdep.c, * s390-linux-tdep.c,
* s390-tdep.c, * solib-aix.c, * solib-dsbt.c, * solib-frv.c,
* solib-spu.c, * solib-svr4.c, * solib-target.c,
* spu-linux-nat.c, * spu-tdep.c, * symfile-mem.c, * symfile.c,
* symmisc.c, * symtab.c, * target.c, * windows-nat.c,
* xcoffread.c, * cli/cli-dump.c, * compile/compile-object-load.c,
* mi/mi-interp.c: Update throughout for bfd section macro and
function changes.
* gcore (gcore_create_callback): Use bfd_set_section_lma.
* spu-tdep.c (spu_overlay_new_objfile): Likewise.
gprof/
* corefile.c, * symtab.c: Update throughout for bfd section
macro and function changes.
ld/
* ldcref.c, * ldctor.c, * ldelf.c, * ldlang.c, * pe-dll.c,
* emultempl/aarch64elf.em, * emultempl/aix.em,
* emultempl/armcoff.em, * emultempl/armelf.em,
* emultempl/cr16elf.em, * emultempl/cskyelf.em,
* emultempl/m68hc1xelf.em, * emultempl/m68kelf.em,
* emultempl/mipself.em, * emultempl/mmix-elfnmmo.em,
* emultempl/mmo.em, * emultempl/msp430.em,
* emultempl/nios2elf.em, * emultempl/pe.em, * emultempl/pep.em,
* emultempl/ppc64elf.em, * emultempl/xtensaelf.em: Update
throughout for bfd section macro and function changes.
libctf/
* ctf-open-bfd.c: Update throughout for bfd section macro changes.
opcodes/
* arc-ext.c: Update throughout for bfd section macro changes.
sim/
* common/sim-load.c, * common/sim-utils.c, * cris/sim-if.c,
* erc32/func.c, * lm32/sim-if.c, * m32c/load.c, * m32c/trace.c,
* m68hc11/interp.c, * ppc/hw_htab.c, * ppc/hw_init.c,
* rl78/load.c, * rl78/trace.c, * rx/gdb-if.c, * rx/load.c,
* rx/trace.c: Update throughout for bfd section macro changes.
2019-09-16 12:55:17 +02:00
|
|
|
int align = bfd_section_alignment (seg);
|
2015-09-05 10:02:08 +02:00
|
|
|
return ((addr + (1 << align) - 1) & (-1UL << align));
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* If you define this macro, it should return the offset between the
|
|
|
|
address of a PC relative fixup and the position from which the PC
|
|
|
|
relative adjustment should be made. On many processors, the base
|
|
|
|
of a PC relative instruction is the next instruction, so this
|
|
|
|
macro would return the length of an instruction. */
|
2000-07-28 02:42:18 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
long
|
2005-10-12 12:56:46 +02:00
|
|
|
md_pcrel_from_section (fixS *fixp, segT sec)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2000-07-28 02:42:18 +02:00
|
|
|
if (fixp->fx_addsy != (symbolS *) NULL
|
2000-03-27 10:39:14 +02:00
|
|
|
&& (!S_IS_DEFINED (fixp->fx_addsy)
|
|
|
|
|| (S_GET_SEGMENT (fixp->fx_addsy) != sec)))
|
|
|
|
return 0;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
return fixp->fx_frag->fr_address + fixp->fx_where;
|
|
|
|
}
|
|
|
|
|
2014-04-10 17:50:33 +02:00
|
|
|
static bfd_boolean
|
|
|
|
relaxable_section (asection *sec)
|
|
|
|
{
|
2014-10-27 11:51:17 +01:00
|
|
|
return ((sec->flags & SEC_DEBUGGING) == 0
|
|
|
|
&& (sec->flags & SEC_CODE) != 0
|
|
|
|
&& (sec->flags & SEC_ALLOC) != 0);
|
2014-04-10 17:50:33 +02:00
|
|
|
}
|
|
|
|
|
2014-07-07 17:15:19 +02:00
|
|
|
/* Does whatever the xtensa port does. */
|
2014-04-10 17:50:33 +02:00
|
|
|
int
|
|
|
|
avr_validate_fix_sub (fixS *fix)
|
|
|
|
{
|
|
|
|
segT add_symbol_segment, sub_symbol_segment;
|
|
|
|
|
|
|
|
/* The difference of two symbols should be resolved by the assembler when
|
|
|
|
linkrelax is not set. If the linker may relax the section containing
|
|
|
|
the symbols, then an Xtensa DIFF relocation must be generated so that
|
|
|
|
the linker knows to adjust the difference value. */
|
|
|
|
if (!linkrelax || fix->fx_addsy == NULL)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
/* Make sure both symbols are in the same segment, and that segment is
|
|
|
|
"normal" and relaxable. If the segment is not "normal", then the
|
|
|
|
fix is not valid. If the segment is not "relaxable", then the fix
|
|
|
|
should have been handled earlier. */
|
|
|
|
add_symbol_segment = S_GET_SEGMENT (fix->fx_addsy);
|
|
|
|
if (! SEG_NORMAL (add_symbol_segment) ||
|
|
|
|
! relaxable_section (add_symbol_segment))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
sub_symbol_segment = S_GET_SEGMENT (fix->fx_subsy);
|
|
|
|
return (sub_symbol_segment == add_symbol_segment);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* TC_FORCE_RELOCATION hook */
|
|
|
|
|
|
|
|
/* If linkrelax is turned on, and the symbol to relocate
|
|
|
|
against is in a relaxable segment, don't compute the value -
|
2014-07-07 17:15:19 +02:00
|
|
|
generate a relocation instead. */
|
2014-04-10 17:50:33 +02:00
|
|
|
int
|
|
|
|
avr_force_relocation (fixS *fix)
|
|
|
|
{
|
|
|
|
if (linkrelax && fix->fx_addsy
|
|
|
|
&& relaxable_section (S_GET_SEGMENT (fix->fx_addsy)))
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
return generic_force_reloc (fix);
|
|
|
|
}
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
/* GAS will call this for each fixup. It should store the correct
|
2000-07-28 02:42:18 +02:00
|
|
|
value in the object file. */
|
|
|
|
|
2001-11-15 22:29:00 +01:00
|
|
|
void
|
2005-10-12 12:56:46 +02:00
|
|
|
md_apply_fix (fixS *fixP, valueT * valP, segT seg)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
unsigned char *where;
|
|
|
|
unsigned long insn;
|
2002-09-05 02:01:18 +02:00
|
|
|
long value = *valP;
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2001-11-15 22:29:00 +01:00
|
|
|
if (fixP->fx_addsy == (symbolS *) NULL)
|
|
|
|
fixP->fx_done = 1;
|
|
|
|
|
2002-09-27 06:38:47 +02:00
|
|
|
else if (fixP->fx_pcrel)
|
|
|
|
{
|
|
|
|
segT s = S_GET_SEGMENT (fixP->fx_addsy);
|
|
|
|
|
|
|
|
if (s == seg || s == absolute_section)
|
|
|
|
{
|
|
|
|
value += S_GET_VALUE (fixP->fx_addsy);
|
|
|
|
fixP->fx_done = 1;
|
|
|
|
}
|
|
|
|
}
|
2014-04-10 17:50:33 +02:00
|
|
|
else if (linkrelax && fixP->fx_subsy)
|
|
|
|
{
|
|
|
|
/* For a subtraction relocation expression, generate one
|
|
|
|
of the DIFF relocs, with the value being the difference.
|
|
|
|
Note that a sym1 - sym2 expression is adjusted into a
|
|
|
|
section_start_sym + sym4_offset_from_section_start - sym1
|
|
|
|
expression. fixP->fx_addsy holds the section start symbol,
|
|
|
|
fixP->fx_offset holds sym2's offset, and fixP->fx_subsy
|
|
|
|
holds sym1. Calculate the current difference and write value,
|
2014-07-07 17:15:19 +02:00
|
|
|
but leave fx_offset as is - during relaxation,
|
|
|
|
fx_offset - value gives sym1's value. */
|
2014-04-10 17:50:33 +02:00
|
|
|
|
|
|
|
switch (fixP->fx_r_type)
|
|
|
|
{
|
|
|
|
case BFD_RELOC_8:
|
|
|
|
fixP->fx_r_type = BFD_RELOC_AVR_DIFF8;
|
|
|
|
break;
|
|
|
|
case BFD_RELOC_16:
|
|
|
|
fixP->fx_r_type = BFD_RELOC_AVR_DIFF16;
|
|
|
|
break;
|
|
|
|
case BFD_RELOC_32:
|
|
|
|
fixP->fx_r_type = BFD_RELOC_AVR_DIFF32;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex"));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
value = S_GET_VALUE (fixP->fx_addsy) +
|
|
|
|
fixP->fx_offset - S_GET_VALUE (fixP->fx_subsy);
|
2015-01-04 01:03:16 +01:00
|
|
|
*valP = value;
|
2014-04-10 17:50:33 +02:00
|
|
|
|
|
|
|
fixP->fx_subsy = NULL;
|
|
|
|
}
|
2002-09-05 02:01:18 +02:00
|
|
|
/* We don't actually support subtracting a symbol. */
|
|
|
|
if (fixP->fx_subsy != (symbolS *) NULL)
|
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex"));
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2014-04-10 17:50:33 +02:00
|
|
|
/* For the DIFF relocs, write the value into the object file while still
|
|
|
|
keeping fx_done FALSE, as both the difference (recorded in the object file)
|
2014-07-07 17:15:19 +02:00
|
|
|
and the sym offset (part of fixP) are needed at link relax time. */
|
2014-04-10 17:50:33 +02:00
|
|
|
where = (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where;
|
2001-11-15 22:29:00 +01:00
|
|
|
switch (fixP->fx_r_type)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
default:
|
2001-11-15 22:29:00 +01:00
|
|
|
fixP->fx_no_overflow = 1;
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
|
|
|
case BFD_RELOC_AVR_7_PCREL:
|
|
|
|
case BFD_RELOC_AVR_13_PCREL:
|
|
|
|
case BFD_RELOC_32:
|
|
|
|
case BFD_RELOC_16:
|
2014-04-10 17:50:33 +02:00
|
|
|
break;
|
|
|
|
case BFD_RELOC_AVR_DIFF8:
|
|
|
|
*where = value;
|
|
|
|
break;
|
|
|
|
case BFD_RELOC_AVR_DIFF16:
|
|
|
|
bfd_putl16 ((bfd_vma) value, where);
|
|
|
|
break;
|
|
|
|
case BFD_RELOC_AVR_DIFF32:
|
|
|
|
bfd_putl32 ((bfd_vma) value, where);
|
|
|
|
break;
|
2000-03-27 10:39:14 +02:00
|
|
|
case BFD_RELOC_AVR_CALL:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2001-11-15 22:29:00 +01:00
|
|
|
if (fixP->fx_done)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
/* Fetch the instruction, insert the fully resolved operand
|
|
|
|
value, and stuff the instruction back again. */
|
2005-02-23 13:28:06 +01:00
|
|
|
where = (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where;
|
2000-03-27 10:39:14 +02:00
|
|
|
insn = bfd_getl16 (where);
|
|
|
|
|
2001-11-15 22:29:00 +01:00
|
|
|
switch (fixP->fx_r_type)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
case BFD_RELOC_AVR_7_PCREL:
|
|
|
|
if (value & 1)
|
2001-11-15 22:29:00 +01:00
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
2000-03-27 10:39:14 +02:00
|
|
|
_("odd address operand: %ld"), value);
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
/* Instruction addresses are always right-shifted by 1. */
|
|
|
|
value >>= 1;
|
|
|
|
--value; /* Correct PC. */
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
if (value < -64 || value > 63)
|
2001-11-15 22:29:00 +01:00
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
2000-03-27 10:39:14 +02:00
|
|
|
_("operand out of range: %ld"), value);
|
|
|
|
value = (value << 3) & 0x3f8;
|
|
|
|
bfd_putl16 ((bfd_vma) (value | insn), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_13_PCREL:
|
|
|
|
if (value & 1)
|
2001-11-15 22:29:00 +01:00
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
2000-03-27 10:39:14 +02:00
|
|
|
_("odd address operand: %ld"), value);
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
/* Instruction addresses are always right-shifted by 1. */
|
|
|
|
value >>= 1;
|
|
|
|
--value; /* Correct PC. */
|
|
|
|
|
|
|
|
if (value < -2048 || value > 2047)
|
|
|
|
{
|
2000-06-27 03:45:30 +02:00
|
|
|
/* No wrap for devices with >8K of program memory. */
|
2000-07-04 00:25:33 +02:00
|
|
|
if ((avr_mcu->isa & AVR_ISA_MEGA) || avr_opt.no_wrap)
|
2001-11-15 22:29:00 +01:00
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
2000-03-27 10:39:14 +02:00
|
|
|
_("operand out of range: %ld"), value);
|
|
|
|
}
|
|
|
|
|
|
|
|
value &= 0xfff;
|
|
|
|
bfd_putl16 ((bfd_vma) (value | insn), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_32:
|
2012-04-17 15:59:41 +02:00
|
|
|
bfd_putl32 ((bfd_vma) value, where);
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_16:
|
|
|
|
bfd_putl16 ((bfd_vma) value, where);
|
|
|
|
break;
|
|
|
|
|
2010-02-23 12:38:36 +01:00
|
|
|
case BFD_RELOC_8:
|
|
|
|
if (value > 255 || value < -128)
|
|
|
|
as_warn_where (fixP->fx_file, fixP->fx_line,
|
|
|
|
_("operand out of range: %ld"), value);
|
|
|
|
*where = value;
|
|
|
|
break;
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
case BFD_RELOC_AVR_16_PM:
|
2000-07-28 02:42:18 +02:00
|
|
|
bfd_putl16 ((bfd_vma) (value >> 1), where);
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
|
|
|
|
2004-12-22 15:25:42 +01:00
|
|
|
case BFD_RELOC_AVR_LDI:
|
|
|
|
if (value > 255)
|
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
|
|
|
_("operand out of range: %ld"), value);
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value), where);
|
|
|
|
break;
|
|
|
|
|
2014-07-01 11:20:17 +02:00
|
|
|
case BFD_RELOC_AVR_LDS_STS_16:
|
|
|
|
if ((value < 0x40) || (value > 0xBF))
|
|
|
|
as_warn_where (fixP->fx_file, fixP->fx_line,
|
|
|
|
_("operand out of range: 0x%lx"),
|
|
|
|
(unsigned long)value);
|
|
|
|
insn |= ((value & 0xF) | ((value & 0x30) << 5) | ((value & 0x40) << 2));
|
|
|
|
bfd_putl16 ((bfd_vma) insn, where);
|
|
|
|
break;
|
|
|
|
|
2004-12-22 15:25:42 +01:00
|
|
|
case BFD_RELOC_AVR_6:
|
|
|
|
if ((value > 63) || (value < 0))
|
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
|
|
|
_("operand out of range: %ld"), value);
|
2014-07-01 11:20:17 +02:00
|
|
|
bfd_putl16 ((bfd_vma) insn | ((value & 7) | ((value & (3 << 3)) << 7)
|
|
|
|
| ((value & (1 << 5)) << 8)), where);
|
2004-12-22 15:25:42 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_6_ADIW:
|
|
|
|
if ((value > 63) || (value < 0))
|
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
|
|
|
_("operand out of range: %ld"), value);
|
|
|
|
bfd_putl16 ((bfd_vma) insn | (value & 0xf) | ((value & 0x30) << 2), where);
|
|
|
|
break;
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
case BFD_RELOC_AVR_LO8_LDI:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_HI8_LDI:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 8), where);
|
|
|
|
break;
|
|
|
|
|
2006-03-03 16:25:31 +01:00
|
|
|
case BFD_RELOC_AVR_MS8_LDI:
|
2000-03-27 10:39:14 +02:00
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 24), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_HH8_LDI:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 16), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_LO8_LDI_NEG:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_HI8_LDI_NEG:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 8), where);
|
|
|
|
break;
|
|
|
|
|
2006-03-03 16:25:31 +01:00
|
|
|
case BFD_RELOC_AVR_MS8_LDI_NEG:
|
2000-03-27 10:39:14 +02:00
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 24), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_HH8_LDI_NEG:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 16), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_LO8_LDI_PM:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 1), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_HI8_LDI_PM:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 9), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_HH8_LDI_PM:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value >> 17), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_LO8_LDI_PM_NEG:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 1), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_HI8_LDI_PM_NEG:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 9), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_HH8_LDI_PM_NEG:
|
|
|
|
bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (-value >> 17), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_CALL:
|
|
|
|
{
|
|
|
|
unsigned long x;
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
x = bfd_getl16 (where);
|
|
|
|
if (value & 1)
|
2001-11-15 22:29:00 +01:00
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
2000-03-27 10:39:14 +02:00
|
|
|
_("odd address operand: %ld"), value);
|
|
|
|
value >>= 1;
|
|
|
|
x |= ((value & 0x10000) | ((value << 3) & 0x1f00000)) >> 16;
|
|
|
|
bfd_putl16 ((bfd_vma) x, where);
|
2000-07-28 02:42:18 +02:00
|
|
|
bfd_putl16 ((bfd_vma) (value & 0xffff), where + 2);
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
case BFD_RELOC_AVR_8_LO:
|
|
|
|
*where = 0xff & value;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_8_HI:
|
|
|
|
*where = 0xff & (value >> 8);
|
|
|
|
break;
|
|
|
|
|
2012-05-16 16:52:16 +02:00
|
|
|
case BFD_RELOC_AVR_8_HLO:
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
*where = 0xff & (value >> 16);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2000-07-28 02:42:18 +02:00
|
|
|
as_fatal (_("line %d: unknown relocation type: 0x%x"),
|
2001-11-15 22:29:00 +01:00
|
|
|
fixP->fx_line, fixP->fx_r_type);
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
2014-07-07 17:15:19 +02:00
|
|
|
|
|
|
|
case BFD_RELOC_AVR_PORT6:
|
|
|
|
if (value > 63)
|
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
|
|
|
_("operand out of range: %ld"), value);
|
|
|
|
bfd_putl16 ((bfd_vma) insn | ((value & 0x30) << 5) | (value & 0x0f), where);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_PORT5:
|
|
|
|
if (value > 31)
|
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
|
|
|
_("operand out of range: %ld"), value);
|
|
|
|
bfd_putl16 ((bfd_vma) insn | ((value & 0x1f) << 3), where);
|
|
|
|
break;
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-07-17 17:22:11 +02:00
|
|
|
switch ((int) fixP->fx_r_type)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
case -BFD_RELOC_AVR_HI8_LDI_NEG:
|
|
|
|
case -BFD_RELOC_AVR_HI8_LDI:
|
|
|
|
case -BFD_RELOC_AVR_LO8_LDI_NEG:
|
|
|
|
case -BFD_RELOC_AVR_LO8_LDI:
|
2001-11-15 22:29:00 +01:00
|
|
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
2000-03-27 10:39:14 +02:00
|
|
|
_("only constant expression allowed"));
|
2001-11-15 22:29:00 +01:00
|
|
|
fixP->fx_done = 1;
|
2000-03-27 10:39:14 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
* README-vms: Delete.
* config-gas.com: Delete.
* makefile.vms: Delete.
* vmsconf.sh: Delete.
* config/atof-tahoe.c: Delete.
* config/m88k-opcode.h: Delete.
* config/obj-bout.c: Delete.
* config/obj-bout.h: Delete.
* config/obj-hp300.c: Delete.
* config/obj-hp300.h: Delete.
* config/tc-a29k.c: Delete.
* config/tc-a29k.h: Delete.
* config/tc-h8500.c: Delete.
* config/tc-h8500.h: Delete.
* config/tc-m88k.c: Delete.
* config/tc-m88k.h: Delete.
* config/tc-tahoe.c: Delete.
* config/tc-tahoe.h: Delete.
* config/tc-tic80.c: Delete.
* config/tc-tic80.h: Delete.
* config/tc-w65.c: Delete.
* config/tc-w65.h: Delete.
* config/te-aux.h: Delete.
* config/te-delt88.h: Delete.
* config/te-delta.h: Delete.
* config/te-dpx2.h: Delete.
* config/te-hp300.h: Delete.
* config/te-ic960.h: Delete.
* config/vms-a-conf.h: Delete.
* doc/c-a29k.texi: Delete.
* doc/c-h8500.texi: Delete.
* doc/c-m88k.texi: Delete.
* README: Remove obsolete examples, and list of supported targets.
* Makefile.am: Remove a29k, h8500, m88k, tahoe, tic80, w65,
bout and hp300 support.
(DEP_FLAGS): Don't define BFD_ASSEMBLER.
* configure.in: Remove --enable-bfd-assembler, need_bfd,
primary_bfd_gas.
* configure.tgt: Remove a29k, h8300-coff, h8500-*, i960 non-elf,
m68k non bfd, m88k, or32-coff, tic80-*, vax non-bfd, w65k-*, *-nindy.
* as.c: Remove all non-BFD_ASSEMBLER code, support for above targets.
* as.h: Likewise.
* dw2gencfi.c: Likewise.
* dwarf2dbg.c: Likewise.
* ehopt.c: Likewise.
* input-file.c: Likewise.
* listing.c: Likewise.
* literal.c: Likewise.
* messages.c: Likewise.
* obj.h: Likewise.
* output-file.c: Likewise.
* read.c: Likewise.
* stabs.c: Likewise.
* struc-symbol.h: Likewise.
* subsegs.c: Likewise.
* subsegs.h: Likewise.
* symbols.c: Likewise.
* symbols.h: Likewise.
* tc.h: Likewise.
* write.c: Likewise.
* write.h: Likewise.
* config/aout_gnu.h: Likewise.
* config/obj-aout.c: Likewise.
* config/obj-aout.h: Likewise.
* config/obj-coff.c: Likewise.
* config/obj-coff.h: Likewise.
* config/obj-evax.h: Likewise.
* config/obj-ieee.h: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-arm.h: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-avr.h: Likewise.
* config/tc-crx.h: Likewise.
* config/tc-d10v.h: Likewise.
* config/tc-d30v.h: Likewise.
* config/tc-dlx.h: Likewise.
* config/tc-fr30.h: Likewise.
* config/tc-frv.h: Likewise.
* config/tc-h8300.c: Likewise.
* config/tc-h8300.h: Likewise.
* config/tc-hppa.h: Likewise.
* config/tc-i370.h: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-i386.h: Likewise.
* config/tc-i860.h: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-i960.h: Likewise.
* config/tc-ip2k.h: Likewise.
* config/tc-iq2000.h: Likewise.
* config/tc-m32c.h: Likewise.
* config/tc-m32r.h: Likewise.
* config/tc-m68hc11.h: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-m68k.h: Likewise.
* config/tc-maxq.c: Likewise.
* config/tc-maxq.h: Likewise.
* config/tc-mcore.c: Likewise.
* config/tc-mcore.h: Likewise.
* config/tc-mn10200.h: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-mn10300.h: Likewise.
* config/tc-ms1.h: Likewise.
* config/tc-msp430.c: Likewise.
* config/tc-msp430.h: Likewise.
* config/tc-ns32k.c: Likewise.
* config/tc-ns32k.h: Likewise.
* config/tc-openrisc.h: Likewise.
* config/tc-or32.c: Likewise.
* config/tc-or32.h: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-ppc.h: Likewise.
* config/tc-s390.h: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-sh.h: Likewise.
* config/tc-sparc.c: Likewise.
* config/tc-tic30.c: Likewise.
* config/tc-tic30.h: Likewise.
* config/tc-tic4x.c: Likewise.
* config/tc-tic4x.h: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-tic54x.h: Likewise.
* config/tc-v850.h: Likewise.
* config/tc-vax.c: Likewise.
* config/tc-vax.h: Likewise.
* config/tc-xstormy16.h: Likewise.
* config/tc-xtensa.h: Likewise.
* config/tc-z8k.c: Likewise.
* config/tc-z8k.h: Likewise.
* config/vms-a-conf.h
* doc/Makefile.am: Likewise.
* doc/all.texi: Likewise.
* doc/as.texinfo: Likewise.
* doc/Makefile.in: Regenerate.
* Makefile.in: Regenerate.
* configure: Regenerate.
* config.in: Regenerate.
* po/POTFILES.in: Regenerate.
2005-08-11 03:25:29 +02:00
|
|
|
/* GAS will call this to generate a reloc, passing the resulting reloc
|
|
|
|
to `bfd_install_relocation'. This currently works poorly, as
|
|
|
|
`bfd_install_relocation' often does the wrong thing, and instances of
|
|
|
|
`tc_gen_reloc' have been written to work around the problems, which
|
|
|
|
in turns makes it difficult to fix `bfd_install_relocation'. */
|
2000-03-27 10:39:14 +02:00
|
|
|
|
|
|
|
/* If while processing a fixup, a reloc really needs to be created
|
|
|
|
then it is done here. */
|
|
|
|
|
|
|
|
arelent *
|
2005-10-12 12:56:46 +02:00
|
|
|
tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED,
|
|
|
|
fixS *fixp)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
arelent *reloc;
|
2015-07-08 20:35:19 +02:00
|
|
|
bfd_reloc_code_real_type code = fixp->fx_r_type;
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2013-02-06 00:02:54 +01:00
|
|
|
if (fixp->fx_subsy != NULL)
|
2006-03-03 16:25:31 +01:00
|
|
|
{
|
2013-02-06 00:02:54 +01:00
|
|
|
as_bad_where (fixp->fx_file, fixp->fx_line, _("expression too complex"));
|
2006-03-03 16:25:31 +01:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-04-01 15:26:30 +02:00
|
|
|
reloc = XNEW (arelent);
|
2000-03-27 10:39:14 +02:00
|
|
|
|
2016-04-01 15:26:30 +02:00
|
|
|
reloc->sym_ptr_ptr = XNEW (asymbol *);
|
2000-03-27 10:39:14 +02:00
|
|
|
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
|
|
|
|
|
|
|
|
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
|
2015-07-08 20:35:19 +02:00
|
|
|
|
|
|
|
if ((fixp->fx_r_type == BFD_RELOC_32) && (fixp->fx_pcrel))
|
|
|
|
{
|
|
|
|
if (seg->use_rela_p)
|
|
|
|
fixp->fx_offset -= md_pcrel_from_section (fixp, seg);
|
|
|
|
else
|
|
|
|
fixp->fx_offset = reloc->address;
|
|
|
|
|
|
|
|
code = BFD_RELOC_32_PCREL;
|
|
|
|
}
|
|
|
|
|
|
|
|
reloc->addend = fixp->fx_offset;
|
|
|
|
|
|
|
|
reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
if (reloc->howto == (reloc_howto_type *) NULL)
|
|
|
|
{
|
|
|
|
as_bad_where (fixp->fx_file, fixp->fx_line,
|
2000-07-28 02:42:18 +02:00
|
|
|
_("reloc %d not supported by object file format"),
|
|
|
|
(int) fixp->fx_r_type);
|
2000-03-27 10:39:14 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|
|
|
|
|| fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
|
|
|
|
reloc->address = fixp->fx_offset;
|
|
|
|
|
|
|
|
|
|
|
|
return reloc;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-10-12 12:56:46 +02:00
|
|
|
md_assemble (char *str)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2000-07-28 02:42:18 +02:00
|
|
|
struct avr_opcodes_s *opcode;
|
2000-03-27 10:39:14 +02:00
|
|
|
char op[11];
|
|
|
|
|
2000-07-28 02:42:18 +02:00
|
|
|
str = skip_space (extract_word (str, op, sizeof (op)));
|
2000-03-27 10:39:14 +02:00
|
|
|
|
|
|
|
if (!op[0])
|
2000-07-04 00:25:33 +02:00
|
|
|
as_bad (_("can't find opcode "));
|
2000-03-27 10:39:14 +02:00
|
|
|
|
|
|
|
opcode = (struct avr_opcodes_s *) hash_find (avr_hash, op);
|
|
|
|
|
2014-07-01 11:20:17 +02:00
|
|
|
if (opcode && !avr_opt.all_opcodes)
|
|
|
|
{
|
2014-07-07 17:15:19 +02:00
|
|
|
/* Check if the instruction's ISA bit is ON in the ISA bits of the part
|
2014-07-01 11:20:17 +02:00
|
|
|
specified by the user. If not look for other instructions
|
2014-07-07 17:15:19 +02:00
|
|
|
specifications with same mnemonic who's ISA bits matches.
|
2014-07-01 11:20:17 +02:00
|
|
|
|
|
|
|
This requires include/opcode/avr.h to have the instructions with
|
2017-01-23 16:23:07 +01:00
|
|
|
same mnemonic to be specified in sequence. */
|
2014-07-01 11:20:17 +02:00
|
|
|
|
|
|
|
while ((opcode->isa & avr_mcu->isa) != opcode->isa)
|
|
|
|
{
|
|
|
|
opcode++;
|
2014-07-07 17:15:19 +02:00
|
|
|
|
2014-07-01 11:20:17 +02:00
|
|
|
if (opcode->name && strcmp(op, opcode->name))
|
|
|
|
{
|
2014-07-07 17:15:19 +02:00
|
|
|
as_bad (_("illegal opcode %s for mcu %s"),
|
2014-07-01 11:20:17 +02:00
|
|
|
opcode->name, avr_mcu->name);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2014-07-07 17:15:19 +02:00
|
|
|
}
|
2014-07-01 11:20:17 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
if (opcode == NULL)
|
|
|
|
{
|
2000-07-04 00:25:33 +02:00
|
|
|
as_bad (_("unknown opcode `%s'"), op);
|
2000-03-27 10:39:14 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
if (opcode == avr_gccisr_opcode
|
|
|
|
&& !avr_opt.have_gccisr)
|
|
|
|
{
|
|
|
|
as_bad (_("pseudo instruction `%s' not supported"), op);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2000-05-01 10:48:32 +02:00
|
|
|
/* Special case for opcodes with optional operands (lpm, elpm) -
|
2000-06-07 19:42:44 +02:00
|
|
|
version with operands exists in avr_opcodes[] in the next entry. */
|
2000-07-28 02:42:18 +02:00
|
|
|
|
2000-06-07 19:42:44 +02:00
|
|
|
if (*str && *opcode->constraints == '?')
|
|
|
|
++opcode;
|
2000-05-01 10:48:32 +02:00
|
|
|
|
2009-09-08 12:36:39 +02:00
|
|
|
dwarf2_emit_insn (0);
|
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
/* We used to set input_line_pointer to the result of get_operands,
|
|
|
|
but that is wrong. Our caller assumes we don't change it. */
|
|
|
|
{
|
|
|
|
char *t = input_line_pointer;
|
2005-10-12 12:56:46 +02:00
|
|
|
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
if (opcode == avr_gccisr_opcode)
|
|
|
|
avr_gccisr_operands (opcode, &str);
|
|
|
|
else
|
|
|
|
avr_operands (opcode, &str);
|
2000-05-01 10:48:32 +02:00
|
|
|
if (*skip_space (str))
|
2000-07-04 00:25:33 +02:00
|
|
|
as_bad (_("garbage at end of line"));
|
2000-03-27 10:39:14 +02:00
|
|
|
input_line_pointer = t;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gas TC_PARSE_CONS_EXPRESSION communication with TC_CONS_FIX_NEW
A number of targets pass extra information from TC_PARSE_CONS_EXPRESSION
to TC_CONS_FIX_NEW via static variables. That's OK, but not best
practice. tc-ppc.c goes further in implementing its own replacement
for cons(), because the generic one doesn't allow relocation modifiers
on constants. This patch fixes both of these warts.
* gas/config/tc-alpha.h (TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arc.c (arc_cons_fix_new): Add reloc parameter.
* gas/config/tc-arc.h (arc_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arm.c (cons_fix_new_arm): Similarly
* gas/config/tc-arm.h (cons_fix_new_arm, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-cr16.c (cr16_cons_fix_new): Similarly.
* gas/config/tc-cr16.h (cr16_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-crx.h (TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-m32c.c (m32c_cons_fix_new): Similarly.
* gas/config/tc-m32c.h (m32c_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-mn10300.c (mn10300_cons_fix_new): Similarly.
* gas/config/tc-mn10300.h (mn10300_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-ns32k.c (cons_fix_new_ns32k): Similarly.
* gas/config/tc-ns32k.h (cons_fix_new_ns32k): Similarly.
* gas/config/tc-pj.c (pj_cons_fix_new_pj): Similarly.
* gas/config/tc-pj.h (pj_cons_fix_new_pj, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-rx.c (rx_cons_fix_new): Similarly.
* gas/config/tc-rx.h (rx_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-sh.c (sh_cons_fix_new): Similarly.
* gas/config/tc-sh.h (sh_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-tic54x.c (tic54x_cons_fix_new): Similarly.
* gas/config/tc-tic54x.h (tic54x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-tic6x.c (tic6x_cons_fix_new): Similarly.
* gas/config/tc-tic6x.h (tic6x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-arc.c (arc_parse_cons_expression): Return reloc.
* gas/config/tc-arc.h (arc_parse_cons_expression): Update proto.
* gas/config/tc-avr.c (exp_mod_data): Make global.
(pexp_mod_data): Delete.
(avr_parse_cons_expression): Return exp_mod_data pointer.
(avr_cons_fix_new): Add exp_mod_data_t pointer param.
(exp_mod_data_t): Move typedef..
* gas/config/tc-avr.h: ..to here.
(exp_mod_data): Declare.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
(avr_parse_cons_expression, avr_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Update.
* gas/config/tc-hppa.c (hppa_field_selector): Delete static var.
(cons_fix_new_hppa): Add hppa_field_selector param.
(fix_new_hppa): Adjust.
(parse_cons_expression_hppa): Return field selector.
* gas/config/tc-hppa.h (parse_cons_expression_hppa): Update proto.
(cons_fix_new_hppa): Likewise.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
* gas/config/tc-i386.c (got_reloc): Delete static var.
(x86_cons_fix_new): Add reloc param.
(x86_cons): Return got reloc.
* gas/config/tc-i386.h (x86_cons, x86_cons_fix_new): Update proto.
(TC_CONS_FIX_NEW): Add RELOC param.
* gas/config/tc-ia64.c (ia64_cons_fix_new): Add reloc param. Adjust
calls.
* gas/config/tc-ia64.h (ia64_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add reloc param.
* gas/config/tc-microblaze.c (parse_cons_expression_microblaze):
Return reloc.
(cons_fix_new_microblaze): Add reloc param.
* gas/config/tc-microblaze.h: Formatting.
(parse_cons_expression_microblaze): Update proto.
(cons_fix_new_microblaze): Likewise.
* gas/config/tc-nios2.c (nios2_tls_ldo_reloc): Delete static var.
(nios2_cons): Return ldo reloc.
(nios2_cons_fix_new): Delete.
* gas/config/tc-nios2.h (nios2_cons): Update prototype.
(nios2_cons_fix_new, TC_CONS_FIX_NEW): Delete.
* gas/config/tc-ppc.c (md_pseudo_table): Remove quad, long, word,
short. Make llong use cons.
(ppc_elf_suffix): Return BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(ppc_elf_cons): Delete.
(ppc_elf_parse_cons): New function.
(ppc_elf_validate_fix): Don't check for BFD_RELOC_UNUSED.
(md_assemble): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
* gas/config/tc-ppc.h (TC_PARSE_CONS_EXPRESSION): Define
(ppc_elf_parse_cons): Declare.
* gas/config/tc-sparc.c (sparc_cons_special_reloc): Delete static var.
(sparc_cons): Return reloc specifier.
(cons_fix_new_sparc): Add reloc specifier param.
(sparc_cfi_emit_pcrel_expr): Use emit_expr_with_reloc.
* gas/config/tc-sparc.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(sparc_cons, cons_fix_new_sparc): Update prototype.
* gas/config/tc-v850.c (hold_cons_reloc): Delete static var.
(v850_reloc_prefix): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(md_assemble): Likewise.
(parse_cons_expression_v850): Return reloc.
(cons_fix_new_v850): Add reloc parameter.
* gas/config/tc-v850.h (parse_cons_expression_v850): Update proto.
(cons_fix_new_v850): Likewise.
* gas/config/tc-vax.c (vax_cons_special_reloc): Delete static var.
(vax_cons): Return reloc.
(vax_cons_fix_new): Add reloc parameter.
* gas/config/tc-vax.h (vax_cons, vax_cons_fix_new): Update proto.
* gas/config/tc-xstormy16.c (xstormy16_cons_fix_new): Add reloc param.
* gas/config/tc-xstormy16.h (xstormy16_cons_fix_new): Update proto.
* gas/dwarf2dbg.c (TC_PARSE_CONS_RETURN_NONE): Provide default.
(emit_fixed_inc_line_addr): Adjust exmit_expr_fix calls.
* gas/read.c (TC_PARSE_CONS_EXPRESSION): Return value.
(do_parse_cons_expression): Adjust.
(cons_worker): Pass return value from TC_PARSE_CONS_EXPRESSION
to emit_expr_with_reloc.
(emit_expr_with_reloc): New function handling reloc, mostly
extracted from..
(emit_expr): ..here.
(emit_expr_fix): Add reloc param. Adjust TC_CONS_FIX_NEW invocation.
Handle reloc.
(parse_mri_cons): Convert to ISO.
* gas/read.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(emit_expr_with_reloc): Declare.
(emit_expr_fix): Update prototype.
* gas/write.c (write_object_file): Update TC_CONS_FIX_NEW invocation.
2014-04-08 07:08:22 +02:00
|
|
|
const exp_mod_data_t exp_mod_data[] =
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
{
|
|
|
|
/* Default, must be first. */
|
|
|
|
{ "", 0, BFD_RELOC_16, "" },
|
|
|
|
/* Divides by 2 to get word address. Generate Stub. */
|
|
|
|
{ "gs", 2, BFD_RELOC_AVR_16_PM, "`gs' " },
|
|
|
|
{ "pm", 2, BFD_RELOC_AVR_16_PM, "`pm' " },
|
|
|
|
/* The following are used together with avr-gcc's __memx address space
|
|
|
|
in order to initialize a 24-bit pointer variable with a 24-bit address.
|
2012-05-16 16:52:16 +02:00
|
|
|
For address in flash, hlo8 will contain the flash segment if the
|
|
|
|
symbol is located in flash. If the symbol is located in RAM; hlo8
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
will contain 0x80 which matches avr-gcc's notion of how 24-bit RAM/flash
|
|
|
|
addresses linearize address space. */
|
|
|
|
{ "lo8", 1, BFD_RELOC_AVR_8_LO, "`lo8' " },
|
|
|
|
{ "hi8", 1, BFD_RELOC_AVR_8_HI, "`hi8' " },
|
2012-05-16 16:52:16 +02:00
|
|
|
{ "hlo8", 1, BFD_RELOC_AVR_8_HLO, "`hlo8' " },
|
|
|
|
{ "hh8", 1, BFD_RELOC_AVR_8_HLO, "`hh8' " },
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Parse special CONS expression: pm (expression) or alternatively
|
|
|
|
gs (expression). These are used for addressing program memory. Moreover,
|
2012-05-16 16:52:16 +02:00
|
|
|
define lo8 (expression), hi8 (expression) and hlo8 (expression). */
|
2000-07-28 02:42:18 +02:00
|
|
|
|
gas TC_PARSE_CONS_EXPRESSION communication with TC_CONS_FIX_NEW
A number of targets pass extra information from TC_PARSE_CONS_EXPRESSION
to TC_CONS_FIX_NEW via static variables. That's OK, but not best
practice. tc-ppc.c goes further in implementing its own replacement
for cons(), because the generic one doesn't allow relocation modifiers
on constants. This patch fixes both of these warts.
* gas/config/tc-alpha.h (TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arc.c (arc_cons_fix_new): Add reloc parameter.
* gas/config/tc-arc.h (arc_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arm.c (cons_fix_new_arm): Similarly
* gas/config/tc-arm.h (cons_fix_new_arm, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-cr16.c (cr16_cons_fix_new): Similarly.
* gas/config/tc-cr16.h (cr16_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-crx.h (TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-m32c.c (m32c_cons_fix_new): Similarly.
* gas/config/tc-m32c.h (m32c_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-mn10300.c (mn10300_cons_fix_new): Similarly.
* gas/config/tc-mn10300.h (mn10300_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-ns32k.c (cons_fix_new_ns32k): Similarly.
* gas/config/tc-ns32k.h (cons_fix_new_ns32k): Similarly.
* gas/config/tc-pj.c (pj_cons_fix_new_pj): Similarly.
* gas/config/tc-pj.h (pj_cons_fix_new_pj, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-rx.c (rx_cons_fix_new): Similarly.
* gas/config/tc-rx.h (rx_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-sh.c (sh_cons_fix_new): Similarly.
* gas/config/tc-sh.h (sh_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-tic54x.c (tic54x_cons_fix_new): Similarly.
* gas/config/tc-tic54x.h (tic54x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-tic6x.c (tic6x_cons_fix_new): Similarly.
* gas/config/tc-tic6x.h (tic6x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-arc.c (arc_parse_cons_expression): Return reloc.
* gas/config/tc-arc.h (arc_parse_cons_expression): Update proto.
* gas/config/tc-avr.c (exp_mod_data): Make global.
(pexp_mod_data): Delete.
(avr_parse_cons_expression): Return exp_mod_data pointer.
(avr_cons_fix_new): Add exp_mod_data_t pointer param.
(exp_mod_data_t): Move typedef..
* gas/config/tc-avr.h: ..to here.
(exp_mod_data): Declare.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
(avr_parse_cons_expression, avr_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Update.
* gas/config/tc-hppa.c (hppa_field_selector): Delete static var.
(cons_fix_new_hppa): Add hppa_field_selector param.
(fix_new_hppa): Adjust.
(parse_cons_expression_hppa): Return field selector.
* gas/config/tc-hppa.h (parse_cons_expression_hppa): Update proto.
(cons_fix_new_hppa): Likewise.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
* gas/config/tc-i386.c (got_reloc): Delete static var.
(x86_cons_fix_new): Add reloc param.
(x86_cons): Return got reloc.
* gas/config/tc-i386.h (x86_cons, x86_cons_fix_new): Update proto.
(TC_CONS_FIX_NEW): Add RELOC param.
* gas/config/tc-ia64.c (ia64_cons_fix_new): Add reloc param. Adjust
calls.
* gas/config/tc-ia64.h (ia64_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add reloc param.
* gas/config/tc-microblaze.c (parse_cons_expression_microblaze):
Return reloc.
(cons_fix_new_microblaze): Add reloc param.
* gas/config/tc-microblaze.h: Formatting.
(parse_cons_expression_microblaze): Update proto.
(cons_fix_new_microblaze): Likewise.
* gas/config/tc-nios2.c (nios2_tls_ldo_reloc): Delete static var.
(nios2_cons): Return ldo reloc.
(nios2_cons_fix_new): Delete.
* gas/config/tc-nios2.h (nios2_cons): Update prototype.
(nios2_cons_fix_new, TC_CONS_FIX_NEW): Delete.
* gas/config/tc-ppc.c (md_pseudo_table): Remove quad, long, word,
short. Make llong use cons.
(ppc_elf_suffix): Return BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(ppc_elf_cons): Delete.
(ppc_elf_parse_cons): New function.
(ppc_elf_validate_fix): Don't check for BFD_RELOC_UNUSED.
(md_assemble): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
* gas/config/tc-ppc.h (TC_PARSE_CONS_EXPRESSION): Define
(ppc_elf_parse_cons): Declare.
* gas/config/tc-sparc.c (sparc_cons_special_reloc): Delete static var.
(sparc_cons): Return reloc specifier.
(cons_fix_new_sparc): Add reloc specifier param.
(sparc_cfi_emit_pcrel_expr): Use emit_expr_with_reloc.
* gas/config/tc-sparc.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(sparc_cons, cons_fix_new_sparc): Update prototype.
* gas/config/tc-v850.c (hold_cons_reloc): Delete static var.
(v850_reloc_prefix): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(md_assemble): Likewise.
(parse_cons_expression_v850): Return reloc.
(cons_fix_new_v850): Add reloc parameter.
* gas/config/tc-v850.h (parse_cons_expression_v850): Update proto.
(cons_fix_new_v850): Likewise.
* gas/config/tc-vax.c (vax_cons_special_reloc): Delete static var.
(vax_cons): Return reloc.
(vax_cons_fix_new): Add reloc parameter.
* gas/config/tc-vax.h (vax_cons, vax_cons_fix_new): Update proto.
* gas/config/tc-xstormy16.c (xstormy16_cons_fix_new): Add reloc param.
* gas/config/tc-xstormy16.h (xstormy16_cons_fix_new): Update proto.
* gas/dwarf2dbg.c (TC_PARSE_CONS_RETURN_NONE): Provide default.
(emit_fixed_inc_line_addr): Adjust exmit_expr_fix calls.
* gas/read.c (TC_PARSE_CONS_EXPRESSION): Return value.
(do_parse_cons_expression): Adjust.
(cons_worker): Pass return value from TC_PARSE_CONS_EXPRESSION
to emit_expr_with_reloc.
(emit_expr_with_reloc): New function handling reloc, mostly
extracted from..
(emit_expr): ..here.
(emit_expr_fix): Add reloc param. Adjust TC_CONS_FIX_NEW invocation.
Handle reloc.
(parse_mri_cons): Convert to ISO.
* gas/read.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(emit_expr_with_reloc): Declare.
(emit_expr_fix): Update prototype.
* gas/write.c (write_object_file): Update TC_CONS_FIX_NEW invocation.
2014-04-08 07:08:22 +02:00
|
|
|
const exp_mod_data_t *
|
2005-10-12 12:56:46 +02:00
|
|
|
avr_parse_cons_expression (expressionS *exp, int nbytes)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2000-07-28 02:42:18 +02:00
|
|
|
char *tmp;
|
2016-05-13 08:51:41 +02:00
|
|
|
unsigned int i;
|
2000-03-27 10:39:14 +02:00
|
|
|
|
|
|
|
tmp = input_line_pointer = skip_space (input_line_pointer);
|
|
|
|
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
/* The first entry of exp_mod_data[] contains an entry if no
|
|
|
|
expression modifier is present. Skip it. */
|
|
|
|
|
2016-05-13 08:51:41 +02:00
|
|
|
for (i = 0; i < ARRAY_SIZE (exp_mod_data); i++)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
2016-05-13 08:51:41 +02:00
|
|
|
const exp_mod_data_t *pexp = &exp_mod_data[i];
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
int len = strlen (pexp->name);
|
2000-09-15 03:06:52 +02:00
|
|
|
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
if (nbytes == pexp->nbytes
|
|
|
|
&& strncasecmp (input_line_pointer, pexp->name, len) == 0)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
|
|
|
input_line_pointer = skip_space (input_line_pointer + len);
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
if (*input_line_pointer == '(')
|
|
|
|
{
|
|
|
|
input_line_pointer = skip_space (input_line_pointer + 1);
|
|
|
|
expression (exp);
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
if (*input_line_pointer == ')')
|
gas TC_PARSE_CONS_EXPRESSION communication with TC_CONS_FIX_NEW
A number of targets pass extra information from TC_PARSE_CONS_EXPRESSION
to TC_CONS_FIX_NEW via static variables. That's OK, but not best
practice. tc-ppc.c goes further in implementing its own replacement
for cons(), because the generic one doesn't allow relocation modifiers
on constants. This patch fixes both of these warts.
* gas/config/tc-alpha.h (TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arc.c (arc_cons_fix_new): Add reloc parameter.
* gas/config/tc-arc.h (arc_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arm.c (cons_fix_new_arm): Similarly
* gas/config/tc-arm.h (cons_fix_new_arm, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-cr16.c (cr16_cons_fix_new): Similarly.
* gas/config/tc-cr16.h (cr16_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-crx.h (TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-m32c.c (m32c_cons_fix_new): Similarly.
* gas/config/tc-m32c.h (m32c_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-mn10300.c (mn10300_cons_fix_new): Similarly.
* gas/config/tc-mn10300.h (mn10300_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-ns32k.c (cons_fix_new_ns32k): Similarly.
* gas/config/tc-ns32k.h (cons_fix_new_ns32k): Similarly.
* gas/config/tc-pj.c (pj_cons_fix_new_pj): Similarly.
* gas/config/tc-pj.h (pj_cons_fix_new_pj, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-rx.c (rx_cons_fix_new): Similarly.
* gas/config/tc-rx.h (rx_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-sh.c (sh_cons_fix_new): Similarly.
* gas/config/tc-sh.h (sh_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-tic54x.c (tic54x_cons_fix_new): Similarly.
* gas/config/tc-tic54x.h (tic54x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-tic6x.c (tic6x_cons_fix_new): Similarly.
* gas/config/tc-tic6x.h (tic6x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-arc.c (arc_parse_cons_expression): Return reloc.
* gas/config/tc-arc.h (arc_parse_cons_expression): Update proto.
* gas/config/tc-avr.c (exp_mod_data): Make global.
(pexp_mod_data): Delete.
(avr_parse_cons_expression): Return exp_mod_data pointer.
(avr_cons_fix_new): Add exp_mod_data_t pointer param.
(exp_mod_data_t): Move typedef..
* gas/config/tc-avr.h: ..to here.
(exp_mod_data): Declare.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
(avr_parse_cons_expression, avr_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Update.
* gas/config/tc-hppa.c (hppa_field_selector): Delete static var.
(cons_fix_new_hppa): Add hppa_field_selector param.
(fix_new_hppa): Adjust.
(parse_cons_expression_hppa): Return field selector.
* gas/config/tc-hppa.h (parse_cons_expression_hppa): Update proto.
(cons_fix_new_hppa): Likewise.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
* gas/config/tc-i386.c (got_reloc): Delete static var.
(x86_cons_fix_new): Add reloc param.
(x86_cons): Return got reloc.
* gas/config/tc-i386.h (x86_cons, x86_cons_fix_new): Update proto.
(TC_CONS_FIX_NEW): Add RELOC param.
* gas/config/tc-ia64.c (ia64_cons_fix_new): Add reloc param. Adjust
calls.
* gas/config/tc-ia64.h (ia64_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add reloc param.
* gas/config/tc-microblaze.c (parse_cons_expression_microblaze):
Return reloc.
(cons_fix_new_microblaze): Add reloc param.
* gas/config/tc-microblaze.h: Formatting.
(parse_cons_expression_microblaze): Update proto.
(cons_fix_new_microblaze): Likewise.
* gas/config/tc-nios2.c (nios2_tls_ldo_reloc): Delete static var.
(nios2_cons): Return ldo reloc.
(nios2_cons_fix_new): Delete.
* gas/config/tc-nios2.h (nios2_cons): Update prototype.
(nios2_cons_fix_new, TC_CONS_FIX_NEW): Delete.
* gas/config/tc-ppc.c (md_pseudo_table): Remove quad, long, word,
short. Make llong use cons.
(ppc_elf_suffix): Return BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(ppc_elf_cons): Delete.
(ppc_elf_parse_cons): New function.
(ppc_elf_validate_fix): Don't check for BFD_RELOC_UNUSED.
(md_assemble): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
* gas/config/tc-ppc.h (TC_PARSE_CONS_EXPRESSION): Define
(ppc_elf_parse_cons): Declare.
* gas/config/tc-sparc.c (sparc_cons_special_reloc): Delete static var.
(sparc_cons): Return reloc specifier.
(cons_fix_new_sparc): Add reloc specifier param.
(sparc_cfi_emit_pcrel_expr): Use emit_expr_with_reloc.
* gas/config/tc-sparc.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(sparc_cons, cons_fix_new_sparc): Update prototype.
* gas/config/tc-v850.c (hold_cons_reloc): Delete static var.
(v850_reloc_prefix): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(md_assemble): Likewise.
(parse_cons_expression_v850): Return reloc.
(cons_fix_new_v850): Add reloc parameter.
* gas/config/tc-v850.h (parse_cons_expression_v850): Update proto.
(cons_fix_new_v850): Likewise.
* gas/config/tc-vax.c (vax_cons_special_reloc): Delete static var.
(vax_cons): Return reloc.
(vax_cons_fix_new): Add reloc parameter.
* gas/config/tc-vax.h (vax_cons, vax_cons_fix_new): Update proto.
* gas/config/tc-xstormy16.c (xstormy16_cons_fix_new): Add reloc param.
* gas/config/tc-xstormy16.h (xstormy16_cons_fix_new): Update proto.
* gas/dwarf2dbg.c (TC_PARSE_CONS_RETURN_NONE): Provide default.
(emit_fixed_inc_line_addr): Adjust exmit_expr_fix calls.
* gas/read.c (TC_PARSE_CONS_EXPRESSION): Return value.
(do_parse_cons_expression): Adjust.
(cons_worker): Pass return value from TC_PARSE_CONS_EXPRESSION
to emit_expr_with_reloc.
(emit_expr_with_reloc): New function handling reloc, mostly
extracted from..
(emit_expr): ..here.
(emit_expr_fix): Add reloc param. Adjust TC_CONS_FIX_NEW invocation.
Handle reloc.
(parse_mri_cons): Convert to ISO.
* gas/read.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(emit_expr_with_reloc): Declare.
(emit_expr_fix): Update prototype.
* gas/write.c (write_object_file): Update TC_CONS_FIX_NEW invocation.
2014-04-08 07:08:22 +02:00
|
|
|
{
|
|
|
|
++input_line_pointer;
|
|
|
|
return pexp;
|
|
|
|
}
|
2000-03-27 10:39:14 +02:00
|
|
|
else
|
|
|
|
{
|
2000-07-04 00:25:33 +02:00
|
|
|
as_bad (_("`)' required"));
|
gas TC_PARSE_CONS_EXPRESSION communication with TC_CONS_FIX_NEW
A number of targets pass extra information from TC_PARSE_CONS_EXPRESSION
to TC_CONS_FIX_NEW via static variables. That's OK, but not best
practice. tc-ppc.c goes further in implementing its own replacement
for cons(), because the generic one doesn't allow relocation modifiers
on constants. This patch fixes both of these warts.
* gas/config/tc-alpha.h (TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arc.c (arc_cons_fix_new): Add reloc parameter.
* gas/config/tc-arc.h (arc_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arm.c (cons_fix_new_arm): Similarly
* gas/config/tc-arm.h (cons_fix_new_arm, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-cr16.c (cr16_cons_fix_new): Similarly.
* gas/config/tc-cr16.h (cr16_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-crx.h (TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-m32c.c (m32c_cons_fix_new): Similarly.
* gas/config/tc-m32c.h (m32c_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-mn10300.c (mn10300_cons_fix_new): Similarly.
* gas/config/tc-mn10300.h (mn10300_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-ns32k.c (cons_fix_new_ns32k): Similarly.
* gas/config/tc-ns32k.h (cons_fix_new_ns32k): Similarly.
* gas/config/tc-pj.c (pj_cons_fix_new_pj): Similarly.
* gas/config/tc-pj.h (pj_cons_fix_new_pj, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-rx.c (rx_cons_fix_new): Similarly.
* gas/config/tc-rx.h (rx_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-sh.c (sh_cons_fix_new): Similarly.
* gas/config/tc-sh.h (sh_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-tic54x.c (tic54x_cons_fix_new): Similarly.
* gas/config/tc-tic54x.h (tic54x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-tic6x.c (tic6x_cons_fix_new): Similarly.
* gas/config/tc-tic6x.h (tic6x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-arc.c (arc_parse_cons_expression): Return reloc.
* gas/config/tc-arc.h (arc_parse_cons_expression): Update proto.
* gas/config/tc-avr.c (exp_mod_data): Make global.
(pexp_mod_data): Delete.
(avr_parse_cons_expression): Return exp_mod_data pointer.
(avr_cons_fix_new): Add exp_mod_data_t pointer param.
(exp_mod_data_t): Move typedef..
* gas/config/tc-avr.h: ..to here.
(exp_mod_data): Declare.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
(avr_parse_cons_expression, avr_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Update.
* gas/config/tc-hppa.c (hppa_field_selector): Delete static var.
(cons_fix_new_hppa): Add hppa_field_selector param.
(fix_new_hppa): Adjust.
(parse_cons_expression_hppa): Return field selector.
* gas/config/tc-hppa.h (parse_cons_expression_hppa): Update proto.
(cons_fix_new_hppa): Likewise.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
* gas/config/tc-i386.c (got_reloc): Delete static var.
(x86_cons_fix_new): Add reloc param.
(x86_cons): Return got reloc.
* gas/config/tc-i386.h (x86_cons, x86_cons_fix_new): Update proto.
(TC_CONS_FIX_NEW): Add RELOC param.
* gas/config/tc-ia64.c (ia64_cons_fix_new): Add reloc param. Adjust
calls.
* gas/config/tc-ia64.h (ia64_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add reloc param.
* gas/config/tc-microblaze.c (parse_cons_expression_microblaze):
Return reloc.
(cons_fix_new_microblaze): Add reloc param.
* gas/config/tc-microblaze.h: Formatting.
(parse_cons_expression_microblaze): Update proto.
(cons_fix_new_microblaze): Likewise.
* gas/config/tc-nios2.c (nios2_tls_ldo_reloc): Delete static var.
(nios2_cons): Return ldo reloc.
(nios2_cons_fix_new): Delete.
* gas/config/tc-nios2.h (nios2_cons): Update prototype.
(nios2_cons_fix_new, TC_CONS_FIX_NEW): Delete.
* gas/config/tc-ppc.c (md_pseudo_table): Remove quad, long, word,
short. Make llong use cons.
(ppc_elf_suffix): Return BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(ppc_elf_cons): Delete.
(ppc_elf_parse_cons): New function.
(ppc_elf_validate_fix): Don't check for BFD_RELOC_UNUSED.
(md_assemble): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
* gas/config/tc-ppc.h (TC_PARSE_CONS_EXPRESSION): Define
(ppc_elf_parse_cons): Declare.
* gas/config/tc-sparc.c (sparc_cons_special_reloc): Delete static var.
(sparc_cons): Return reloc specifier.
(cons_fix_new_sparc): Add reloc specifier param.
(sparc_cfi_emit_pcrel_expr): Use emit_expr_with_reloc.
* gas/config/tc-sparc.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(sparc_cons, cons_fix_new_sparc): Update prototype.
* gas/config/tc-v850.c (hold_cons_reloc): Delete static var.
(v850_reloc_prefix): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(md_assemble): Likewise.
(parse_cons_expression_v850): Return reloc.
(cons_fix_new_v850): Add reloc parameter.
* gas/config/tc-v850.h (parse_cons_expression_v850): Update proto.
(cons_fix_new_v850): Likewise.
* gas/config/tc-vax.c (vax_cons_special_reloc): Delete static var.
(vax_cons): Return reloc.
(vax_cons_fix_new): Add reloc parameter.
* gas/config/tc-vax.h (vax_cons, vax_cons_fix_new): Update proto.
* gas/config/tc-xstormy16.c (xstormy16_cons_fix_new): Add reloc param.
* gas/config/tc-xstormy16.h (xstormy16_cons_fix_new): Update proto.
* gas/dwarf2dbg.c (TC_PARSE_CONS_RETURN_NONE): Provide default.
(emit_fixed_inc_line_addr): Adjust exmit_expr_fix calls.
* gas/read.c (TC_PARSE_CONS_EXPRESSION): Return value.
(do_parse_cons_expression): Adjust.
(cons_worker): Pass return value from TC_PARSE_CONS_EXPRESSION
to emit_expr_with_reloc.
(emit_expr_with_reloc): New function handling reloc, mostly
extracted from..
(emit_expr): ..here.
(emit_expr_fix): Add reloc param. Adjust TC_CONS_FIX_NEW invocation.
Handle reloc.
(parse_mri_cons): Convert to ISO.
* gas/read.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(emit_expr_with_reloc): Declare.
(emit_expr_fix): Update prototype.
* gas/write.c (write_object_file): Update TC_CONS_FIX_NEW invocation.
2014-04-08 07:08:22 +02:00
|
|
|
return &exp_mod_data[0];
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
}
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
input_line_pointer = tmp;
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
|
|
|
|
break;
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
}
|
2000-09-15 03:06:52 +02:00
|
|
|
|
2000-03-27 10:39:14 +02:00
|
|
|
expression (exp);
|
gas TC_PARSE_CONS_EXPRESSION communication with TC_CONS_FIX_NEW
A number of targets pass extra information from TC_PARSE_CONS_EXPRESSION
to TC_CONS_FIX_NEW via static variables. That's OK, but not best
practice. tc-ppc.c goes further in implementing its own replacement
for cons(), because the generic one doesn't allow relocation modifiers
on constants. This patch fixes both of these warts.
* gas/config/tc-alpha.h (TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arc.c (arc_cons_fix_new): Add reloc parameter.
* gas/config/tc-arc.h (arc_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arm.c (cons_fix_new_arm): Similarly
* gas/config/tc-arm.h (cons_fix_new_arm, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-cr16.c (cr16_cons_fix_new): Similarly.
* gas/config/tc-cr16.h (cr16_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-crx.h (TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-m32c.c (m32c_cons_fix_new): Similarly.
* gas/config/tc-m32c.h (m32c_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-mn10300.c (mn10300_cons_fix_new): Similarly.
* gas/config/tc-mn10300.h (mn10300_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-ns32k.c (cons_fix_new_ns32k): Similarly.
* gas/config/tc-ns32k.h (cons_fix_new_ns32k): Similarly.
* gas/config/tc-pj.c (pj_cons_fix_new_pj): Similarly.
* gas/config/tc-pj.h (pj_cons_fix_new_pj, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-rx.c (rx_cons_fix_new): Similarly.
* gas/config/tc-rx.h (rx_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-sh.c (sh_cons_fix_new): Similarly.
* gas/config/tc-sh.h (sh_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-tic54x.c (tic54x_cons_fix_new): Similarly.
* gas/config/tc-tic54x.h (tic54x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-tic6x.c (tic6x_cons_fix_new): Similarly.
* gas/config/tc-tic6x.h (tic6x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-arc.c (arc_parse_cons_expression): Return reloc.
* gas/config/tc-arc.h (arc_parse_cons_expression): Update proto.
* gas/config/tc-avr.c (exp_mod_data): Make global.
(pexp_mod_data): Delete.
(avr_parse_cons_expression): Return exp_mod_data pointer.
(avr_cons_fix_new): Add exp_mod_data_t pointer param.
(exp_mod_data_t): Move typedef..
* gas/config/tc-avr.h: ..to here.
(exp_mod_data): Declare.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
(avr_parse_cons_expression, avr_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Update.
* gas/config/tc-hppa.c (hppa_field_selector): Delete static var.
(cons_fix_new_hppa): Add hppa_field_selector param.
(fix_new_hppa): Adjust.
(parse_cons_expression_hppa): Return field selector.
* gas/config/tc-hppa.h (parse_cons_expression_hppa): Update proto.
(cons_fix_new_hppa): Likewise.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
* gas/config/tc-i386.c (got_reloc): Delete static var.
(x86_cons_fix_new): Add reloc param.
(x86_cons): Return got reloc.
* gas/config/tc-i386.h (x86_cons, x86_cons_fix_new): Update proto.
(TC_CONS_FIX_NEW): Add RELOC param.
* gas/config/tc-ia64.c (ia64_cons_fix_new): Add reloc param. Adjust
calls.
* gas/config/tc-ia64.h (ia64_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add reloc param.
* gas/config/tc-microblaze.c (parse_cons_expression_microblaze):
Return reloc.
(cons_fix_new_microblaze): Add reloc param.
* gas/config/tc-microblaze.h: Formatting.
(parse_cons_expression_microblaze): Update proto.
(cons_fix_new_microblaze): Likewise.
* gas/config/tc-nios2.c (nios2_tls_ldo_reloc): Delete static var.
(nios2_cons): Return ldo reloc.
(nios2_cons_fix_new): Delete.
* gas/config/tc-nios2.h (nios2_cons): Update prototype.
(nios2_cons_fix_new, TC_CONS_FIX_NEW): Delete.
* gas/config/tc-ppc.c (md_pseudo_table): Remove quad, long, word,
short. Make llong use cons.
(ppc_elf_suffix): Return BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(ppc_elf_cons): Delete.
(ppc_elf_parse_cons): New function.
(ppc_elf_validate_fix): Don't check for BFD_RELOC_UNUSED.
(md_assemble): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
* gas/config/tc-ppc.h (TC_PARSE_CONS_EXPRESSION): Define
(ppc_elf_parse_cons): Declare.
* gas/config/tc-sparc.c (sparc_cons_special_reloc): Delete static var.
(sparc_cons): Return reloc specifier.
(cons_fix_new_sparc): Add reloc specifier param.
(sparc_cfi_emit_pcrel_expr): Use emit_expr_with_reloc.
* gas/config/tc-sparc.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(sparc_cons, cons_fix_new_sparc): Update prototype.
* gas/config/tc-v850.c (hold_cons_reloc): Delete static var.
(v850_reloc_prefix): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(md_assemble): Likewise.
(parse_cons_expression_v850): Return reloc.
(cons_fix_new_v850): Add reloc parameter.
* gas/config/tc-v850.h (parse_cons_expression_v850): Update proto.
(cons_fix_new_v850): Likewise.
* gas/config/tc-vax.c (vax_cons_special_reloc): Delete static var.
(vax_cons): Return reloc.
(vax_cons_fix_new): Add reloc parameter.
* gas/config/tc-vax.h (vax_cons, vax_cons_fix_new): Update proto.
* gas/config/tc-xstormy16.c (xstormy16_cons_fix_new): Add reloc param.
* gas/config/tc-xstormy16.h (xstormy16_cons_fix_new): Update proto.
* gas/dwarf2dbg.c (TC_PARSE_CONS_RETURN_NONE): Provide default.
(emit_fixed_inc_line_addr): Adjust exmit_expr_fix calls.
* gas/read.c (TC_PARSE_CONS_EXPRESSION): Return value.
(do_parse_cons_expression): Adjust.
(cons_worker): Pass return value from TC_PARSE_CONS_EXPRESSION
to emit_expr_with_reloc.
(emit_expr_with_reloc): New function handling reloc, mostly
extracted from..
(emit_expr): ..here.
(emit_expr_fix): Add reloc param. Adjust TC_CONS_FIX_NEW invocation.
Handle reloc.
(parse_mri_cons): Convert to ISO.
* gas/read.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(emit_expr_with_reloc): Declare.
(emit_expr_fix): Update prototype.
* gas/write.c (write_object_file): Update TC_CONS_FIX_NEW invocation.
2014-04-08 07:08:22 +02:00
|
|
|
return &exp_mod_data[0];
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2005-10-12 12:56:46 +02:00
|
|
|
avr_cons_fix_new (fragS *frag,
|
|
|
|
int where,
|
|
|
|
int nbytes,
|
gas TC_PARSE_CONS_EXPRESSION communication with TC_CONS_FIX_NEW
A number of targets pass extra information from TC_PARSE_CONS_EXPRESSION
to TC_CONS_FIX_NEW via static variables. That's OK, but not best
practice. tc-ppc.c goes further in implementing its own replacement
for cons(), because the generic one doesn't allow relocation modifiers
on constants. This patch fixes both of these warts.
* gas/config/tc-alpha.h (TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arc.c (arc_cons_fix_new): Add reloc parameter.
* gas/config/tc-arc.h (arc_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add RELOC parameter.
* gas/config/tc-arm.c (cons_fix_new_arm): Similarly
* gas/config/tc-arm.h (cons_fix_new_arm, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-cr16.c (cr16_cons_fix_new): Similarly.
* gas/config/tc-cr16.h (cr16_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-crx.h (TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-m32c.c (m32c_cons_fix_new): Similarly.
* gas/config/tc-m32c.h (m32c_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-mn10300.c (mn10300_cons_fix_new): Similarly.
* gas/config/tc-mn10300.h (mn10300_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-ns32k.c (cons_fix_new_ns32k): Similarly.
* gas/config/tc-ns32k.h (cons_fix_new_ns32k): Similarly.
* gas/config/tc-pj.c (pj_cons_fix_new_pj): Similarly.
* gas/config/tc-pj.h (pj_cons_fix_new_pj, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-rx.c (rx_cons_fix_new): Similarly.
* gas/config/tc-rx.h (rx_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-sh.c (sh_cons_fix_new): Similarly.
* gas/config/tc-sh.h (sh_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
* gas/config/tc-tic54x.c (tic54x_cons_fix_new): Similarly.
* gas/config/tc-tic54x.h (tic54x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-tic6x.c (tic6x_cons_fix_new): Similarly.
* gas/config/tc-tic6x.h (tic6x_cons_fix_new, TC_CONS_FIX_NEW):
Similarly.
* gas/config/tc-arc.c (arc_parse_cons_expression): Return reloc.
* gas/config/tc-arc.h (arc_parse_cons_expression): Update proto.
* gas/config/tc-avr.c (exp_mod_data): Make global.
(pexp_mod_data): Delete.
(avr_parse_cons_expression): Return exp_mod_data pointer.
(avr_cons_fix_new): Add exp_mod_data_t pointer param.
(exp_mod_data_t): Move typedef..
* gas/config/tc-avr.h: ..to here.
(exp_mod_data): Declare.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
(avr_parse_cons_expression, avr_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Update.
* gas/config/tc-hppa.c (hppa_field_selector): Delete static var.
(cons_fix_new_hppa): Add hppa_field_selector param.
(fix_new_hppa): Adjust.
(parse_cons_expression_hppa): Return field selector.
* gas/config/tc-hppa.h (parse_cons_expression_hppa): Update proto.
(cons_fix_new_hppa): Likewise.
(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
* gas/config/tc-i386.c (got_reloc): Delete static var.
(x86_cons_fix_new): Add reloc param.
(x86_cons): Return got reloc.
* gas/config/tc-i386.h (x86_cons, x86_cons_fix_new): Update proto.
(TC_CONS_FIX_NEW): Add RELOC param.
* gas/config/tc-ia64.c (ia64_cons_fix_new): Add reloc param. Adjust
calls.
* gas/config/tc-ia64.h (ia64_cons_fix_new): Update prototype.
(TC_CONS_FIX_NEW): Add reloc param.
* gas/config/tc-microblaze.c (parse_cons_expression_microblaze):
Return reloc.
(cons_fix_new_microblaze): Add reloc param.
* gas/config/tc-microblaze.h: Formatting.
(parse_cons_expression_microblaze): Update proto.
(cons_fix_new_microblaze): Likewise.
* gas/config/tc-nios2.c (nios2_tls_ldo_reloc): Delete static var.
(nios2_cons): Return ldo reloc.
(nios2_cons_fix_new): Delete.
* gas/config/tc-nios2.h (nios2_cons): Update prototype.
(nios2_cons_fix_new, TC_CONS_FIX_NEW): Delete.
* gas/config/tc-ppc.c (md_pseudo_table): Remove quad, long, word,
short. Make llong use cons.
(ppc_elf_suffix): Return BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(ppc_elf_cons): Delete.
(ppc_elf_parse_cons): New function.
(ppc_elf_validate_fix): Don't check for BFD_RELOC_UNUSED.
(md_assemble): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
* gas/config/tc-ppc.h (TC_PARSE_CONS_EXPRESSION): Define
(ppc_elf_parse_cons): Declare.
* gas/config/tc-sparc.c (sparc_cons_special_reloc): Delete static var.
(sparc_cons): Return reloc specifier.
(cons_fix_new_sparc): Add reloc specifier param.
(sparc_cfi_emit_pcrel_expr): Use emit_expr_with_reloc.
* gas/config/tc-sparc.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(sparc_cons, cons_fix_new_sparc): Update prototype.
* gas/config/tc-v850.c (hold_cons_reloc): Delete static var.
(v850_reloc_prefix): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
(md_assemble): Likewise.
(parse_cons_expression_v850): Return reloc.
(cons_fix_new_v850): Add reloc parameter.
* gas/config/tc-v850.h (parse_cons_expression_v850): Update proto.
(cons_fix_new_v850): Likewise.
* gas/config/tc-vax.c (vax_cons_special_reloc): Delete static var.
(vax_cons): Return reloc.
(vax_cons_fix_new): Add reloc parameter.
* gas/config/tc-vax.h (vax_cons, vax_cons_fix_new): Update proto.
* gas/config/tc-xstormy16.c (xstormy16_cons_fix_new): Add reloc param.
* gas/config/tc-xstormy16.h (xstormy16_cons_fix_new): Update proto.
* gas/dwarf2dbg.c (TC_PARSE_CONS_RETURN_NONE): Provide default.
(emit_fixed_inc_line_addr): Adjust exmit_expr_fix calls.
* gas/read.c (TC_PARSE_CONS_EXPRESSION): Return value.
(do_parse_cons_expression): Adjust.
(cons_worker): Pass return value from TC_PARSE_CONS_EXPRESSION
to emit_expr_with_reloc.
(emit_expr_with_reloc): New function handling reloc, mostly
extracted from..
(emit_expr): ..here.
(emit_expr_fix): Add reloc param. Adjust TC_CONS_FIX_NEW invocation.
Handle reloc.
(parse_mri_cons): Convert to ISO.
* gas/read.h (TC_PARSE_CONS_RETURN_TYPE): Define.
(TC_PARSE_CONS_RETURN_NONE): Define.
(emit_expr_with_reloc): Declare.
(emit_expr_fix): Update prototype.
* gas/write.c (write_object_file): Update TC_CONS_FIX_NEW invocation.
2014-04-08 07:08:22 +02:00
|
|
|
expressionS *exp,
|
|
|
|
const exp_mod_data_t *pexp_mod_data)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
int bad = 0;
|
|
|
|
|
|
|
|
switch (pexp_mod_data->reloc)
|
2000-03-27 10:39:14 +02:00
|
|
|
{
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
default:
|
2010-02-23 12:38:36 +01:00
|
|
|
if (nbytes == 1)
|
|
|
|
fix_new_exp (frag, where, nbytes, exp, FALSE, BFD_RELOC_8);
|
|
|
|
else if (nbytes == 2)
|
2002-11-30 09:39:46 +01:00
|
|
|
fix_new_exp (frag, where, nbytes, exp, FALSE, BFD_RELOC_16);
|
2000-03-27 10:39:14 +02:00
|
|
|
else if (nbytes == 4)
|
2002-11-30 09:39:46 +01:00
|
|
|
fix_new_exp (frag, where, nbytes, exp, FALSE, BFD_RELOC_32);
|
2000-03-27 10:39:14 +02:00
|
|
|
else
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
bad = 1;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BFD_RELOC_AVR_16_PM:
|
|
|
|
case BFD_RELOC_AVR_8_LO:
|
|
|
|
case BFD_RELOC_AVR_8_HI:
|
2012-05-16 16:52:16 +02:00
|
|
|
case BFD_RELOC_AVR_8_HLO:
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
if (nbytes == pexp_mod_data->nbytes)
|
|
|
|
fix_new_exp (frag, where, nbytes, exp, FALSE, pexp_mod_data->reloc);
|
2000-03-27 10:39:14 +02:00
|
|
|
else
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
bad = 1;
|
|
|
|
break;
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
PR 13503
* reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenrate.
* elf32-avr.c (elf_avr_howto_table): Add entries for
R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
(avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
R_AVR_8_HHI8.
* config/tc-avr.c (exp_mod_pm): Remove variable.
(exp_mod_data_t): New typedef.
(pexp_mod_data, exp_mod_data): New variables.
(avr_parse_cons_expression): Scan through exp_mod_data[] to find
data expression modifiers "pm", "gs", "lo8", hi8", "hhi8", "hh8"
and set pexp_mod_data accordingly to be used in avr_cons_fix_new.
(avr_cons_fix_new): Handle new data expression modifiers shipped
in pexp_mod_data.
(md_apply_fix): Handle BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HHI.
* elf/avr.h (RELOC_NUMBERS): Add values for R_AVR_8_LO8,
R_AVR_8_HI8, R_AVR_8_HHI8.
2012-05-11 14:59:23 +02:00
|
|
|
|
|
|
|
if (bad)
|
2017-01-23 16:23:07 +01:00
|
|
|
as_bad (_("illegal %s relocation size: %d"), pexp_mod_data->error, nbytes);
|
2000-03-27 10:39:14 +02:00
|
|
|
}
|
2011-03-29 20:16:16 +02:00
|
|
|
|
2013-03-21 15:47:34 +01:00
|
|
|
static bfd_boolean
|
|
|
|
mcu_has_3_byte_pc (void)
|
|
|
|
{
|
2014-07-07 17:15:19 +02:00
|
|
|
int mach = avr_mcu->mach;
|
2013-03-21 15:47:34 +01:00
|
|
|
|
2014-07-07 17:15:19 +02:00
|
|
|
return mach == bfd_mach_avr6
|
|
|
|
|| mach == bfd_mach_avrxmega6
|
2013-03-21 15:47:34 +01:00
|
|
|
|| mach == bfd_mach_avrxmega7;
|
|
|
|
}
|
|
|
|
|
2011-03-29 20:16:16 +02:00
|
|
|
void
|
|
|
|
tc_cfi_frame_initial_instructions (void)
|
|
|
|
{
|
|
|
|
/* AVR6 pushes 3 bytes for calls. */
|
2013-03-21 15:47:34 +01:00
|
|
|
int return_size = (mcu_has_3_byte_pc () ? 3 : 2);
|
2011-03-29 20:16:16 +02:00
|
|
|
|
|
|
|
/* The CFA is the caller's stack location before the call insn. */
|
|
|
|
/* Note that the stack pointer is dwarf register number 32. */
|
|
|
|
cfi_add_CFA_def_cfa (32, return_size);
|
|
|
|
|
|
|
|
/* Note that AVR consistently uses post-decrement, which means that things
|
2017-01-23 16:23:07 +01:00
|
|
|
do not line up the same way as for targets that use pre-decrement. */
|
2011-03-29 20:16:16 +02:00
|
|
|
cfi_add_CFA_offset (DWARF2_DEFAULT_RETURN_COLUMN, 1-return_size);
|
|
|
|
}
|
2014-04-10 17:50:33 +02:00
|
|
|
|
|
|
|
bfd_boolean
|
|
|
|
avr_allow_local_subtract (expressionS * left,
|
|
|
|
expressionS * right,
|
|
|
|
segT section)
|
|
|
|
{
|
2014-07-07 17:15:19 +02:00
|
|
|
/* If we are not in relaxation mode, subtraction is OK. */
|
2014-04-10 17:50:33 +02:00
|
|
|
if (!linkrelax)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* If the symbols are not in a code section then they are OK. */
|
|
|
|
if ((section->flags & SEC_CODE) == 0)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
if (left->X_add_symbol == right->X_add_symbol)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* We have to assume that there may be instructions between the
|
|
|
|
two symbols and that relaxation may increase the distance between
|
|
|
|
them. */
|
|
|
|
return FALSE;
|
|
|
|
}
|
2014-11-23 00:19:31 +01:00
|
|
|
|
|
|
|
void
|
|
|
|
avr_elf_final_processing (void)
|
|
|
|
{
|
|
|
|
if (linkrelax)
|
|
|
|
elf_elfheader (stdoutput)->e_flags |= EF_AVR_LINKRELAX_PREPARED;
|
|
|
|
}
|
2015-01-08 21:55:10 +01:00
|
|
|
|
|
|
|
/* Write out the header of a .avr.prop section into the area pointed to by
|
|
|
|
DATA. The RECORD_COUNT will be placed in the header as the number of
|
|
|
|
records that are to follow.
|
|
|
|
The area DATA must be big enough the receive the header, which is
|
|
|
|
AVR_PROPERTY_SECTION_HEADER_SIZE bytes long. */
|
|
|
|
|
|
|
|
static char *
|
|
|
|
avr_output_property_section_header (char *data,
|
|
|
|
unsigned int record_count)
|
|
|
|
{
|
|
|
|
char *orig_data = data;
|
|
|
|
|
|
|
|
md_number_to_chars (data, AVR_PROPERTY_RECORDS_VERSION, 1);
|
|
|
|
data++;
|
|
|
|
/* There's space for a single byte flags field, but right now there's
|
|
|
|
nothing to go in here, so just set the value to zero. */
|
|
|
|
md_number_to_chars (data, 0, 1);
|
|
|
|
data++;
|
|
|
|
md_number_to_chars (data, record_count, 2);
|
|
|
|
data+=2;
|
|
|
|
|
|
|
|
gas_assert (data - orig_data == AVR_PROPERTY_SECTION_HEADER_SIZE);
|
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the number of bytes required to store RECORD into the .avr.prop
|
|
|
|
section. The size returned is the compressed size that corresponds to
|
|
|
|
how the record will be written out in AVR_OUTPUT_PROPERTY_RECORD. */
|
|
|
|
|
|
|
|
static int
|
|
|
|
avr_record_size (const struct avr_property_record *record)
|
|
|
|
{
|
|
|
|
/* The first 5 bytes are a 4-byte address, followed by a 1-byte type
|
|
|
|
identifier. */
|
|
|
|
int size = 5;
|
|
|
|
|
|
|
|
switch (record->type)
|
|
|
|
{
|
|
|
|
case RECORD_ORG:
|
|
|
|
size += 0; /* No extra information. */
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RECORD_ORG_AND_FILL:
|
|
|
|
size += 4; /* A 4-byte fill value. */
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RECORD_ALIGN:
|
|
|
|
size += 4; /* A 4-byte alignment value. */
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RECORD_ALIGN_AND_FILL:
|
|
|
|
size += 8; /* A 4-byte alignment, and 4-byte fill value. */
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
as_fatal (_("unknown record type %d (in %s)"),
|
|
|
|
record->type, __PRETTY_FUNCTION__);
|
|
|
|
}
|
|
|
|
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Write out RECORD. FRAG_BASE points to the start of the data area setup
|
|
|
|
to hold all of the .avr.prop content, FRAG_PTR points to the next
|
|
|
|
writable location. The data area must be big enough to hold all of the
|
|
|
|
records. The size of the data written out for this RECORD must match
|
|
|
|
the size from AVR_RECORD_SIZE. */
|
|
|
|
|
|
|
|
static char *
|
|
|
|
avr_output_property_record (char * const frag_base, char *frag_ptr,
|
|
|
|
const struct avr_property_record *record)
|
|
|
|
{
|
|
|
|
fixS *fix;
|
|
|
|
int where;
|
|
|
|
char *init_frag_ptr = frag_ptr;
|
|
|
|
|
|
|
|
where = frag_ptr - frag_base;
|
|
|
|
fix = fix_new (frag_now, where, 4,
|
|
|
|
section_symbol (record->section),
|
|
|
|
record->offset, FALSE, BFD_RELOC_32);
|
|
|
|
fix->fx_file = "<internal>";
|
|
|
|
fix->fx_line = 0;
|
|
|
|
frag_ptr += 4;
|
|
|
|
|
|
|
|
md_number_to_chars (frag_ptr, (bfd_byte) record->type, 1);
|
|
|
|
frag_ptr += 1;
|
|
|
|
|
|
|
|
/* Write out the rest of the data. */
|
|
|
|
switch (record->type)
|
|
|
|
{
|
|
|
|
case RECORD_ORG:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RECORD_ORG_AND_FILL:
|
|
|
|
md_number_to_chars (frag_ptr, record->data.org.fill, 4);
|
|
|
|
frag_ptr += 4;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RECORD_ALIGN:
|
|
|
|
md_number_to_chars (frag_ptr, record->data.align.bytes, 4);
|
|
|
|
frag_ptr += 4;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RECORD_ALIGN_AND_FILL:
|
|
|
|
md_number_to_chars (frag_ptr, record->data.align.bytes, 4);
|
2015-10-07 21:47:38 +02:00
|
|
|
md_number_to_chars (frag_ptr + 4, record->data.align.fill, 4);
|
2015-01-08 21:55:10 +01:00
|
|
|
frag_ptr += 8;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
as_fatal (_("unknown record type %d (in %s)"),
|
|
|
|
record->type, __PRETTY_FUNCTION__);
|
|
|
|
}
|
|
|
|
|
|
|
|
gas_assert (frag_ptr - init_frag_ptr == avr_record_size (record));
|
|
|
|
|
|
|
|
return frag_ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Create the section to hold the AVR property information. Return the
|
|
|
|
section. */
|
|
|
|
|
|
|
|
static asection *
|
|
|
|
avr_create_property_section (void)
|
|
|
|
{
|
|
|
|
asection *sec;
|
|
|
|
flagword flags = (SEC_RELOC | SEC_HAS_CONTENTS | SEC_READONLY);
|
|
|
|
const char *section_name = AVR_PROPERTY_RECORD_SECTION_NAME;
|
|
|
|
|
|
|
|
sec = bfd_make_section (stdoutput, section_name);
|
|
|
|
if (sec == NULL)
|
|
|
|
as_fatal (_("Failed to create property section `%s'\n"), section_name);
|
bfd_section_* macros
This large patch removes the unnecessary bfd parameter from various
bfd section macros and functions. The bfd is hardly ever used and if
needed for the bfd_set_section_* or bfd_rename_section functions can
be found via section->owner except for the com, und, abs, and ind
std_section special sections. Those sections shouldn't be modified
anyway.
The patch also removes various bfd_get_section_<field> macros,
replacing their use with bfd_section_<field>, and adds
bfd_set_section_lma. I've also fixed a minor bug in gas where
compressed section renaming was done directly rather than calling
bfd_rename_section. This would have broken bfd_get_section_by_name
and similar functions, but that hardly mattered at such a late stage
in gas processing.
bfd/
* bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
(bfd_get_section_lma, bfd_get_section_alignment),
(bfd_get_section_size, bfd_get_section_flags),
(bfd_get_section_userdata): Delete.
(bfd_section_name, bfd_section_size, bfd_section_vma),
(bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
(bfd_section_flags, bfd_section_userdata): New.
(bfd_is_com_section): Rename parameter.
* section.c (bfd_set_section_userdata, bfd_set_section_vma),
(bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
(bfd_set_section_size): Delete bfd parameter, rename section parameter.
(bfd_set_section_lma): New.
* bfd-in2.h: Regenerate.
* mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
update callers.
* aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
* coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
* compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
* elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
* elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
* elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
* elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
* elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
* elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
* elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
* elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
* elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
* elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
* elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
* elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
* elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
* elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
* elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
* elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
* elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
* elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
* elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
* elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
* mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
* peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
* xcofflink.c: Update throughout for bfd section macro and function
changes.
binutils/
* addr2line.c, * bucomm.c, * coffgrok.c, * dlltool.c, * nm.c,
* objcopy.c, * objdump.c, * od-elf32_avr.c, * od-macho.c,
* od-xcoff.c, * prdbg.c, * rdcoff.c, * rddbg.c, * rescoff.c,
* resres.c, * size.c, * srconv.c, * strings.c, * windmc.c: Update
throughout for bfd section macro and function changes.
gas/
* as.c, * as.h, * dw2gencfi.c, * dwarf2dbg.c, * ecoff.c,
* read.c, * stabs.c, * subsegs.c, * subsegs.h, * write.c,
* config/obj-coff-seh.c, * config/obj-coff.c, * config/obj-ecoff.c,
* config/obj-elf.c, * config/obj-macho.c, * config/obj-som.c,
* config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c,
* config/tc-arm.c, * config/tc-avr.c, * config/tc-bfin.c,
* config/tc-bpf.c, * config/tc-d10v.c, * config/tc-d30v.c,
* config/tc-epiphany.c, * config/tc-fr30.c, * config/tc-frv.c,
* config/tc-h8300.c, * config/tc-hppa.c, * config/tc-i386.c,
* config/tc-ia64.c, * config/tc-ip2k.c, * config/tc-iq2000.c,
* config/tc-lm32.c, * config/tc-m32c.c, * config/tc-m32r.c,
* config/tc-m68hc11.c, * config/tc-mep.c, * config/tc-microblaze.c,
* config/tc-mips.c, * config/tc-mmix.c, * config/tc-mn10200.c,
* config/tc-mn10300.c, * config/tc-msp430.c, * config/tc-mt.c,
* config/tc-nds32.c, * config/tc-or1k.c, * config/tc-ppc.c,
* config/tc-pru.c, * config/tc-rl78.c, * config/tc-rx.c,
* config/tc-s12z.c, * config/tc-s390.c, * config/tc-score.c,
* config/tc-score7.c, * config/tc-sh.c, * config/tc-sparc.c,
* config/tc-spu.c, * config/tc-tic4x.c, * config/tc-tic54x.c,
* config/tc-tic6x.c, * config/tc-tilegx.c, * config/tc-tilepro.c,
* config/tc-v850.c, * config/tc-visium.c, * config/tc-wasm32.c,
* config/tc-xc16x.c, * config/tc-xgate.c, * config/tc-xstormy16.c,
* config/tc-xtensa.c, * config/tc-z8k.c: Update throughout for
bfd section macro and function changes.
* write.c (compress_debug): Use bfd_rename_section.
gdb/
* aarch64-linux-tdep.c, * arm-tdep.c, * auto-load.c,
* coff-pe-read.c, * coffread.c, * corelow.c, * dbxread.c,
* dicos-tdep.c, * dwarf2-frame.c, * dwarf2read.c, * elfread.c,
* exec.c, * fbsd-tdep.c, * gcore.c, * gdb_bfd.c, * gdb_bfd.h,
* hppa-tdep.c, * i386-cygwin-tdep.c, * i386-fbsd-tdep.c,
* i386-linux-tdep.c, * jit.c, * linux-tdep.c, * machoread.c,
* maint.c, * mdebugread.c, * minidebug.c, * mips-linux-tdep.c,
* mips-sde-tdep.c, * mips-tdep.c, * mipsread.c, * nto-tdep.c,
* objfiles.c, * objfiles.h, * osabi.c, * ppc-linux-tdep.c,
* ppc64-tdep.c, * record-btrace.c, * record-full.c, * remote.c,
* rs6000-aix-tdep.c, * rs6000-tdep.c, * s390-linux-tdep.c,
* s390-tdep.c, * solib-aix.c, * solib-dsbt.c, * solib-frv.c,
* solib-spu.c, * solib-svr4.c, * solib-target.c,
* spu-linux-nat.c, * spu-tdep.c, * symfile-mem.c, * symfile.c,
* symmisc.c, * symtab.c, * target.c, * windows-nat.c,
* xcoffread.c, * cli/cli-dump.c, * compile/compile-object-load.c,
* mi/mi-interp.c: Update throughout for bfd section macro and
function changes.
* gcore (gcore_create_callback): Use bfd_set_section_lma.
* spu-tdep.c (spu_overlay_new_objfile): Likewise.
gprof/
* corefile.c, * symtab.c: Update throughout for bfd section
macro and function changes.
ld/
* ldcref.c, * ldctor.c, * ldelf.c, * ldlang.c, * pe-dll.c,
* emultempl/aarch64elf.em, * emultempl/aix.em,
* emultempl/armcoff.em, * emultempl/armelf.em,
* emultempl/cr16elf.em, * emultempl/cskyelf.em,
* emultempl/m68hc1xelf.em, * emultempl/m68kelf.em,
* emultempl/mipself.em, * emultempl/mmix-elfnmmo.em,
* emultempl/mmo.em, * emultempl/msp430.em,
* emultempl/nios2elf.em, * emultempl/pe.em, * emultempl/pep.em,
* emultempl/ppc64elf.em, * emultempl/xtensaelf.em: Update
throughout for bfd section macro and function changes.
libctf/
* ctf-open-bfd.c: Update throughout for bfd section macro changes.
opcodes/
* arc-ext.c: Update throughout for bfd section macro changes.
sim/
* common/sim-load.c, * common/sim-utils.c, * cris/sim-if.c,
* erc32/func.c, * lm32/sim-if.c, * m32c/load.c, * m32c/trace.c,
* m68hc11/interp.c, * ppc/hw_htab.c, * ppc/hw_init.c,
* rl78/load.c, * rl78/trace.c, * rx/gdb-if.c, * rx/load.c,
* rx/trace.c: Update throughout for bfd section macro changes.
2019-09-16 12:55:17 +02:00
|
|
|
bfd_set_section_flags (sec, flags);
|
2015-01-08 21:55:10 +01:00
|
|
|
sec->output_section = sec;
|
|
|
|
return sec;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* This hook is called when alignment is performed, and allows us to
|
|
|
|
capture the details of both .org and .align directives. */
|
|
|
|
|
|
|
|
void
|
|
|
|
avr_handle_align (fragS *fragP)
|
|
|
|
{
|
|
|
|
if (linkrelax)
|
|
|
|
{
|
|
|
|
/* Ignore alignment requests at FR_ADDRESS 0, these are at the very
|
|
|
|
start of a section, and will be handled by the standard section
|
|
|
|
alignment mechanism. */
|
|
|
|
if ((fragP->fr_type == rs_align
|
|
|
|
|| fragP->fr_type == rs_align_code)
|
|
|
|
&& fragP->fr_offset > 0)
|
|
|
|
{
|
2015-10-07 21:47:38 +02:00
|
|
|
char *p = fragP->fr_literal + fragP->fr_fix;
|
|
|
|
|
2015-01-08 21:55:10 +01:00
|
|
|
fragP->tc_frag_data.is_align = TRUE;
|
|
|
|
fragP->tc_frag_data.alignment = fragP->fr_offset;
|
2015-10-07 21:47:38 +02:00
|
|
|
fragP->tc_frag_data.fill = *p;
|
|
|
|
fragP->tc_frag_data.has_fill = (fragP->tc_frag_data.fill != 0);
|
2015-01-08 21:55:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (fragP->fr_type == rs_org && fragP->fr_offset > 0)
|
|
|
|
{
|
|
|
|
char *p = fragP->fr_literal + fragP->fr_fix;
|
|
|
|
|
|
|
|
fragP->tc_frag_data.is_org = TRUE;
|
|
|
|
fragP->tc_frag_data.fill = *p;
|
|
|
|
fragP->tc_frag_data.has_fill = (fragP->tc_frag_data.fill != 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return TRUE if this section is not one for which we need to record
|
|
|
|
information in the avr property section. */
|
|
|
|
|
|
|
|
static bfd_boolean
|
|
|
|
exclude_section_from_property_tables (segT sec)
|
|
|
|
{
|
|
|
|
/* Only generate property information for sections on which linker
|
|
|
|
relaxation could be performed. */
|
|
|
|
return !relaxable_section (sec);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Create a property record for fragment FRAGP from section SEC and place
|
|
|
|
it into an AVR_PROPERTY_RECORD_LINK structure, which can then formed
|
|
|
|
into a linked list by the caller. */
|
|
|
|
|
|
|
|
static struct avr_property_record_link *
|
|
|
|
create_record_for_frag (segT sec, fragS *fragP)
|
|
|
|
{
|
2015-04-17 13:25:54 +02:00
|
|
|
struct avr_property_record_link *prop_rec_link;
|
2015-01-08 21:55:10 +01:00
|
|
|
|
2016-04-01 15:26:30 +02:00
|
|
|
prop_rec_link = XCNEW (struct avr_property_record_link);
|
2015-10-07 21:47:38 +02:00
|
|
|
gas_assert (fragP->fr_next != NULL);
|
2015-01-08 21:55:10 +01:00
|
|
|
|
|
|
|
if (fragP->tc_frag_data.is_org)
|
|
|
|
{
|
2015-04-17 13:25:54 +02:00
|
|
|
prop_rec_link->record.offset = fragP->fr_next->fr_address;
|
|
|
|
prop_rec_link->record.section = sec;
|
2015-01-08 21:55:10 +01:00
|
|
|
|
|
|
|
if (fragP->tc_frag_data.has_fill)
|
|
|
|
{
|
2015-04-17 13:25:54 +02:00
|
|
|
prop_rec_link->record.data.org.fill = fragP->tc_frag_data.fill;
|
|
|
|
prop_rec_link->record.type = RECORD_ORG_AND_FILL;
|
2015-01-08 21:55:10 +01:00
|
|
|
}
|
|
|
|
else
|
2015-04-17 13:25:54 +02:00
|
|
|
prop_rec_link->record.type = RECORD_ORG;
|
2015-01-08 21:55:10 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-10-07 21:47:38 +02:00
|
|
|
prop_rec_link->record.offset = fragP->fr_next->fr_address;
|
2015-04-17 13:25:54 +02:00
|
|
|
prop_rec_link->record.section = sec;
|
2015-01-08 21:55:10 +01:00
|
|
|
|
|
|
|
gas_assert (fragP->tc_frag_data.is_align);
|
|
|
|
if (fragP->tc_frag_data.has_fill)
|
|
|
|
{
|
2015-04-17 13:25:54 +02:00
|
|
|
prop_rec_link->record.data.align.fill = fragP->tc_frag_data.fill;
|
|
|
|
prop_rec_link->record.type = RECORD_ALIGN_AND_FILL;
|
2015-01-08 21:55:10 +01:00
|
|
|
}
|
|
|
|
else
|
2015-04-17 13:25:54 +02:00
|
|
|
prop_rec_link->record.type = RECORD_ALIGN;
|
|
|
|
prop_rec_link->record.data.align.bytes = fragP->tc_frag_data.alignment;
|
2015-01-08 21:55:10 +01:00
|
|
|
}
|
|
|
|
|
2015-04-17 13:25:54 +02:00
|
|
|
return prop_rec_link;
|
2015-01-08 21:55:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Build a list of AVR_PROPERTY_RECORD_LINK structures for section SEC, and
|
|
|
|
merged them onto the list pointed to by NEXT_PTR. Return a pointer to
|
|
|
|
the last list item created. */
|
|
|
|
|
|
|
|
static struct avr_property_record_link **
|
|
|
|
append_records_for_section (segT sec,
|
|
|
|
struct avr_property_record_link **next_ptr)
|
|
|
|
{
|
|
|
|
segment_info_type *seginfo = seg_info (sec);
|
|
|
|
fragS *fragP;
|
|
|
|
|
|
|
|
if (seginfo && seginfo->frchainP)
|
|
|
|
{
|
|
|
|
for (fragP = seginfo->frchainP->frch_root;
|
|
|
|
fragP;
|
|
|
|
fragP = fragP->fr_next)
|
|
|
|
{
|
|
|
|
if (fragP->tc_frag_data.is_align
|
|
|
|
|| fragP->tc_frag_data.is_org)
|
|
|
|
{
|
|
|
|
/* Create a single new entry. */
|
|
|
|
struct avr_property_record_link *new_link
|
|
|
|
= create_record_for_frag (sec, fragP);
|
|
|
|
|
|
|
|
*next_ptr = new_link;
|
|
|
|
next_ptr = &new_link->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return next_ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Create the AVR property section and fill it with records of .org and
|
|
|
|
.align directives that were used. The section is only created if it
|
|
|
|
will actually have any content. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
avr_create_and_fill_property_section (void)
|
|
|
|
{
|
|
|
|
segT *seclist;
|
|
|
|
asection *prop_sec;
|
|
|
|
struct avr_property_record_link *r_list, **next_ptr;
|
|
|
|
char *frag_ptr, *frag_base;
|
|
|
|
bfd_size_type sec_size;
|
|
|
|
struct avr_property_record_link *rec;
|
|
|
|
unsigned int record_count;
|
|
|
|
|
|
|
|
/* First walk over all sections. For sections on which linker
|
|
|
|
relaxation could be applied, extend the record list. The record list
|
|
|
|
holds information that the linker will need to know. */
|
|
|
|
|
|
|
|
prop_sec = NULL;
|
|
|
|
r_list = NULL;
|
|
|
|
next_ptr = &r_list;
|
|
|
|
for (seclist = &stdoutput->sections;
|
|
|
|
seclist && *seclist;
|
|
|
|
seclist = &(*seclist)->next)
|
|
|
|
{
|
|
|
|
segT sec = *seclist;
|
|
|
|
|
|
|
|
if (exclude_section_from_property_tables (sec))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
next_ptr = append_records_for_section (sec, next_ptr);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Create property section and ensure the size is correct. We've already
|
|
|
|
passed the point where gas could size this for us. */
|
|
|
|
sec_size = AVR_PROPERTY_SECTION_HEADER_SIZE;
|
|
|
|
record_count = 0;
|
|
|
|
for (rec = r_list; rec != NULL; rec = rec->next)
|
|
|
|
{
|
|
|
|
record_count++;
|
|
|
|
sec_size += avr_record_size (&rec->record);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (record_count == 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
prop_sec = avr_create_property_section ();
|
bfd_section_* macros
This large patch removes the unnecessary bfd parameter from various
bfd section macros and functions. The bfd is hardly ever used and if
needed for the bfd_set_section_* or bfd_rename_section functions can
be found via section->owner except for the com, und, abs, and ind
std_section special sections. Those sections shouldn't be modified
anyway.
The patch also removes various bfd_get_section_<field> macros,
replacing their use with bfd_section_<field>, and adds
bfd_set_section_lma. I've also fixed a minor bug in gas where
compressed section renaming was done directly rather than calling
bfd_rename_section. This would have broken bfd_get_section_by_name
and similar functions, but that hardly mattered at such a late stage
in gas processing.
bfd/
* bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
(bfd_get_section_lma, bfd_get_section_alignment),
(bfd_get_section_size, bfd_get_section_flags),
(bfd_get_section_userdata): Delete.
(bfd_section_name, bfd_section_size, bfd_section_vma),
(bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
(bfd_section_flags, bfd_section_userdata): New.
(bfd_is_com_section): Rename parameter.
* section.c (bfd_set_section_userdata, bfd_set_section_vma),
(bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
(bfd_set_section_size): Delete bfd parameter, rename section parameter.
(bfd_set_section_lma): New.
* bfd-in2.h: Regenerate.
* mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
update callers.
* aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
* coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
* compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
* elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
* elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
* elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
* elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
* elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
* elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
* elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
* elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
* elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
* elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
* elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
* elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
* elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
* elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
* elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
* elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
* elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
* elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
* elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
* elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
* mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
* peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
* xcofflink.c: Update throughout for bfd section macro and function
changes.
binutils/
* addr2line.c, * bucomm.c, * coffgrok.c, * dlltool.c, * nm.c,
* objcopy.c, * objdump.c, * od-elf32_avr.c, * od-macho.c,
* od-xcoff.c, * prdbg.c, * rdcoff.c, * rddbg.c, * rescoff.c,
* resres.c, * size.c, * srconv.c, * strings.c, * windmc.c: Update
throughout for bfd section macro and function changes.
gas/
* as.c, * as.h, * dw2gencfi.c, * dwarf2dbg.c, * ecoff.c,
* read.c, * stabs.c, * subsegs.c, * subsegs.h, * write.c,
* config/obj-coff-seh.c, * config/obj-coff.c, * config/obj-ecoff.c,
* config/obj-elf.c, * config/obj-macho.c, * config/obj-som.c,
* config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c,
* config/tc-arm.c, * config/tc-avr.c, * config/tc-bfin.c,
* config/tc-bpf.c, * config/tc-d10v.c, * config/tc-d30v.c,
* config/tc-epiphany.c, * config/tc-fr30.c, * config/tc-frv.c,
* config/tc-h8300.c, * config/tc-hppa.c, * config/tc-i386.c,
* config/tc-ia64.c, * config/tc-ip2k.c, * config/tc-iq2000.c,
* config/tc-lm32.c, * config/tc-m32c.c, * config/tc-m32r.c,
* config/tc-m68hc11.c, * config/tc-mep.c, * config/tc-microblaze.c,
* config/tc-mips.c, * config/tc-mmix.c, * config/tc-mn10200.c,
* config/tc-mn10300.c, * config/tc-msp430.c, * config/tc-mt.c,
* config/tc-nds32.c, * config/tc-or1k.c, * config/tc-ppc.c,
* config/tc-pru.c, * config/tc-rl78.c, * config/tc-rx.c,
* config/tc-s12z.c, * config/tc-s390.c, * config/tc-score.c,
* config/tc-score7.c, * config/tc-sh.c, * config/tc-sparc.c,
* config/tc-spu.c, * config/tc-tic4x.c, * config/tc-tic54x.c,
* config/tc-tic6x.c, * config/tc-tilegx.c, * config/tc-tilepro.c,
* config/tc-v850.c, * config/tc-visium.c, * config/tc-wasm32.c,
* config/tc-xc16x.c, * config/tc-xgate.c, * config/tc-xstormy16.c,
* config/tc-xtensa.c, * config/tc-z8k.c: Update throughout for
bfd section macro and function changes.
* write.c (compress_debug): Use bfd_rename_section.
gdb/
* aarch64-linux-tdep.c, * arm-tdep.c, * auto-load.c,
* coff-pe-read.c, * coffread.c, * corelow.c, * dbxread.c,
* dicos-tdep.c, * dwarf2-frame.c, * dwarf2read.c, * elfread.c,
* exec.c, * fbsd-tdep.c, * gcore.c, * gdb_bfd.c, * gdb_bfd.h,
* hppa-tdep.c, * i386-cygwin-tdep.c, * i386-fbsd-tdep.c,
* i386-linux-tdep.c, * jit.c, * linux-tdep.c, * machoread.c,
* maint.c, * mdebugread.c, * minidebug.c, * mips-linux-tdep.c,
* mips-sde-tdep.c, * mips-tdep.c, * mipsread.c, * nto-tdep.c,
* objfiles.c, * objfiles.h, * osabi.c, * ppc-linux-tdep.c,
* ppc64-tdep.c, * record-btrace.c, * record-full.c, * remote.c,
* rs6000-aix-tdep.c, * rs6000-tdep.c, * s390-linux-tdep.c,
* s390-tdep.c, * solib-aix.c, * solib-dsbt.c, * solib-frv.c,
* solib-spu.c, * solib-svr4.c, * solib-target.c,
* spu-linux-nat.c, * spu-tdep.c, * symfile-mem.c, * symfile.c,
* symmisc.c, * symtab.c, * target.c, * windows-nat.c,
* xcoffread.c, * cli/cli-dump.c, * compile/compile-object-load.c,
* mi/mi-interp.c: Update throughout for bfd section macro and
function changes.
* gcore (gcore_create_callback): Use bfd_set_section_lma.
* spu-tdep.c (spu_overlay_new_objfile): Likewise.
gprof/
* corefile.c, * symtab.c: Update throughout for bfd section
macro and function changes.
ld/
* ldcref.c, * ldctor.c, * ldelf.c, * ldlang.c, * pe-dll.c,
* emultempl/aarch64elf.em, * emultempl/aix.em,
* emultempl/armcoff.em, * emultempl/armelf.em,
* emultempl/cr16elf.em, * emultempl/cskyelf.em,
* emultempl/m68hc1xelf.em, * emultempl/m68kelf.em,
* emultempl/mipself.em, * emultempl/mmix-elfnmmo.em,
* emultempl/mmo.em, * emultempl/msp430.em,
* emultempl/nios2elf.em, * emultempl/pe.em, * emultempl/pep.em,
* emultempl/ppc64elf.em, * emultempl/xtensaelf.em: Update
throughout for bfd section macro and function changes.
libctf/
* ctf-open-bfd.c: Update throughout for bfd section macro changes.
opcodes/
* arc-ext.c: Update throughout for bfd section macro changes.
sim/
* common/sim-load.c, * common/sim-utils.c, * cris/sim-if.c,
* erc32/func.c, * lm32/sim-if.c, * m32c/load.c, * m32c/trace.c,
* m68hc11/interp.c, * ppc/hw_htab.c, * ppc/hw_init.c,
* rl78/load.c, * rl78/trace.c, * rx/gdb-if.c, * rx/load.c,
* rx/trace.c: Update throughout for bfd section macro changes.
2019-09-16 12:55:17 +02:00
|
|
|
bfd_set_section_size (prop_sec, sec_size);
|
2015-01-08 21:55:10 +01:00
|
|
|
|
|
|
|
subseg_set (prop_sec, 0);
|
|
|
|
frag_base = frag_more (sec_size);
|
|
|
|
|
|
|
|
frag_ptr =
|
|
|
|
avr_output_property_section_header (frag_base, record_count);
|
|
|
|
|
|
|
|
for (rec = r_list; rec != NULL; rec = rec->next)
|
|
|
|
frag_ptr = avr_output_property_record (frag_base, frag_ptr, &rec->record);
|
|
|
|
|
|
|
|
frag_wane (frag_now);
|
|
|
|
frag_new (0);
|
|
|
|
frag_wane (frag_now);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* We're using this hook to build up the AVR property section. It's called
|
|
|
|
late in the assembly process which suits our needs. */
|
|
|
|
void
|
|
|
|
avr_post_relax_hook (void)
|
|
|
|
{
|
|
|
|
avr_create_and_fill_property_section ();
|
|
|
|
}
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* Accumulate information about instruction sequence to `avr_isr':
|
|
|
|
wheter TMP_REG, ZERO_REG and SREG might be touched. Used during parse.
|
|
|
|
REG1 is either -1 or a register number used by the instruction as input
|
|
|
|
or output operand. Similar for REG2. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
avr_update_gccisr (struct avr_opcodes_s *opcode, int reg1, int reg2)
|
|
|
|
{
|
|
|
|
const int tiny_p = avr_mcu->mach == bfd_mach_avrtiny;
|
|
|
|
const int reg_tmp = tiny_p ? 16 : 0;
|
|
|
|
const int reg_zero = 1 + reg_tmp;
|
|
|
|
|
|
|
|
if (ISR_CHUNK_Done == avr_isr.prev_chunk
|
|
|
|
|| (avr_isr.need_sreg
|
|
|
|
&& avr_isr.need_reg_tmp
|
|
|
|
&& avr_isr.need_reg_zero))
|
|
|
|
{
|
|
|
|
/* Nothing (more) to do */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* SREG: Look up instructions that don't clobber SREG. */
|
|
|
|
|
|
|
|
if (!avr_isr.need_sreg
|
|
|
|
&& !hash_find (avr_no_sreg_hash, opcode->name))
|
|
|
|
{
|
|
|
|
avr_isr.need_sreg = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Handle explicit register operands. Record *any* use as clobber.
|
|
|
|
This is because TMP_REG and ZERO_REG are not global and using
|
|
|
|
them makes no sense without a previous set. */
|
|
|
|
|
|
|
|
avr_isr.need_reg_tmp |= reg1 == reg_tmp || reg2 == reg_tmp;
|
|
|
|
avr_isr.need_reg_zero |= reg1 == reg_zero || reg2 == reg_zero;
|
|
|
|
|
|
|
|
/* Handle implicit register operands and some opaque stuff. */
|
|
|
|
|
|
|
|
if (strstr (opcode->name, "lpm")
|
|
|
|
&& '?' == *opcode->constraints)
|
|
|
|
{
|
|
|
|
avr_isr.need_reg_tmp = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strstr (opcode->name, "call")
|
|
|
|
|| strstr (opcode->name, "mul")
|
|
|
|
|| 0 == strcmp (opcode->name, "des")
|
|
|
|
|| (0 == strcmp (opcode->name, "movw")
|
|
|
|
&& (reg1 == reg_tmp || reg2 == reg_tmp)))
|
|
|
|
{
|
|
|
|
avr_isr.need_reg_tmp = 1;
|
|
|
|
avr_isr.need_reg_zero = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Emit some 1-word instruction to **PWHERE and advance *PWHERE by the number
|
|
|
|
of octets written. INSN specifies the desired instruction and REG is the
|
|
|
|
register used by it. This function is only used with restricted subset of
|
|
|
|
instructions as might be emit by `__gcc_isr'. IN / OUT will use SREG
|
|
|
|
and LDI loads 0. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
avr_emit_insn (const char *insn, int reg, char **pwhere)
|
|
|
|
{
|
|
|
|
const int sreg = 0x3f;
|
|
|
|
unsigned bin = 0;
|
|
|
|
const struct avr_opcodes_s *op
|
|
|
|
= (struct avr_opcodes_s*) hash_find (avr_hash, insn);
|
|
|
|
|
|
|
|
/* We only have to deal with: IN, OUT, PUSH, POP, CLR, LDI 0. All of
|
|
|
|
these deal with at least one Reg and are 1-word instructions. */
|
|
|
|
|
|
|
|
gas_assert (op && 1 == op->insn_size);
|
|
|
|
gas_assert (reg >= 0 && reg <= 31);
|
|
|
|
|
|
|
|
if (strchr (op->constraints, 'r'))
|
|
|
|
{
|
|
|
|
bin = op->bin_opcode | (reg << 4);
|
|
|
|
}
|
|
|
|
else if (strchr (op->constraints, 'd'))
|
|
|
|
{
|
|
|
|
gas_assert (reg >= 16);
|
|
|
|
bin = op->bin_opcode | ((reg & 0xf) << 4);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
abort();
|
|
|
|
|
|
|
|
if (strchr (op->constraints, 'P'))
|
|
|
|
{
|
|
|
|
bin |= ((sreg & 0x30) << 5) | (sreg & 0x0f);
|
|
|
|
}
|
|
|
|
else if (0 == strcmp ("r=r", op->constraints))
|
|
|
|
{
|
|
|
|
bin |= ((reg & 0x10) << 5) | (reg & 0x0f);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
gas_assert (0 == strcmp ("r", op->constraints)
|
|
|
|
|| 0 == strcmp ("ldi", op->name));
|
|
|
|
|
|
|
|
bfd_putl16 ((bfd_vma) bin, *pwhere);
|
|
|
|
(*pwhere) += 2 * op->insn_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Turn rs_machine_dependent frag *FR into an ordinary rs_fill code frag,
|
|
|
|
using information gathered in `avr_isr'. REG is the register number as
|
|
|
|
supplied by Done chunk "__gcc_isr 0,REG". */
|
|
|
|
|
|
|
|
static void
|
|
|
|
avr_patch_gccisr_frag (fragS *fr, int reg)
|
|
|
|
{
|
|
|
|
int treg;
|
|
|
|
int n_pushed = 0;
|
|
|
|
char *where = fr->fr_literal;
|
|
|
|
const int tiny_p = avr_mcu->mach == bfd_mach_avrtiny;
|
|
|
|
const int reg_tmp = tiny_p ? 16 : 0;
|
|
|
|
const int reg_zero = 1 + reg_tmp;
|
|
|
|
|
|
|
|
/* Clearing ZERO_REG on non-Tiny needs CLR which clobbers SREG. */
|
|
|
|
|
|
|
|
avr_isr.need_sreg |= !tiny_p && avr_isr.need_reg_zero;
|
|
|
|
|
|
|
|
/* A working register to PUSH / POP the SREG. We might use the register
|
|
|
|
as supplied by ISR_CHUNK_Done for that purpose as GCC wants to push
|
|
|
|
it anyways. If GCC passes ZERO_REG or TMP_REG, it has no clue (and
|
|
|
|
no additional regs to safe) and we use that reg. */
|
|
|
|
|
|
|
|
treg
|
|
|
|
= avr_isr.need_reg_tmp ? reg_tmp
|
|
|
|
: avr_isr.need_reg_zero ? reg_zero
|
|
|
|
: avr_isr.need_sreg ? reg
|
|
|
|
: reg > reg_zero ? reg
|
|
|
|
: -1;
|
|
|
|
|
|
|
|
if (treg >= 0)
|
|
|
|
{
|
|
|
|
/* Non-empty prologue / epilogue */
|
|
|
|
|
|
|
|
if (ISR_CHUNK_Prologue == fr->fr_subtype)
|
|
|
|
{
|
|
|
|
avr_emit_insn ("push", treg, &where);
|
|
|
|
n_pushed++;
|
|
|
|
|
|
|
|
if (avr_isr.need_sreg)
|
|
|
|
{
|
|
|
|
avr_emit_insn ("in", treg, &where);
|
|
|
|
avr_emit_insn ("push", treg, &where);
|
|
|
|
n_pushed++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (avr_isr.need_reg_zero)
|
|
|
|
{
|
|
|
|
if (reg_zero != treg)
|
|
|
|
{
|
|
|
|
avr_emit_insn ("push", reg_zero, &where);
|
|
|
|
n_pushed++;
|
|
|
|
}
|
|
|
|
avr_emit_insn (tiny_p ? "ldi" : "clr", reg_zero, &where);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (reg > reg_zero && reg != treg)
|
|
|
|
{
|
|
|
|
avr_emit_insn ("push", reg, &where);
|
|
|
|
n_pushed++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (ISR_CHUNK_Epilogue == fr->fr_subtype)
|
|
|
|
{
|
|
|
|
/* Same logic as in Prologue but in reverse order and with counter
|
|
|
|
parts of either instruction: POP instead of PUSH and OUT instead
|
|
|
|
of IN. Clearing ZERO_REG has no couter part. */
|
|
|
|
|
|
|
|
if (reg > reg_zero && reg != treg)
|
|
|
|
avr_emit_insn ("pop", reg, &where);
|
|
|
|
|
|
|
|
if (avr_isr.need_reg_zero
|
|
|
|
&& reg_zero != treg)
|
|
|
|
avr_emit_insn ("pop", reg_zero, &where);
|
|
|
|
|
|
|
|
if (avr_isr.need_sreg)
|
|
|
|
{
|
|
|
|
avr_emit_insn ("pop", treg, &where);
|
|
|
|
avr_emit_insn ("out", treg, &where);
|
|
|
|
}
|
|
|
|
|
|
|
|
avr_emit_insn ("pop", treg, &where);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
abort();
|
|
|
|
} /* treg >= 0 */
|
|
|
|
|
|
|
|
if (ISR_CHUNK_Prologue == fr->fr_subtype
|
|
|
|
&& avr_isr.sym_n_pushed)
|
|
|
|
{
|
|
|
|
symbolS *sy = avr_isr.sym_n_pushed;
|
|
|
|
/* Turn magic `__gcc_isr.n_pushed' into its now known value. */
|
|
|
|
|
Move struc-symbol.h to symbols.c
This file was never supposed to be widely used. The fact that it has
found its way into many gas files led to bugs, typically when code
expecting a symbolS* to point at a struct symbol is presented with a
struct local_symbol. Also, commit 158184ac9e changed these structs in
2012 but didn't catch all places where symbol bsym was being used to
test for a local_symbol.
* Makefile.am (HFILES): Delete struc-symbol.h.
* doc/internals.texi: Delete struc-symbol.h reference and out
of date local symbol description.
* struc-symbol.h: Delete. Move contents to..
* symbols.c: ..here.
(symbol_on_chain, symbol_symbolS): New functions.
* symbols.h (symbol_on_chain, symbol_symbolS): Declare.
* cgen.c: Don't #include struc-symbol.h.
(gas_cgen_parse_operand): Don't test for local_symbol using
bsym, instead call symbol_symbolS. Use symbol_get_bfdsym.
(weak_operand_overflow_check, make_right_shifted_expr): Use
symbol accessors.
* config/obj-coff.c: Don't #include struc-symbol.h.
(GET_FILENAME_STRING): Delete.
* config/obj-elf.c: Don't #include struc-symbol.h.
(elf_file_symbol): Use symbol accessors.
(elf_adjust_symtab): Call symbol_on_chain.
* config/obj-evax.c: Don't #include struc-symbol.h.
* config/tc-nds32.c: Likewise.
* config/tc-rl78.c: Likewise.
* config/tc-rx.c: Likewise.
* config/tc-alpha.c: Likewise.
(add_to_link_pool, s_alpha_comm): Use symbol accessors.
* config/tc-arc.c: Don't #include struc-symbol.h.
(arc_check_relocs): Use symbol accessors, testing gas symbol
section rather than bfd symbol section.
* config/tc-avr.c: Don't #include struc-symbol.h.
(avr_patch_gccisr_frag): Use symbol accessors.
* config/tc-bfin.c: Don't #include struc-symbol.h.
(bfin_loop_beginend): Use symbol accessors.
* config/tc-csky.c: Don't #include struc-symbol.h.
(v2_work_movih, v2_work_ori): Use symbol accessors. Check for
absolute symbol as well as O_constant.
* config/tc-riscv.c: Don't #include struc-symbol.h.
(riscv_pre_output_hook): Use symbol accessors.
* config/tc-s390.c: Don't #include struc-symbol.h.
(s390_literals): Use symbol accessors.
* config/tc-score.c (s3_build_la_pic, s3_build_lwst_pic): Use
symbol accessors.
(s3_relax_branch_inst16, s3_relax_cmpbranch_inst32): Don't
test symbol bsym.
* config/tc-score7.c: Don't #include struc-symbol.h.
(s7_build_la_pic, s7_build_lwst_pic): Use symbol accessors.
(s7_b32_relax_to_b16): Don't test symbol bsym.
* config/tc-sh.c: Don't #include struc-symbol.h.
(insert_loop_bounds): Use symbol accessors.
(sh_frob_section): Remove bogus symbol canonicalization.
* config/tc-tic54x.c: Don't #include struc-symbol.h.
(tic54x_bss): Use symbol accessors.
* config/tc-tilegx.c: Don't #include struc-symbol.h.
(emit_tilegx_instruction, tilegx_parse_name): Use symbol accessors.
* config/tc-tilepro.c: Don't #include struc-symbol.h.
(emit_tilepro_instruction, tilepro_parse_name): Use accessors.
* config/tc-xtensa.c: Don't #include struc-symbol.h.
(xg_assemble_vliw_tokens): Use symbol accessors.
(xg_order_trampoline_chain): Likewise.
* ehopt.c: Don't #include struc-symbol.h.
(check_eh_frame): Correct local symbol test. Use symbol accessors.
* write.c: Don't #include struc-symbol.h.
(create_note_reloc, maybe_generate_build_notes): Use symbol accessors.
* Makefile.in: Regenerate.
* po/POTFILES.in: Regenerate.
2018-10-29 07:07:24 +01:00
|
|
|
S_SET_VALUE (sy, n_pushed);
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
S_SET_SEGMENT (sy, expr_section);
|
|
|
|
avr_isr.sym_n_pushed = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Turn frag into ordinary code frag of now known size. */
|
|
|
|
|
|
|
|
fr->fr_var = 0;
|
2019-04-15 14:21:44 +02:00
|
|
|
fr->fr_fix = where - fr->fr_literal;
|
|
|
|
gas_assert (fr->fr_fix <= (valueT) fr->fr_offset);
|
Add support for a __gcc_isr pseudo isntruction to the AVR assembler.
PR gas/21683
include * opcode/avr.h (AVR_INSN): Add one for __gcc_isr.
gas * doc/c-avr.texi (AVR Options) <-mgcc-isr>: Document it.
(AVR Pseudo Instructions): New node.
* config/tc-avr.h (md_pre_output_hook): Define to avr_pre_output_hook.
(md_undefined_symbol): Define to avr_undefined_symbol.
(avr_pre_output_hook, avr_undefined_symbol): New protos.
* config/tc-avr.c (struc-symbol.h): Include it.
(ISR_CHUNK_Done, ISR_CHUNK_Prologue, ISR_CHUNK_Epilogue): New enums.
(avr_isr, avr_gccisr_opcode)
(avr_no_sreg_hash, avr_no_sreg): New static variables.
(avr_opt_s) <have_gccisr>: Add field.
(avr_opt): Add initializer for have_gccisr.
(enum options) <OPTION_HAVE_GCCISR>: Add enum.
(md_longopts) <"mgcc-isr">: Add entry.
(md_show_usage): Document -mgcc-isr.
(md_parse_option) [OPTION_HAVE_GCCISR]: Handle it.
(md_undefined_symbol): Remove.
(avr_undefined_symbol, avr_pre_output_hook): New fuctions.
(md_begin) <avr_no_sreg_hash, avr_gccisr_opcode>: Initialize them.
(avr_operand) <pregno>: Add argument and set *pregno if function
is called for a register constraint.
[N]: Handle constraint.
(avr_operands) <avr_operand>: Pass 5th parameter to calls.
[avr_opt.have_gccisr]: Call avr_update_gccisr. Call
avr_gccisr_operands instead of avr_operands.
(avr_update_gccisr, avr_emit_insn, avr_patch_gccisr_frag)
(avr_gccisr_operands, avr_check_gccisr_done): New static functions.
* testsuite/gas/avr/gccisr-01.d: New test.
* testsuite/gas/avr/gccisr-01.s: New test.
* testsuite/gas/avr/gccisr-02.d: New test.
* testsuite/gas/avr/gccisr-02.s: New test.
* testsuite/gas/avr/gccisr-03.d: New test.
* testsuite/gas/avr/gccisr-03.s: New test.
2017-06-30 17:37:39 +02:00
|
|
|
fr->fr_offset = 0;
|
|
|
|
fr->fr_type = rs_fill;
|
|
|
|
fr->fr_subtype = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Implements `__gcc_isr' pseudo-instruction. For Prologue and Epilogue
|
|
|
|
chunks, emit a new rs_machine_dependent frag. For Done chunks, traverse
|
|
|
|
the current segment and patch all rs_machine_dependent frags to become
|
|
|
|
appropriate rs_fill code frags. If chunks are seen in an odd ordering,
|
|
|
|
throw an error instead. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
avr_gccisr_operands (struct avr_opcodes_s *opcode, char **line)
|
|
|
|
{
|
|
|
|
int bad = 0;
|
|
|
|
int chunk, reg = 0;
|
|
|
|
char *str = *line;
|
|
|
|
|
|
|
|
gas_assert (avr_opt.have_gccisr);
|
|
|
|
|
|
|
|
/* We only use operands "N" and "r" which don't pop new fix-ups. */
|
|
|
|
|
|
|
|
/* 1st operand: Which chunk of __gcc_isr: 0...2. */
|
|
|
|
|
|
|
|
chunk = avr_operand (opcode, -1, "N", &str, NULL);
|
|
|
|
if (chunk < 0 || chunk > 2)
|
|
|
|
as_bad (_("%s requires value 0-2 as operand 1"), opcode->name);
|
|
|
|
|
|
|
|
if (ISR_CHUNK_Done == chunk)
|
|
|
|
{
|
|
|
|
/* 2nd operand: A register to push / pop. */
|
|
|
|
|
|
|
|
str = skip_space (str);
|
|
|
|
if (*str == '\0' || *str++ != ',')
|
|
|
|
as_bad (_("`,' required"));
|
|
|
|
else
|
|
|
|
avr_operand (opcode, -1, "r", &str, ®);
|
|
|
|
}
|
|
|
|
|
|
|
|
*line = str;
|
|
|
|
|
|
|
|
/* Chunks must follow in a specific order:
|
|
|
|
- Prologue: Exactly one
|
|
|
|
- Epilogue: Any number
|
|
|
|
- Done: Exactly one. */
|
|
|
|
bad |= ISR_CHUNK_Prologue == chunk && avr_isr.prev_chunk != ISR_CHUNK_Done;
|
|
|
|
bad |= ISR_CHUNK_Epilogue == chunk && avr_isr.prev_chunk == ISR_CHUNK_Done;
|
|
|
|
bad |= ISR_CHUNK_Done == chunk && avr_isr.prev_chunk == ISR_CHUNK_Done;
|
|
|
|
if (bad)
|
|
|
|
{
|
|
|
|
if (avr_isr.file)
|
|
|
|
as_bad (_("`%s %d' after `%s %d' from %s:%u"), opcode->name, chunk,
|
|
|
|
opcode->name, avr_isr.prev_chunk, avr_isr.file, avr_isr.line);
|
|
|
|
else
|
|
|
|
as_bad (_("`%s %d' but no chunk open yet"), opcode->name, chunk);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!had_errors())
|
|
|
|
{
|
|
|
|
/* The longest sequence (prologue) might have up to 6 insns (words):
|
|
|
|
|
|
|
|
push R0
|
|
|
|
in R0, SREG
|
|
|
|
push R0
|
|
|
|
push R1
|
|
|
|
clr R1
|
|
|
|
push Rx
|
|
|
|
*/
|
|
|
|
unsigned int size = 2 * 6;
|
|
|
|
fragS *fr;
|
|
|
|
|
|
|
|
switch (chunk)
|
|
|
|
{
|
|
|
|
case ISR_CHUNK_Prologue:
|
|
|
|
avr_isr.need_reg_tmp = 0;
|
|
|
|
avr_isr.need_reg_zero = 0;
|
|
|
|
avr_isr.need_sreg = 0;
|
|
|
|
avr_isr.sym_n_pushed = NULL;
|
|
|
|
/* FALLTHRU */
|
|
|
|
|
|
|
|
case ISR_CHUNK_Epilogue:
|
|
|
|
/* Emit a new rs_machine_dependent fragment into the fragment chain.
|
|
|
|
It will be patched and cleaned up once we see the matching
|
|
|
|
ISR_CHUNK_Done. */
|
|
|
|
frag_wane (frag_now);
|
|
|
|
frag_new (0);
|
|
|
|
frag_more (size);
|
|
|
|
|
|
|
|
frag_now->fr_var = 1;
|
|
|
|
frag_now->fr_offset = size;
|
|
|
|
frag_now->fr_fix = 0;
|
|
|
|
frag_now->fr_type = rs_machine_dependent;
|
|
|
|
frag_now->fr_subtype = chunk;
|
|
|
|
frag_new (size);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ISR_CHUNK_Done:
|
|
|
|
/* Traverse all frags of the current subseg and turn ones of type
|
|
|
|
rs_machine_dependent into ordinary code as expected by GCC. */
|
|
|
|
|
|
|
|
for (fr = frchain_now->frch_root; fr; fr = fr->fr_next)
|
|
|
|
if (fr->fr_type == rs_machine_dependent)
|
|
|
|
avr_patch_gccisr_frag (fr, reg);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
abort();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
} /* !had_errors */
|
|
|
|
|
|
|
|
avr_isr.prev_chunk = chunk;
|
|
|
|
avr_isr.file = as_where (&avr_isr.line);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Callback used by the function below. Diagnose any dangling stuff from
|
|
|
|
`__gcc_isr', i.e. frags of type rs_machine_dependent. Such frags should
|
|
|
|
have been resolved during parse by ISR_CHUNK_Done. If such a frag is
|
|
|
|
seen, report an error and turn it into something harmless. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
avr_check_gccisr_done (bfd *abfd ATTRIBUTE_UNUSED,
|
|
|
|
segT section,
|
|
|
|
void *xxx ATTRIBUTE_UNUSED)
|
|
|
|
{
|
|
|
|
segment_info_type *info = seg_info (section);
|
|
|
|
|
|
|
|
if (SEG_NORMAL (section)
|
|
|
|
/* BFD may have introduced its own sections without using
|
|
|
|
subseg_new, so it is possible that seg_info is NULL. */
|
|
|
|
&& info)
|
|
|
|
{
|
|
|
|
fragS *fr;
|
|
|
|
frchainS *frch;
|
|
|
|
|
|
|
|
for (frch = info->frchainP; frch; frch = frch->frch_next)
|
|
|
|
for (fr = frch->frch_root; fr; fr = fr->fr_next)
|
|
|
|
if (fr->fr_type == rs_machine_dependent)
|
|
|
|
{
|
|
|
|
if (avr_isr.file)
|
|
|
|
as_bad_where (avr_isr.file, avr_isr.line,
|
|
|
|
_("dangling `__gcc_isr %d'"), avr_isr.prev_chunk);
|
|
|
|
else if (!had_errors())
|
|
|
|
as_bad (_("dangling `__gcc_isr'"));
|
|
|
|
|
|
|
|
avr_isr.file = NULL;
|
|
|
|
|
|
|
|
/* Avoid Internal errors due to rs_machine_dependent in the
|
|
|
|
remainder: Turn frag into something harmless. */
|
|
|
|
fr->fr_var = 0;
|
|
|
|
fr->fr_fix = 0;
|
|
|
|
fr->fr_offset = 0;
|
|
|
|
fr->fr_type = rs_fill;
|
|
|
|
fr->fr_subtype = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Implement `md_pre_output_hook' */
|
|
|
|
/* Run over all relevant sections and diagnose any dangling `__gcc_isr'.
|
|
|
|
This runs after parsing all inputs but before relaxing and writing. */
|
|
|
|
|
|
|
|
void
|
|
|
|
avr_pre_output_hook (void)
|
|
|
|
{
|
|
|
|
if (avr_opt.have_gccisr)
|
|
|
|
bfd_map_over_sections (stdoutput, avr_check_gccisr_done, NULL);
|
|
|
|
}
|