diff options
Diffstat (limited to 'gcc/dwarf2asm.c')
-rw-r--r-- | gcc/dwarf2asm.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index ae81445..cad5509 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -30,6 +30,8 @@ along with GCC; see the file COPYING3. If not see #include "output.h" #include "dwarf2asm.h" #include "dwarf2.h" +#include "function.h" +#include "emit-rtl.h" #ifndef XCOFF_DEBUGGING_INFO #define XCOFF_DEBUGGING_INFO 0 @@ -191,7 +193,7 @@ dw2_asm_output_offset (int size, const char *label, va_start (ap, comment); #ifdef ASM_OUTPUT_DWARF_OFFSET - ASM_OUTPUT_DWARF_OFFSET (asm_out_file, size, label, base); + ASM_OUTPUT_DWARF_OFFSET (asm_out_file, size, label, 0, base); #else dw2_assemble_integer (size, gen_rtx_SYMBOL_REF (Pmode, label)); #endif @@ -206,6 +208,33 @@ dw2_asm_output_offset (int size, const char *label, va_end (ap); } +void +dw2_asm_output_offset (int size, const char *label, HOST_WIDE_INT offset, + section *base ATTRIBUTE_UNUSED, + const char *comment, ...) +{ + va_list ap; + + va_start (ap, comment); + +#ifdef ASM_OUTPUT_DWARF_OFFSET + ASM_OUTPUT_DWARF_OFFSET (asm_out_file, size, label, offset, base); +#else + dw2_assemble_integer (size, gen_rtx_PLUS (Pmode, + gen_rtx_SYMBOL_REF (Pmode, label), + gen_int_mode (offset, Pmode))); +#endif + + if (flag_debug_asm && comment) + { + fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START); + vfprintf (asm_out_file, comment, ap); + } + fputc ('\n', asm_out_file); + + va_end (ap); +} + #if 0 /* Output a self-relative reference to a label, possibly in a |