This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch,AVR]: Fix PR50447 (2/n)
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org, Denis Chertykov <chertykov at gmail dot com>, Eric Weddington <eric dot weddington at atmel dot com>, Anatoly Sokolov <aesok at post dot ru>
- Date: Fri, 23 Sep 2011 10:41:41 +0200
- Subject: Re: [Patch,AVR]: Fix PR50447 (2/n)
- References: <4E7B73A4.4060508@gjlay.de> <4E7C36E6.30004@gnu.org>
Paolo Bonzini schrieb:
> On 09/22/2011 07:43 PM, Georg-Johann Lay wrote:
>> This patch adds the PLUS part to fix the PR.
>>
>> addsi3 has a 8-bit scratch register now so that constants that are not
>> covered
>> by the constraints won't force a reload of the constant.
>>
>> The output routine tries adding the constant and subtracting the negated
>> constant and then chooses the shortest sequence. Moreover, if the
>> lower bytes
>> of the constant are zero, there is no need to add them.
>>
>> Besides that, the patch adds some add-and-zero-extend patterns.
>>
>> Passed without regressions.
>>
>> Ok to commit?
>
> The same can be done for cmp, no?
Yes, can be done for comparisons, too. I'd prefer a separate patch for it. The
subject is bit misleading; should be (2/n).
> Paolo