From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23972 invoked by alias); 9 Jan 2008 16:47:25 -0000 Received: (qmail 23963 invoked by uid 22791); 9 Jan 2008 16:47:24 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Jan 2008 16:47:07 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m09Gl5cP015347; Wed, 9 Jan 2008 11:47:05 -0500 Received: from post-office.corp.redhat.com (post-office.corp.redhat.com [10.11.254.111]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m09Gl5AF010992; Wed, 9 Jan 2008 11:47:05 -0500 Received: from greed.delorie.com (vpn-14-14.rdu.redhat.com [10.11.14.14]) by post-office.corp.redhat.com (8.13.8/8.13.8) with ESMTP id m09Gl4ma027944; Wed, 9 Jan 2008 11:47:05 -0500 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.13.8/8.13.8) with ESMTP id m09Gl4IR021283; Wed, 9 Jan 2008 11:47:04 -0500 Received: (from dj@localhost) by greed.delorie.com (8.13.8/8.13.8/Submit) id m09Gl4Qp021266; Wed, 9 Jan 2008 11:47:04 -0500 Date: Wed, 09 Jan 2008 16:47:00 -0000 Message-Id: <200801091647.m09Gl4Qp021266@greed.delorie.com> From: DJ Delorie To: iant@google.com CC: gcc@gcc.gnu.org In-reply-to: (message from Ian Lance Taylor on 09 Jan 2008 08:43:04 -0800) Subject: Re: hard_regno_nregs == 0 ? References: <200801082013.m08KDLeU011644@greed.delorie.com> X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg00088.txt.bz2 > I would first ask why subreg_get_info is being called with ymode == > QImode for a hard register which can not hold QImode. That implies > that there is a QImode value in the register, which you say is > invalid. Are there any ports besides m32c that have registers which can hold HI (or SI I suppose) but not QI values? What I've done as a workaround is check for the zero and fail nicely: Index: rtlanal.c =================================================================== --- rtlanal.c (revision 131405) +++ rtlanal.c (working copy) @@ -3135,12 +3135,20 @@ subreg_get_info (unsigned int xregno, en else info->offset = 0; info->nregs = nregs_ymode; return; } + if (nregs_ymode == 0) + { + info->representable_p = false; + info->nregs = 1; + info->offset = offset; + return false; + } + /* If registers store different numbers of bits in the different modes, we cannot generally form this subreg. */ if (!HARD_REGNO_NREGS_HAS_PADDING (xregno, xmode) && !HARD_REGNO_NREGS_HAS_PADDING (xregno, ymode) && (GET_MODE_SIZE (xmode) % nregs_xmode) == 0 && (GET_MODE_SIZE (ymode) % nregs_ymode) == 0)