From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Jason Merrill <jason@redhat.com>,
Richard Henderson <rth@redhat.com>,
gcc-patches@gcc.gnu.org, Steve Ellcey <sje@cup.hp.com>
Subject: Re: [PATCH] Fix up typed DWARF stack support for POINTERS_EXTEND_UNSIGNED targets (PR debug/48853)
Date: Sat, 07 May 2011 05:21:00 -0000 [thread overview]
Message-ID: <BANLkTinU_1JzzZhm-ZkUr7xwuCo+VrhjsQ@mail.gmail.com> (raw)
In-Reply-To: <20110505092038.GJ17079@tyan-ft48-01.lab.bos.redhat.com>
On Thu, May 5, 2011 at 2:20 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> My typed DWARF stack changes apparently broke ia64-hpux and H.J.'s out of
> tree x32 target. There are several issues:
> 1) for SUBREG mem_loc_descriptor's 3rd argument was wrong, found by code
> inspection
> 2) CONST/SYMBOL_REF/LABEL_REF when in MEM addresses on POINTERS_EXTEND_UNSIGNED
> targets are often Pmode, which is unfortunately larger than DWARF2_ADDR_SIZE
> and my conditional would just return NULL in that case instead of
> emitting DW_OP_addr.
> 3) and, when mem_loc_descriptor is called from unwind code, Pmodes larger
> than DWARF2_ADDR_SIZE would result in the new DW_OP_GNU_*_type etc. ops
> which are not allowed in .eh_frame/.debug_frame
> The following patch ought to fix that, bootstrapped/regtested on
> x86_64-linux and i686-linux and Steve tested it on ia64-hpux and H.J. on his
> port. Ok for trunk?
>
> 2011-05-05 Jakub Jelinek <jakub@redhat.com>
>
> PR debug/48853
> * dwarf2out.c (mem_loc_descriptor) <case SUBREG>: Pass mem_mode
> instead of mode as 3rd argument to recursive call.
> (mem_loc_descriptor) <case REG>: If POINTERS_EXTEND_UNSIGNED, don't
> emit DW_OP_GNU_regval_type if mode is Pmode and mem_mode is not
> VOIDmode.
> (mem_loc_descriptor) <case SYMBOL_REF>: If POINTERS_EXTEND_UNSIGNED,
> don't give up if mode is Pmode and mem_mode is not VOIDmode.
> (mem_loc_descriptor) <case CONST_INT>: If POINTERS_EXTEND_UNSIGNED,
> use int_loc_descriptor if mode is Pmode and mem_mode is not VOIDmode.
>
Here is the missing patch for case SUBREG. OK for trunk if there is
no regressions?
Thanks.
H.J.
----
2011-05-06 H.J. Lu <hongjiu.lu@intel.com>
PR debug/48853
* dwarf2out.c (mem_loc_descriptor) <case SUBREG>: If
POINTERS_EXTEND_UNSIGNED, don't give up if mode is Pmode and
mem_mode is not VOIDmode.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 026e4a7..049ca8e 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -13892,7 +13892,11 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
break;
if (GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_CLASS (GET_MODE (SUBREG_REG (rtl))) == MODE_INT
- && GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE
+ && (GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE
+#ifdef POINTERS_EXTEND_UNSIGNED
+ || (mode == Pmode && mem_mode != VOIDmode)
+#endif
+ )
&& GET_MODE_SIZE (GET_MODE (SUBREG_REG (rtl))) <= DWARF2_ADDR_SIZE)
{
mem_loc_result = mem_loc_descriptor (SUBREG_REG (rtl),
next prev parent reply other threads:[~2011-05-07 1:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 9:22 Jakub Jelinek
2011-05-05 14:53 ` Jason Merrill
2011-05-05 15:24 ` Jakub Jelinek
2011-05-05 15:29 ` Jason Merrill
2011-05-07 5:21 ` H.J. Lu [this message]
2011-05-09 19:24 ` Jason Merrill
2011-05-11 22:14 ` H.J. Lu
2011-05-12 16:40 ` Jakub Jelinek
2011-05-12 17:38 ` H.J. Lu
2011-05-12 19:55 ` Tom Tromey
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=BANLkTinU_1JzzZhm-ZkUr7xwuCo+VrhjsQ@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=jason@redhat.com \
--cc=rth@redhat.com \
--cc=sje@cup.hp.com \
/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).