public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Denis Chertykov <chertykov@gmail.com>
To: Georg-Johann Lay <avr@gjlay.de>
Cc: gcc-patches@gcc.gnu.org, Eric Weddington <eric.weddington@atmel.com>
Subject: Re: Ping #1: [Patch,AVR]: Hack around PR rtl-optimization/52543
Date: Mon, 19 Mar 2012 11:36:00 -0000	[thread overview]
Message-ID: <CADOs=zY64LVAC3-f4MqrtPc9ucGEyPX=gQvwiMb5KmN84LW1Zw@mail.gmail.com> (raw)
In-Reply-To: <4F671796.1090909@gjlay.de>

2012/3/19 Georg-Johann Lay <avr@gjlay.de>:
> 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 addresses
>> 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 register
>> by hand as post-increment.
>>
>> Luckily, post-increment is the only addressing mode that makes sense with the
>> non-generic address spaces and there is no choice for the address register
>> resp. addressing mode, anyway...
>>
>> This patch does not fix the PR issue, of course, it just avoids subreg lowering
>> by using/pretending mode-dependent addresses.
>>
>> Ok for trunk?
>>
>> Johann
>>
>>       PR rtl-optimization/52543
>>       * config/avr/avr.c (avr_mode_dependent_address_p): New function.
>>       (TARGET_MODE_DEPENDENT_ADDRESS_P): New define.
>>
>>       * config/avr/avr.md (unspec): Add UNSPEC_LPM.
>>       (load_<mode>_libgcc): Use UNSPEC_LPM instead of MEM.
>>       (mov<mode>): For multi-byte move from non-generic
>>       16-bit address spaces: Expand to use Z++ as address for
>>       inline code and use UNSPEC_LPM (Z) for code from libgcc.
>>       (load<mode>_libgcc): Remove expander.
>>       (split-lpmx): Remove split.
>

Approved.

Denis.

  reply	other threads:[~2012-03-19 11:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09 18:47 Georg-Johann Lay
2012-03-19 11:25 ` Ping #1: " Georg-Johann Lay
2012-03-19 11:36   ` Denis Chertykov [this message]
2012-03-19 17:29 ` Mike Stump
2012-03-20 19:54 ` [Patch,AVR]: Hack around PR rtl-optimization/52543, Take #2 Georg-Johann Lay
2012-03-20 19:56   ` Georg-Johann Lay
2012-03-21 11:47     ` Weddington, Eric
2012-03-20 20:06   ` Steven Bosscher
2012-03-21 14:03     ` Georg-Johann Lay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADOs=zY64LVAC3-f4MqrtPc9ucGEyPX=gQvwiMb5KmN84LW1Zw@mail.gmail.com' \
    --to=chertykov@gmail.com \
    --cc=avr@gjlay.de \
    --cc=eric.weddington@atmel.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).