[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] Double precision floating point routines
From: |
Martin Cibulski |
Subject: |
[avr-libc-dev] Double precision floating point routines |
Date: |
Wed, 26 Nov 2003 20:49:22 +0100 |
> 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
(like my favorite version 3 in my first message).
Then I can provide a low level call interface for the simple operations
ADD,SUB,MUL,DIV.
The calling program must give three pointers to operands and the result:
void ADD (double* p1, double* p2, double* p3)
{
*p3 = *p1 + *p2;
}
All my stack handling would be done outside these low level routines.
The Stack-Engine-Addition can be like:
void stack_add()
{
ADD (&stackY, &stackX, &stackX);
}
I don't know what kind of code GCC can generate.
Perhaps somebody can help me on this ?
Best Regards,
Martin