diff options
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-alpha.c | 3 | ||||
-rw-r--r-- | gas/config/tc-avr.c | 17 | ||||
-rw-r--r-- | gas/config/tc-avr.h | 13 |
3 files changed, 32 insertions, 1 deletions
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index d1de6f9..5c1c73e 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -5081,12 +5081,13 @@ s_alpha_align (int ignore ATTRIBUTE_UNUSED) if (align != 0) { alpha_auto_align_on = 1; - alpha_align (align, pfill, alpha_insn_label, 1); + alpha_align (align, pfill, NULL, 1); } else { alpha_auto_align_on = 0; } + alpha_insn_label = NULL; demand_empty_rest_of_line (); } 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); +} diff --git a/gas/config/tc-avr.h b/gas/config/tc-avr.h index b976d5a..777a9df 100644 --- a/gas/config/tc-avr.h +++ b/gas/config/tc-avr.h @@ -153,3 +153,16 @@ extern long md_pcrel_from_section (struct fix *, segT); /* 32 bits pseudo-addresses are used on AVR. */ #define DWARF2_ADDR_SIZE(bfd) 4 + +/* Enable cfi directives. */ +#define TARGET_USE_CFIPOP 1 + +/* The stack grows down, and is only byte aligned. */ +#define DWARF2_CIE_DATA_ALIGNMENT -1 + +/* Define the column that represents the PC. */ +#define DWARF2_DEFAULT_RETURN_COLUMN 36 + +/* Define a hook to setup initial CFI state. */ +extern void tc_cfi_frame_initial_instructions (void); +#define tc_cfi_frame_initial_instructions tc_cfi_frame_initial_instructions |