Re: Optimization around mul and restoring r1

David Brown <[email protected]>
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <[email protected]>
On 02/10/13 09:34, Oleksandr Redchuk wrote:
> 2013/10/2 Georg-Johann Lay <[email protected] <mailto:[email protected]>>
> 
>     David Brown schrieb:
> 
>         In general, it would be a good thing to delay the zeroing of r1,
>         and it
>         is worth searching the issue database for previous issues and
>         filing a
>         new "missed optimisation" issue if it is not there already:
> 
> 
>     IMHO everyone working on the avr back-end is aware of this problem.
> 
> 
> May be, reassigning __zero_reg__ to R2 and using R1:R0 as
> __temp_reg_hi__:__temp_reg__ will be better but I can't estimate both
> complexity of changes and code size/perfomance gain effect.
> 

I believe this has been discussed before, and the conclusion was that
this would have been a good idea if it had come in the early days of
avr-gcc, but it is not worth breaking the established ABI.  I think the
changes in gcc would be relatively simple - but the changes in the
support libraries in gcc and avr-libc would be much greater.  And of
course anyone with assembly code that works along with avr-gcc will be
in trouble too.

mvh.,

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.