From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28509 invoked by alias); 23 Mar 2011 16:46:11 -0000 Received: (qmail 26808 invoked by uid 55); 23 Mar 2011 16:45:18 -0000 Date: Wed, 23 Mar 2011 17:07:00 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/48220] DW_OP_GNU_entry_value/DW_TAG_GNU_call_site_parameter vs. register window targets X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg02448.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48220 --- Comment #3 from Jakub Jelinek 2011-03-23 16:45:05 UTC --- The aim of the extension is to allow correct debug info, not almost correct, so I think defining "upon entering of the current subprogram" as anything but before the first insn in it is wrong and would make it not possible to use DW_OP_GNU_entry_value before the point (end of prologue or what?). Consider e.g. shrink-wrapping Bernd just proposed for GCC too... So I think what we currently do on SPARC has to change. As for teaching var-tracking about save/restore on SPARC, it would be a matter of adding probably two target hooks, one that would be run e.g. at the end of adjust_insn and would be supposed to change it using validate_change (..., true); in whatever way var-tracking should understand the insn. So e.g. for save you'd add into the parallel things like: (set (reg:P 24) (reg:P 8)) (clobber (reg:P 8)) and similarly for all the other param regs. Perhaps even make it explicit what exactly is subtracted from %sp. And the second target hook would return a different rtx for DECL_INCOMING_RTL, with registers adjusted back. Because for -O0 if we don't do var-tracking we probably want DECL_INCOMING_RTL to still refer to %i0 etc., even when it is not correct before the save.