mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
PR gas/15282
* tc-avr.c (mcu_has_3_byte_pc): New function. (tc_cfi_frame_initial_instructions): Call it to find return address size.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2013-03-21 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
|
||||||
|
|
||||||
|
PR gas/15282
|
||||||
|
* tc-avr.c (mcu_has_3_byte_pc): New function.
|
||||||
|
(tc_cfi_frame_initial_instructions): Call it to find return
|
||||||
|
address size.
|
||||||
|
|
||||||
2013-03-20 Alexis Deruelle <alexis.deruelle@gmail.com>
|
2013-03-20 Alexis Deruelle <alexis.deruelle@gmail.com>
|
||||||
|
|
||||||
PR gas/15095
|
PR gas/15095
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
/* tc-avr.c -- Assembler code for the ATMEL AVR
|
/* tc-avr.c -- Assembler code for the ATMEL AVR
|
||||||
|
|
||||||
Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009,
|
Copyright 1999-2013 Free Software Foundation, Inc.
|
||||||
2010, 2012, 2013 Free Software Foundation, Inc.
|
|
||||||
Contributed by Denis Chertykov <denisc@overta.ru>
|
Contributed by Denis Chertykov <denisc@overta.ru>
|
||||||
|
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
@ -1587,11 +1586,21 @@ avr_cons_fix_new (fragS *frag,
|
|||||||
pexp_mod_data = &exp_mod_data[0];
|
pexp_mod_data = &exp_mod_data[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bfd_boolean
|
||||||
|
mcu_has_3_byte_pc (void)
|
||||||
|
{
|
||||||
|
int mach = avr_mcu->mach;
|
||||||
|
|
||||||
|
return mach == bfd_mach_avr6
|
||||||
|
|| mach == bfd_mach_avrxmega6
|
||||||
|
|| mach == bfd_mach_avrxmega7;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tc_cfi_frame_initial_instructions (void)
|
tc_cfi_frame_initial_instructions (void)
|
||||||
{
|
{
|
||||||
/* AVR6 pushes 3 bytes for calls. */
|
/* AVR6 pushes 3 bytes for calls. */
|
||||||
int return_size = (avr_mcu->mach == bfd_mach_avr6 ? 3 : 2);
|
int return_size = (mcu_has_3_byte_pc () ? 3 : 2);
|
||||||
|
|
||||||
/* The CFA is the caller's stack location before the call insn. */
|
/* The CFA is the caller's stack location before the call insn. */
|
||||||
/* Note that the stack pointer is dwarf register number 32. */
|
/* Note that the stack pointer is dwarf register number 32. */
|
||||||
|
Reference in New Issue
Block a user