This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ping #1: [Patch,AVR]: Hack around PR rtl-optimization/52543


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]