aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-avr.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2011-03-29 18:16:16 +0000
committerRichard Henderson <rth@redhat.com>2011-03-29 18:16:16 +0000
commitaf3ecb4a35ff9fd57662514fefcfced14893bbbe (patch)
tree777b0c97f1de4358ee0bf62d2a3b508139cdddd8 /gas/config/tc-avr.c
parent66ee2731167db3db9cc506a6268d1a02ed7b3ffc (diff)
downloadgdb-af3ecb4a35ff9fd57662514fefcfced14893bbbe.zip
gdb-af3ecb4a35ff9fd57662514fefcfced14893bbbe.tar.gz
gdb-af3ecb4a35ff9fd57662514fefcfced14893bbbe.tar.bz2
PR 12610
* config/tc-alpha.c (s_alpha_align): Don't auto-align a previous label; zap alpha_insn_label.
Diffstat (limited to 'gas/config/tc-avr.c')
-rw-r--r--gas/config/tc-avr.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gas/config/tc-avr.c b/gas/config/tc-avr.c
index ef8cf93..98fc0f5 100644
--- a/gas/config/tc-avr.c
+++ b/gas/config/tc-avr.c
@@ -24,6 +24,8 @@
#include "as.h"
#include "safe-ctype.h"
#include "subsegs.h"
+#include "dw2gencfi.h"
+
struct avr_opcodes_s
{
@@ -1543,3 +1545,18 @@ avr_cons_fix_new (fragS *frag,
exp_mod_pm = 0;
}
}
+
+void
+tc_cfi_frame_initial_instructions (void)
+{
+ /* AVR6 pushes 3 bytes for calls. */
+ int return_size = (avr_mcu->mach == bfd_mach_avr6 ? 3 : 2);
+
+ /* 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
+ do not line up the same way as for targers that use pre-decrement. */
+ cfi_add_CFA_offset (DWARF2_DEFAULT_RETURN_COLUMN, 1-return_size);
+}