From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18017 invoked by alias); 19 Mar 2012 11:36:20 -0000 Received: (qmail 17928 invoked by uid 22791); 19 Mar 2012 11:36:19 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Mar 2012 11:35:52 +0000 Received: by iaag37 with SMTP id g37so10003528iaa.20 for ; Mon, 19 Mar 2012 04:35:52 -0700 (PDT) Received: by 10.50.153.193 with SMTP id vi1mr5739119igb.2.1332156952026; Mon, 19 Mar 2012 04:35:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.47.15 with HTTP; Mon, 19 Mar 2012 04:35:31 -0700 (PDT) In-Reply-To: <4F671796.1090909@gjlay.de> References: <4F5A4FFE.9000203@gjlay.de> <4F671796.1090909@gjlay.de> From: Denis Chertykov Date: Mon, 19 Mar 2012 11:36:00 -0000 Message-ID: Subject: Re: Ping #1: [Patch,AVR]: Hack around PR rtl-optimization/52543 To: Georg-Johann Lay Cc: gcc-patches@gcc.gnu.org, Eric Weddington Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg01246.txt.bz2 2012/3/19 Georg-Johann Lay : > http://gcc.gnu.org/ml/gcc-patches/2012-03/msg00641.html > > Georg-Johann Lay wrote: >> The problem with the PR is that lower-subreg.c happily splits multi-byte= moves >> from address spaces without knowing anything about the additional costs = this is >> causing. >> >> The TARGET_MODE_DEPENDENT_ADDRESS_P hook cannot be used for 16-bit addre= sses >> because that hook is not sensitive to address spaces, but is is used for= the >> 24-bit address space to avoid subreg lowering for PSImode. >> >> For the 16-bit address spaces the mov expander now assigns the address r= egister >> by hand as post-increment. >> >> Luckily, post-increment is the only addressing mode that makes sense wit= h the >> non-generic address spaces and there is no choice for the address regist= er >> resp. addressing mode, anyway... >> >> This patch does not fix the PR issue, of course, it just avoids subreg l= owering >> by using/pretending mode-dependent addresses. >> >> Ok for trunk? >> >> Johann >> >> =C2=A0 =C2=A0 =C2=A0 PR rtl-optimization/52543 >> =C2=A0 =C2=A0 =C2=A0 * config/avr/avr.c (avr_mode_dependent_address_p): = New function. >> =C2=A0 =C2=A0 =C2=A0 (TARGET_MODE_DEPENDENT_ADDRESS_P): New define. >> >> =C2=A0 =C2=A0 =C2=A0 * config/avr/avr.md (unspec): Add UNSPEC_LPM. >> =C2=A0 =C2=A0 =C2=A0 (load__libgcc): Use UNSPEC_LPM instead of MEM. >> =C2=A0 =C2=A0 =C2=A0 (mov): For multi-byte move from non-generic >> =C2=A0 =C2=A0 =C2=A0 16-bit address spaces: Expand to use Z++ as address= for >> =C2=A0 =C2=A0 =C2=A0 inline code and use UNSPEC_LPM (Z) for code from li= bgcc. >> =C2=A0 =C2=A0 =C2=A0 (load_libgcc): Remove expander. >> =C2=A0 =C2=A0 =C2=A0 (split-lpmx): Remove split. > Approved. Denis.