From patchwork Sun Jul 3 20:01:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 103029 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id ABF88B6F54 for ; Mon, 4 Jul 2011 06:03:36 +1000 (EST) Received: (qmail 8402 invoked by alias); 3 Jul 2011 20:03:34 -0000 Received: (qmail 8392 invoked by uid 22791); 3 Jul 2011 20:03:33 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, SPF_NEUTRAL, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (140.186.70.92) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 03 Jul 2011 20:03:17 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdSst-0004uJ-2y for gcc-patches@gcc.gnu.org; Sun, 03 Jul 2011 16:03:17 -0400 Received: from mail-vx0-f175.google.com ([209.85.220.175]:51288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdSss-0004tv-Ly for gcc-patches@gcc.gnu.org; Sun, 03 Jul 2011 16:03:14 -0400 Received: by mail-vx0-f175.google.com with SMTP id 37so3896954vxa.20 for ; Sun, 03 Jul 2011 13:03:14 -0700 (PDT) Received: by 10.220.93.18 with SMTP id t18mr2113231vcm.39.1309723394281; Sun, 03 Jul 2011 13:03:14 -0700 (PDT) Received: from localhost.localdomain (c-71-227-161-214.hsd1.wa.comcast.net [71.227.161.214]) by mx.google.com with ESMTPS id n2sm579268vcb.13.2011.07.03.13.03.13 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 03 Jul 2011 13:03:13 -0700 (PDT) From: Richard Henderson To: gcc-patches@gcc.gnu.org Cc: bernds@codesourcery.com Subject: [PATCH 6/6] Dump NOTE_INSN_CFI notes. Date: Sun, 3 Jul 2011 13:01:48 -0700 Message-Id: <1309723308-26667-7-git-send-email-rth@redhat.com> In-Reply-To: <1309723308-26667-1-git-send-email-rth@redhat.com> References: <1309723308-26667-1-git-send-email-rth@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.175 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org --- 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; }