[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] Bug with -Os with constant multiplier of 3?
From: |
Weddington, Eric |
Subject: |
RE: [avr-gcc-list] Bug with -Os with constant multiplier of 3? |
Date: |
Thu, 23 Dec 2010 22:03:11 -0700 |
Hi David,
Have you had a chance to take a look at the avr target bugs in the GCC Bugzilla
database? This might have already been submitted, but if not, could you submit
a bug to the GCC project? If you do this, please put my email address in the CC
list.
Thanks,
Eric Weddington
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of David Kopf
> Sent: Tuesday, December 21, 2010 8:02 AM
> To: address@hidden
> Subject: [avr-gcc-list] Bug with -Os with constant multiplier of 3?
>
> Hi,
>
> Using WinAVR avr-gcc 4.3.0 and 4.3.3, compiling 3*<uint8_t> with -Os calls
> __mulhi3 instead of the optimized *2+1 when no hardware
> multiply is present. O1,O2,O3 does it right:
>
> Target: ATTiny85
>
> > uint8_t rssi; //r24
> > -O1 -O2 -O3
> > rssi=3*rssi;
> > aa: 28 2f mov r18, r24
> > ac: 22 0f add r18, r18
> > ae: 28 0f add r18, r24
> >
>
> > -Os
> > rssi=3*rssi;
> > ae: 90 e0 ldi r25, 0x00 ; 0
> > b0: 63 e0 ldi r22, 0x03 ; 3
> > b2: 70 e0 ldi r23, 0x00 ; 0
> > b4: 40 d0 rcall .+128 ; 0x136<__mulhi3>
> >
>
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list