From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11115 invoked by alias); 24 Mar 2003 23:16:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 11101 invoked by uid 71); 24 Mar 2003 23:16:00 -0000 Date: Mon, 24 Mar 2003 23:46:00 -0000 Message-ID: <20030324231600.11100.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Jan Hubicka Subject: Re: target/9929: [3.3/3.4 regression] Can't find spill register Reply-To: Jan Hubicka X-SW-Source: 2003-03/txt/msg01644.txt.bz2 List-Id: The following reply was made to PR target/9929; it has been noted by GNATS. From: Jan Hubicka To: Janis Johnson Cc: Steven Bosscher , gabor@mac.com, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org, jh@suse.cz Subject: Re: target/9929: [3.3/3.4 regression] Can't find spill register Date: Tue, 25 Mar 2003 00:06:42 +0100 > On Mon, Mar 24, 2003 at 09:00:40PM +0100, Steven Bosscher wrote: > > > > Janis, can you hunt this one? > > The regression showed up with this patch: > > Sat Mar 30 14:08:55 CET 2002 Jan Hubicka > > * local-alloc.c (local_alloc): Avoid call of update_equiv_regs > when not optimizing. > > * toplev.c (rest_of_compilation): Cann mark_constant_function > only when optimizing. > > * flow.c (calculate_global_regs_live): Ensure that all AUX fields > are NULL. > > * cfgcleanup.c (bb_flags): Add BB_NONTHREADABLE_BLOCK. > (thread_jump): Set BB_NONTHREADABLE_BLOCK, check it. > (try_optimize_cfg): clear all AUX fields. > > * i386.c (aligned_operand): Be prepared for SUBREGed registers. > (ix86_decompose_address): Use REG_P instead of GET_CODE (...) == REG. > (ix86_address_cost): Be prepared for SUBREGed registers. > (legitimate_address_p): Accept SUBREGed registers. > > The hunt used Wolfgang's reduced test case with "-O -fPIC" on > i686-pc-linux-gnu. Tue Mar 25 00:05:27 CET 2003 Jan Hubicka * i386.c (legitimate_address_p): Refuse DImore registers in 32bit compilation. Index: i386.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v retrieving revision 1.552 diff -c -3 -p -r1.552 i386.c *** i386.c 22 Mar 2003 20:02:22 -0000 1.552 --- i386.c 24 Mar 2003 23:05:11 -0000 *************** legitimate_address_p (mode, addr, strict *** 5936,5941 **** --- 5936,5949 ---- goto report_error; } + /* We can run out of registers when we do allow subregs + of DImode regsiters. */ + if (GET_MODE (reg) == DImode && !TARGET_64BIT) + { + reason = "base reg is DImore"; + goto report_error; + } + if ((strict && ! REG_OK_FOR_BASE_STRICT_P (reg)) || (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (reg))) { *************** legitimate_address_p (mode, addr, strict *** 5971,5976 **** --- 5979,5993 ---- reason = "index is not in Pmode"; goto report_error; } + + /* We can run out of registers when we do allow subregs + of DImode regsiters. */ + if (GET_MODE (reg) == DImode && !TARGET_64BIT) + { + reason = "index reg is DImore"; + goto report_error; + } + if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (reg)) || (! strict && ! REG_OK_FOR_INDEX_NONSTRICT_P (reg)))