/* tc-avr.c -- Assembler code for the ATMEL AVR
- Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
Contributed by Denis Chertykov <denisc@overta.ru>
This file is part of GAS, the GNU Assembler.
return op_mask;
}
+/* TC_FRAG_INIT hook */
+
+void
+avr_frag_init (fragS *frag)
+{
+ memset (& frag->tc_frag_data, 0, sizeof frag->tc_frag_data);
+}
+
+
/* Parse instruction operands.
Return binary opcode. */
char *frag = frag_more (opcode->insn_size * 2);
char *str = *line;
int where = frag - frag_now->fr_literal;
- static unsigned int prev = 0; /* Previous opcode. */
int regno1 = -2;
int regno2 = -2;
(AVR core bug, fixed in the newer devices). */
if (!(avr_opt.no_skip_bug ||
(avr_mcu->isa & (AVR_ISA_MUL | AVR_ISA_MOVW)))
- && AVR_SKIP_P (prev))
+ && AVR_SKIP_P (frag_now->tc_frag_data.prev_opcode))
as_warn (_("skipping two-word instruction"));
bfd_putl32 ((bfd_vma) bin, frag);
else
bfd_putl16 ((bfd_vma) bin, frag);
- prev = bin;
+ frag_now->tc_frag_data.prev_opcode = bin;
*line = str;
return bin;
}