[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] GCC does useless 16-bit operations
From: |
Eric Weddington |
Subject: |
RE: [avr-gcc-list] GCC does useless 16-bit operations |
Date: |
Fri, 11 May 2007 15:31:24 -0600 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of address@hidden
> Sent: Thursday, May 10, 2007 9:28 PM
> To: address@hidden
> Subject: [avr-gcc-list] GCC does useless 16-bit operations
>
> For the C code:
<snip bloated code>
> The C code:
>
> uint8_t temp = (tx_producer_index + 1U) % 64;
>
> is much much better with 3.4.4:
>
> 16de: e0 91 f7 00 lds r30, 0x00F7
> 16e2: ef 5f subi r30, 0xFF ; 255
> 16e4: 9e 2f mov r25, r30
> 16e6: 9f 73 andi r25, 0x3F ; 63
>
<snip>
> Is there something I should do to figure out what GCC thinks
> it's doing?
To keep this issue from being lost in the email archives, could you do
this?:
- Fill out a GCC bug report
- Set the target to "avr"
- Set the keywords list to "missed-optimization"
- Put my email address in the CC list so I can keep track of it.
I agree the code should not be so bloated and that AVR GCC should do better.
It is a "missed optimization" type of bug. I cannot guarantee when it will
get fixed as we could always use more volunteers.
Thanks,
Eric