[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Re: Wierd Calls.
From: |
Dave Hylands |
Subject: |
Re: [avr-gcc-list] Re: Wierd Calls. |
Date: |
Thu, 12 Mar 2009 07:24:30 -0700 |
I meant to sent my last reply to the list.
Hi David,
On Wed, Mar 11, 2009 at 2:17 PM, David VanHorn <address@hidden> wrote:
>>
>>
>> The assembly above comes from the __udivmodhi4 helper function (found
>> in libgcc.a), which is a helper function for performing a 32-bit
>> divide.
>
>
> Let me guess.. It was stuck on below the LCD routines in memory, and AVR
> Studio didn't know that somehow?
Yeah - libgcc.a probably isn't compiled with debug information.
> 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.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
- [avr-gcc-list] Wierd Calls., David VanHorn, 2009/03/10
- 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 <=
- RE: [avr-gcc-list] Re: Wierd Calls., Weddington, Eric, 2009/03/12
- Re: [avr-gcc-list] Re: Wierd Calls., Dave Hylands, 2009/03/13
- Re: [avr-gcc-list] Re: Wierd Calls., David VanHorn, 2009/03/13