[Top][All Lists]

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

Re: [avr-gcc-list] libm trouble

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] libm trouble
Date: Wed, 18 Aug 2004 16:21:36 +0200 (MET DST)

Peeter Vois <address@hidden> wrote:

[About NaNs and such]

> The hard thing is that the nan dresult is easy to happen and
> checking it each step is almost impractical.


> I was investigating the asm code in CVS regarding this issue and I
> did not notice any serious errors.

I believe there are still mismatches between what the compiler uses as
NaN (e. g. for multiplication and such) and the library.  There are
probably more issues like this, e. g. the preprocessor constants that
are the base for <float.h> suggest that avr-gcc/avr-libc could handle
denormalized floating point numbers, yet I believe the library could
not handle them at all.

> Still some things did remain unclear yet: the nan routine has lots
> of ifdef selections, which ones were used during compiling

I'm not even sure about that myself...

>there was an exponent check against 0 and rjump 1f which was
>probably meant as jump to label 1 forward, but 1f can be handled as a
>hexadecimal number aswell and in that case the program will make
>wrong jump. Unpredicted results may happen.

Nope, hexadecimal 1f would strictly be required to be written as 0x1f
(and would not make much sense at all -- relative jumps would have to
be written like "RJMP .+2" and such).  This is indeed a jump to the
closest label named `1' in forward direction.  That implements
Unix-assembler style local labels.  The advantage is that you can
re-use the label numbers within the same source file.

J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

reply via email to

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