This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, avr-tiny]: Fix handling of constant addresses.
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 26 Feb 2015 14:53:24 +0400
- Subject: Re: [patch, avr-tiny]: Fix handling of constant addresses.
- Authentication-results: sourceware.org; auth=none
- References: <54EDF0B2 dot 4080606 at gjlay dot de>
2015-02-25 18:56 GMT+03:00 Georg-Johann Lay <avr@gjlay.de>:
> The current avr-gcc ICEs in avr.c::tiny_valid_direct_memory_access_range
> because XEXP (op, 0) is used on op which are not MEM_P (e.g. REG or SUBREG).
>
> If op is MEM_P then INTVAL might be used for on RTXes which are not
> CONST_INT, e.g. CONST.
>
> Anyway, using such functions in insn conditions is not the right approach to
> get valid addresses. The right place is targetm.legitimate_address_p.
> Taking away move insns from reload by means of such conditions is not
> robust; reload knows how to make addresses legitimate if told so...
>
> Ok for trunk?
>
> Johann
>
>
> PR target/65192
> * config/avr/avr.c (tiny_valid_direct_memory_access_range): Remove.
> (avr_legitimate_address_p) <AVR_TINY, CONSTANT_ADDRESS_P>:
> Refuse any constant address not in 0..0xbf.
> * config/avr/avr-protos.h: Same.
> * config/avr/avr.md (*mov<mode>, *movsf): Remove
> tiny_valid_direct_memory_access_range from insn conditions.
> (mov<mode>): Don't special-case expansion of avrtiny addresses.
Please apply.
Denis.