From: Richard Henderson <rth@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: bernds@codesourcery.com
Subject: [PATCH 6/6] Dump NOTE_INSN_CFI notes.
Date: Sun, 03 Jul 2011 20:03:00 -0000 [thread overview]
Message-ID: <1309723308-26667-7-git-send-email-rth@redhat.com> (raw)
In-Reply-To: <1309723308-26667-1-git-send-email-rth@redhat.com>
---
gcc/dwarf2out.c | 14 +++++++-------
gcc/dwarf2out.h | 2 ++
gcc/print-rtl.c | 9 +++++++++
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 097e57f..2736477 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -822,8 +822,8 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh)
/* Similar, but do it via assembler directives instead. */
-static void
-output_cfi_directive (dw_cfi_ref cfi)
+void
+output_cfi_directive (FILE *asm_out_file, dw_cfi_ref cfi)
{
unsigned long r, r2;
@@ -925,7 +925,7 @@ void
dwarf2out_emit_cfi (dw_cfi_ref cfi)
{
if (dwarf2out_do_cfi_asm ())
- output_cfi_directive (cfi);
+ output_cfi_directive (asm_out_file, cfi);
}
/* Output CFIs from VEC, up to index UPTO, to bring current FDE to the
@@ -1032,7 +1032,7 @@ output_cfis (cfi_vec vec, int upto, bool do_cfi_asm,
&& cfi2->dw_cfi_opc != DW_CFA_restore_extended)
{
if (do_cfi_asm)
- output_cfi_directive (cfi2);
+ output_cfi_directive (asm_out_file, cfi2);
else
output_cfi (cfi2, fde, for_eh);
}
@@ -1066,7 +1066,7 @@ output_cfis (cfi_vec vec, int upto, bool do_cfi_asm,
if (cfi_cfa)
{
if (do_cfi_asm)
- output_cfi_directive (cfi_cfa);
+ output_cfi_directive (asm_out_file, cfi_cfa);
else
output_cfi (cfi_cfa, fde, for_eh);
}
@@ -1076,7 +1076,7 @@ output_cfis (cfi_vec vec, int upto, bool do_cfi_asm,
&& cfi_args_size->dw_cfi_oprnd1.dw_cfi_offset)
{
if (do_cfi_asm)
- output_cfi_directive (cfi_args_size);
+ output_cfi_directive (asm_out_file, cfi_args_size);
else
output_cfi (cfi_args_size, fde, for_eh);
}
@@ -1087,7 +1087,7 @@ output_cfis (cfi_vec vec, int upto, bool do_cfi_asm,
return;
}
else if (do_cfi_asm)
- output_cfi_directive (cfi);
+ output_cfi_directive (asm_out_file, cfi);
else
output_cfi (cfi, fde, for_eh);
break;
diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h
index 7122dee..19bae4a 100644
--- a/gcc/dwarf2out.h
+++ b/gcc/dwarf2out.h
@@ -241,6 +241,8 @@ extern enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc
extern enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc
(enum dwarf_call_frame_info cfi);
+extern void output_cfi_directive (FILE *f, struct dw_cfi_struct *cfi);
+
extern void dwarf2out_decl (tree);
extern void dwarf2out_emit_cfi (dw_cfi_ref cfi);
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index c20ff6c..d7fd73b 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pretty-print.h"
#include "cselib.h"
#include "tree-pass.h"
+#include "dwarf2out.h"
#endif
static FILE *outfile;
@@ -309,6 +310,14 @@ print_rtx (const_rtx in_rtx)
#endif
break;
+ case NOTE_INSN_CFI:
+#ifndef GENERATOR_FILE
+ fputc ('\n', outfile);
+ output_cfi_directive (outfile, NOTE_CFI (in_rtx));
+ fputc ('\t', outfile);
+#endif
+ break;
+
default:
break;
}
--
1.7.5.4
next prev parent reply other threads:[~2011-07-03 20:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-03 20:03 [CFT][PATCH 0/6] Move dwarf2 cfi creation to a new pass Richard Henderson
2011-07-03 20:03 ` [PATCH 2/6] dwarf2out: Move insn scanning out of final.c Richard Henderson
2011-07-03 20:03 ` Richard Henderson [this message]
2011-07-03 20:03 ` [PATCH 3/6] dwarf2out: Emit NOTE_INSN_CFI_* both with and without cfi-asm Richard Henderson
2011-07-03 20:03 ` [PATCH 5/6] dwarf2: Extract cfi creation to a new pass Richard Henderson
2011-07-03 20:03 ` [PATCH 4/6] dwarf2out: Convert fde_table to a VEC Richard Henderson
2011-07-03 20:04 ` [PATCH 1/6] dwarf2out: Split CFI construction routines into a new file Richard Henderson
2011-07-06 23:23 ` [CFT][PATCH 0/6] Move dwarf2 cfi creation to a new pass Bernd Schmidt
2011-07-07 8:10 ` Iain Sandoe
2011-07-08 2:32 ` Richard Henderson
2011-07-07 21:51 ` Bernd Schmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1309723308-26667-7-git-send-email-rth@redhat.com \
--to=rth@redhat.com \
--cc=bernds@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).