> -----Original Message-----
> From: 
> avr-gcc-list-bounces+eweddington=cso.atmel....@nongnu.org 
> [mailto:avr-gcc-list-bounces+eweddington=cso.atmel....@nongnu.
> 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.


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to