public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@specifix.com>
To: DJ Delorie <dj@redhat.com>
Cc: gcc@gcc.gnu.org
Subject: Re: hard_regno_nregs == 0 ?
Date: Sat, 12 Jan 2008 00:48:00 -0000	[thread overview]
Message-ID: <1200098206.3309.33.camel@localhost.localdomain> (raw)
In-Reply-To: <200801110016.m0B0Gb0Y029046@greed.delorie.com>

On Thu, 2008-01-10 at 19:16 -0500, DJ Delorie wrote:
> IIRC, the bug happened building either libgcc or newlib.  If you want
> to revert my latest patch in a local source tree and just try a build,
> it's likely to show you an example ;-)

It was unwind-dw2.c in the m32cm libgcc multilib.

The problem lies with the var-tracking pass.  It sees a QImode variable
being held in an HImode hard-reg, and decides to track only the low
QImode part.  This happens in track_loc_p, when it decides to use
DECL_MODE instead of the hard reg mode.  We then have to create RTL to
represent the part that we are tracking, which means we have to create
an invalid QImode lowpart of a hard reg that can't hold QImode values.
Since we will only use this for emitting debug info this seems perfectly
harmless.  Unfortunately, this does mean that HARD_REGNO_NREGS must work
correctly for invalid register modes.  We need that info in order to
construct the lowpart/subreg.  Nowhere does var-tracking check to see if
it is creating a valid register references, nor do I think this is
necessary.

Hence, I now believe that your suggested doc change is correct, and is
OK to check in to mainline.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com


  reply	other threads:[~2008-01-12  0:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 20:13 DJ Delorie
2008-01-09 16:43 ` Ian Lance Taylor
2008-01-09 16:47   ` DJ Delorie
2008-01-09 16:56     ` Ian Lance Taylor
2008-01-09 20:18     ` Jim Wilson
2008-01-09 19:27 ` Jim Wilson
2008-01-09 20:39   ` DJ Delorie
2008-01-09 21:48     ` Paul Brook
2008-01-09 22:02       ` DJ Delorie
2008-01-11  0:12     ` Jim Wilson
2008-01-11  0:16       ` DJ Delorie
2008-01-12  0:48         ` Jim Wilson [this message]
2008-01-21 22:41           ` DJ Delorie

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=1200098206.3309.33.camel@localhost.localdomain \
    --to=wilson@specifix.com \
    --cc=dj@redhat.com \
    --cc=gcc@gcc.gnu.org \
    /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).