From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25393 invoked by alias); 11 Jan 2011 13:30:51 -0000 Received: (qmail 25383 invoked by uid 22791); 11 Jan 2011 13:30:50 -0000 X-SWARE-Spam-Status: No, hits=1.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-fx0-f47.google.com (HELO mail-fx0-f47.google.com) (209.85.161.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Jan 2011 13:30:46 +0000 Received: by fxm17 with SMTP id 17so19203900fxm.20 for ; Tue, 11 Jan 2011 05:30:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.69.141 with SMTP id z13mr934779fai.9.1294752643785; Tue, 11 Jan 2011 05:30:43 -0800 (PST) Received: by 10.223.70.201 with HTTP; Tue, 11 Jan 2011 05:30:43 -0800 (PST) Date: Tue, 11 Jan 2011 13:30:00 -0000 Message-ID: Subject: Plus Reload From: Gidi Nave To: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2011-01/txt/msg00117.txt.bz2 Hi, I have a question regarding Plus reload situation I ran into in my port (which was taken from branch 4.6): I got the following insn:=A0 Set d1=A0 (plus r1 -96). d1 and r1 are 2 registers from different classes. The reload (which take place at: reload1.c , gen_reload(out =3D d1, in =3D (plus r1 -96)) try 3 options: 1. switch the plus operands: =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 set d1 (plus -96 r1) 2. split into 2 insns - reload the const to d1 and then add r1: =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 set d1 -96 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 set d1=A0 (plus d1 r1) 3. split into 2 insns - copy r1 to d1 and then add the const: =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 set d1 r1 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 set d1=A0 (plus d1 -96) GCC tries generating the 1st option - and fails since no valid pattern is f= ound. Then it tries generating the 2nd option and fails once again, since no valid pattern is found. Then it tries generating the 3rd option without constraint validity check(emit_insn_if_valid_for_reload) like the first 2 attempts, and creates a new insn which will later fail since it's not satisfying it's constraints. My question is: why is GCC certain that one of those 3 attempts must work? In my case, all 3 resulted insns are not supported by the architecture. Thanks, Gidi.