[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] Double precision floating point routines
From: |
E. Weddington |
Subject: |
Re: [avr-libc-dev] Double precision floating point routines |
Date: |
Wed, 10 Dec 2003 12:37:49 -0700 |
On 10 Dec 2003 at 20:08, Martin Cibulski wrote:
>
> >> > As Jörg Wunsch wrote:
> >> >
> >> > It would probably be very nice to combine all this into the
> >> > compiler/library, but I believe that is not possible using the
> >> > outlined stack engine.
> >> > --
> >>
> >> I could modify my routines to use a stack in memory
> >
> >My guess would be that, to include these routines, you would have to use
> >the normal data stack, just like other subroutines in the library. Even if
> >it uses a lot.
>
> >Would this be possible for you to do?
>
> Eric,
>
> it would be possible to use a separate data stack.
> Can you please explain a little more how it works ?
> I read that the IRC compiler uses a data stack pointed
> by the Y register. Does AVRGCC do the same ?
> If yes, how is it used (post/pre increment/decrement, which pointer
> register) ?
>
> How are parameters passed in AVRGCC ?
This information is in the avr-libc FAQ (the AVR GCC calling convention),
which is part of the user manual. The Savannah site is down, so I can't
give you a link to that part of the manual. Do you have a copy of it? If
not, I can send you a copy of the manual.
> In the mean time I looked at the documentation of
> the library and the GCC config files (for compilation of GCC itself, I
> think).
> It seems to me that GCC generates calls like
> 'result = add (parameter1, parameter2)'
> and combines these to calculate more complex expressions.
This is pretty much correct.
> In the sourcecode of the single precision math routines
> I found both parameters passed in registers, not on the stack.
> Would AVRGCC pass 8 byte wide double parameters in registers too ?
Again, reference the AVR GCC calling convention which is described in the
avr-libc FAQ. Parameters are passed in registers, up to a point, then they
are placed on the stack. It all depends on how much is being passed.
Thanks
Eric