From patchwork Sat Jun 19 18:17:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas B Rupp X-Patchwork-Id: 56245 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 549D51007D1 for ; Sun, 20 Jun 2010 04:18:12 +1000 (EST) Received: (qmail 14971 invoked by alias); 19 Jun 2010 18:18:11 -0000 Received: (qmail 14963 invoked by uid 22791); 19 Jun 2010 18:18:10 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 19 Jun 2010 18:18:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BAFB92BAC13; Sat, 19 Jun 2010 14:18:04 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7tFJIdHC3y37; Sat, 19 Jun 2010 14:18:04 -0400 (EDT) Received: from [148.66.23.206] (misc-148-66-23-206.pool.starband.net [148.66.23.206]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 990912BABA7; Sat, 19 Jun 2010 14:17:58 -0400 (EDT) Message-ID: <4C1D09CF.8010605@gnat.com> Date: Sat, 19 Jun 2010 11:17:51 -0700 From: Douglas B Rupp User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Richard Henderson CC: gcc-patches@gcc.gnu.org Subject: [PATCH] Call Dwarf2 "main" pointer die for IA64 VMS (2nd try) 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 Slightly revised patch to insert the debug "main" pointer die required by VMS Debug. Previously submitted patch for dwarf2out.[ch] must be committed first. OK to commit? --Douglas Rupp AdaCore 2010-06-19 Douglas B Rupp * config/ia64/ia64-protos.h (ia64_start_function): Declare. * config/ia64/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Move contents to ia64_start_function. Invoke it. * config/ia64/ia64.c (ia64_start_function): Call new function dwarf2out_vms_debug_main_pointer. diff -rupN gcc/config/ia64/ia64-protos.h gcc/config/ia64/ia64-protos.h --- gcc/config/ia64/ia64-protos.h 2010-06-13 04:04:19.000000000 -0700 +++ gcc/config/ia64/ia64-protos.h 2010-06-17 13:57:52.000000000 -0700 @@ -79,6 +79,7 @@ extern void ia64_vms_output_aligned_decl unsigned HOST_WIDE_INT, unsigned int); extern void ia64_vms_elf_asm_named_section (const char *, unsigned int, tree); +extern void ia64_start_function (FILE *, const char *, tree); #endif /* TREE_CODE */ extern int ia64_register_move_cost (enum machine_mode, enum reg_class, diff -rupN gcc/config/ia64/sysv4.h gcc/config/ia64/sysv4.h --- gcc/config/ia64/sysv4.h 2009-04-21 12:03:23.000000000 -0700 +++ gcc/config/ia64/sysv4.h 2010-06-17 13:55:56.000000000 -0700 @@ -127,12 +127,7 @@ do { \ #undef ASM_DECLARE_FUNCTION_NAME #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ -do { \ - fputs ("\t.proc ", FILE); \ - assemble_name (FILE, NAME); \ - fputc ('\n', FILE); \ - ASM_OUTPUT_LABEL (FILE, NAME); \ -} while (0) + ia64_start_function(FILE,NAME,DECL) /* We redefine this to use the ia64 .endp pseudo-op. */ diff -rupN gcc/config/ia64/ia64.c gcc/config/ia64/ia64.c --- gcc/config/ia64/ia64.c 2010-06-13 04:04:19.000000000 -0700 +++ gcc/config/ia64/ia64.c 2010-06-17 13:55:56.000000000 -0700 @@ -3423,6 +3423,29 @@ ia64_expand_prologue (void) finish_spill_pointers (); } +/* Output the textual info surrounding the prologue. */ + +void +ia64_start_function (FILE *file, const char *fnname, + tree decl ATTRIBUTE_UNUSED) +{ +#if VMS_DEBUGGING_INFO + if (vms_debug_main + && strncmp (vms_debug_main, fnname, strlen (vms_debug_main)) == 0) + { + targetm.asm_out.globalize_label (asm_out_file, VMS_DEBUG_MAIN_POINTER); + ASM_OUTPUT_DEF (asm_out_file, VMS_DEBUG_MAIN_POINTER, fnname); + dwarf2out_vms_debug_main_pointer (); + vms_debug_main = 0; + } +#endif + + fputs ("\t.proc ", file); + assemble_name (file, fnname); + fputc ('\n', file); + ASM_OUTPUT_LABEL (file, fnname); +} + /* Called after register allocation to add any instructions needed for the epilogue. Using an epilogue insn is favored compared to putting all of the instructions in output_function_prologue(), since it allows the scheduler