avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Re: Wierd Calls.


From: Dave Hansen
Subject: RE: [avr-gcc-list] Re: Wierd Calls.
Date: Wed, 11 Mar 2009 17:33:29 -0400

From: address@hidden
[...] 
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.
 
into
 
// This takes 8.9uS at 4 MHz
Bin = ( A >> 5)
 
Just guessing, but it may be trying to preserve truncation toward zero (required by C99) if the _expression_ is signed.
 
Regards,
 
   -=Dave
 


Windows Liveā„¢ Groups: Create an online spot for your favorite groups to meet. Check it out.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]