Re: [avr-gcc-list] Optimization around mul and restoring r1

2013-10-02 Thread David Brown
On 02/10/13 09:34, Oleksandr Redchuk wrote: > 2013/10/2 Georg-Johann Lay mailto:a...@gjlay.de>> > > 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 >

Re: [avr-gcc-list] Optimization around mul and restoring r1

2013-10-02 Thread Oleksandr Redchuk
2013/10/2 Georg-Johann Lay > 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 t

Re: [avr-gcc-list] Optimization around mul and restoring r1

2013-10-01 Thread Georg-Johann Lay
David Brown schrieb: On 01/10/13 09:41, Simon Kirby wrote: Hello! How difficult would it be to convince avr-gcc to not re-zero r1 instantly after mul, but delay it until a zero is actually needed? For example, see this actual avr-gcc output: Vneutral = (uint16_t)Vbus * t >> 8; ->

Re: [avr-gcc-list] Optimization around mul and restoring r1

2013-10-01 Thread David Brown
On 01/10/13 09:41, Simon Kirby wrote: > Hello! > > How difficult would it be to convince avr-gcc to not re-zero r1 instantly > after mul, but delay it until a zero is actually needed? For example, > see this actual avr-gcc output: > > Vneutral = (uint16_t)Vbus * t >> 8; > -> > lds

Re: [avr-gcc-list] Optimization around mul and restoring r1

2013-10-01 Thread Weddington, Eric
ubject: [avr-gcc-list] Optimization around mul and restoring r1 > > Hello! > > How difficult would it be to convince avr-gcc to not re-zero r1 > instantly > after mul, but delay it until a zero is actually needed? Patches to avr-gcc are welcome. Eric _

[avr-gcc-list] Optimization around mul and restoring r1

2013-10-01 Thread Simon Kirby
Hello! How difficult would it be to convince avr-gcc to not re-zero r1 instantly after mul, but delay it until a zero is actually needed? For example, see this actual avr-gcc output: Vneutral = (uint16_t)Vbus * t >> 8; -> lds r25, 0x20FD mul r24, r25 movw