From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16266 invoked by alias); 13 Apr 2003 07:54:07 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16148 invoked from network); 13 Apr 2003 07:54:06 -0000 Received: from unknown (HELO mail.libertysurf.net) (213.36.80.91) by sources.redhat.com with SMTP; 13 Apr 2003 07:54:06 -0000 Received: from localhost.localdomain (212.83.141.192) by mail.libertysurf.net (6.5.026) id 3E8A4CE7001F23B9; Sun, 13 Apr 2003 09:54:05 +0200 Content-Type: text/plain; charset="iso-8859-1" From: Eric Botcazou To: Jan Hubicka Subject: Re: Reload bug Date: Sun, 13 Apr 2003 19:57:00 -0000 User-Agent: KMail/1.4.3 Cc: gcc@gcc.gnu.org References: <200304081937.16859.ebotcazou@libertysurf.fr> <200304121554.30377.ebotcazou@libertysurf.fr> <20030412142751.GD31150@kam.mff.cuni.cz> In-Reply-To: <20030412142751.GD31150@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200304130947.53856.ebotcazou@libertysurf.fr> X-SW-Source: 2003-04/txt/msg00611.txt.bz2 > > The function appears to assume that reg XREGNO supports mode YMODE. Is > > that by design? If so, I think you should mention it in the header > > comment. > > Hmm, I am not certain what should happen there. We can either verify it > here or the place we are doing so already... I think we should verify that the subreg is really representable. For low parts, it's HARD_REGNO_MODE_OK (xregno, ymode) == 1. Are you sure that we should not verify that HARD_REGNO_MODE_OK (xregno + offset, ymode) == 1 at the very end of the function either, like in the original code? > > I think you should mention that the second "if" catches paradoxical > > subregs too. > > Hmm, you are right. Then we can remove the first if too :) Even for big-endian platforms? I think the first "if" in the original code catches paradoxical subregs on big-endian platforms and the second "if" catches them on little-endian platforms. > No, I am actually trying to compute the size of the one ymode register > in order to be able to compensate the lowpart operation. > Imagine (subreg:QI (reg:DI) 3) is valid on little endian with > nregs_ymode == 2 I presume you mean big-endian? And nregs_xmode == 2? Then wouldn't the following formula be better? offset -= subreg_lowpart_offset (mode_for_size (GET_MODE_SIZE (ymode) / nregs_ymode, MODE_INT, 0), mode_for_size (GET_MODE_SIZE (xmode) / nregs_xmode, MODE_INT, 0)); It looks certainly more homogeneous than the former. -- Eric Botcazou