public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
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: PING: [PATCH] Fix up typed DWARF stack support for POINTERS_EXTEND_UNSIGNED targets (PR debug/48853)
Date: Mon, 09 May 2011 18:55:00 -0000	[thread overview]
Message-ID: <BANLkTimr5O9XBMOD7qTQ6ddn2Zt1875gwA@mail.gmail.com> (raw)

On Fri, May 6, 2011 at 6:11 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> 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),
>

PING.

-- 
H.J.

             reply	other threads:[~2011-05-09 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 18:55 H.J. Lu [this message]
2011-05-09 20:17 ` Jakub Jelinek
2011-05-09 22:17   ` H.J. Lu
2011-05-10 11:49     ` Jakub Jelinek
2011-05-10 15:09       ` H.J. Lu
2011-05-10 16:57         ` H.J. Lu

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=BANLkTimr5O9XBMOD7qTQ6ddn2Zt1875gwA@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).