From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16739 invoked by alias); 22 Jun 2010 17:27:36 -0000 Received: (qmail 16727 invoked by uid 22791); 22 Jun 2010 17:27:35 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Jun 2010 17:27:31 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5MHRR4t016583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Jun 2010 13:27:28 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5MHRQ23023924; Tue, 22 Jun 2010 13:27:26 -0400 Received: from [172.17.80.6] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o5MHROVZ028956; Tue, 22 Jun 2010 13:27:25 -0400 Message-ID: <4C20F27C.7010802@redhat.com> Date: Tue, 22 Jun 2010 18:57:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Thunderbird/3.0.4 MIME-Version: 1.0 To: Revital1 Eres CC: gcc@gcc.gnu.org Subject: Re: Help with reload References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2010-06/txt/msg00675.txt.bz2 On 06/22/10 08:52, Revital1 Eres wrote: > Hello, > > I have a question regarding code generation for a new target I'm working > on. > I am using GCC 4.6. > > In reload pass the following first instruction is replaced with the > second one after spilling reg 182 to the stack. The problem is that > the generated new instruction does not have a valid address format and > I'm not sure why it was considered as a valid replacement. > Any help on how to resolve this is appreciated. > > (insn 282 150 151 13 jctrans.c:109 (set (reg:SI 12 r12) > (mem/s:SI (plus:SI (reg/v/f:SI 182 [ incomp ]) > (const_int 8 [0x8])) [6 *incomp_85 S4 A32])) -1 (nil)) > > (insn 282 150 151 13 jctrans.c:109 (set (reg:SI 12 r12) > (mem/s:SI (plus:SI (mem/c:SI (plus:SI (reg/f:SI 63 r63) > (const_int -12 [0xfffffff4])) [56 %sfp+-12 S4 A32]) > (const_int 8 [0x8])) [6 *incomp_85 S4 A32])) -1 (nil)) > What's happening is pseudo 182 is not getting a hard reg, and is thus on the stack (see reg_equiv_mem). Reload will substitute the MEM for the unassigned pseudo. Check your GO_IF_LEGITIMATE_ADDRESS. You might also look at your REGNO_OK_FOR_BASE_P and whether or not it handles a strict & non-strict variant properly. Jeff