[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] Re: Wierd Calls.
From: |
Weddington, Eric |
Subject: |
RE: [avr-gcc-list] Re: Wierd Calls. |
Date: |
Thu, 12 Mar 2009 08:41:02 -0600 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of Dave Hylands
> Sent: Thursday, March 12, 2009 8:25 AM
> To: David VanHorn
> Cc: AVR-GCC
> Subject: Re: [avr-gcc-list] Re: Wierd Calls.
>
> > I'm still puzzled as to why the compiler didn't change:
> >
> > // This takes 53uS at 4 MHz
> > Bin = ( A / Data_Divisor ) // Data_Divisor is a constant, 32.
>
> If I declare
>
> const uint32_t Data_Divisor = 32;
>
> then it calls the helper function, but if I declare
>
> const int Data_Divisor = 32;
>
> then it appears to use the shift.
>
??? That's weird. An unsigned divisor needs a helper function, but using a
signed divisor will cause it to generate a shift.
- RE: [avr-gcc-list] Wierd Calls., (continued)
- RE: [avr-gcc-list] Wierd Calls., Weddington, Eric, 2009/03/10
- [avr-gcc-list] Re: Wierd Calls., David Brown, 2009/03/10
- Re: [avr-gcc-list] Re: Wierd Calls., David VanHorn, 2009/03/10
- Re: [avr-gcc-list] Re: Wierd Calls., David VanHorn, 2009/03/11
- RE: [avr-gcc-list] Re: Wierd Calls., Weddington, Eric, 2009/03/11
- Re: [avr-gcc-list] Re: Wierd Calls., Dave Hylands, 2009/03/11
- Re: [avr-gcc-list] Re: Wierd Calls., David VanHorn, 2009/03/11
- RE: [avr-gcc-list] Re: Wierd Calls., Dave Hansen, 2009/03/11
- Re: [avr-gcc-list] Re: Wierd Calls., Paulo Marques, 2009/03/12
- Re: [avr-gcc-list] Re: Wierd Calls., Dave Hylands, 2009/03/12
- RE: [avr-gcc-list] Re: Wierd Calls.,
Weddington, Eric <=
- Re: [avr-gcc-list] Re: Wierd Calls., Dave Hylands, 2009/03/13
- Re: [avr-gcc-list] Re: Wierd Calls., David VanHorn, 2009/03/13