tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] RFC [PATCH] win: libm: fix "unknown constraint 't'",


From: avih
Subject: Re: [Tinycc-devel] RFC [PATCH] win: libm: fix "unknown constraint 't'", missing fpclassify/round/etc
Date: Fri, 6 Nov 2015 02:54:19 +0000 (UTC)

So it does compile, but as far as I can tell this patch doesn't work correctly.

On top of your patch, I added the missing __fpclassify and __fpclassifyl locally,
and now both fpclassify and signbit return incorrect values (didn't test isnan, but
isnan should be replaced with a macro anyway, i.e.
#define isnan(x) (fpclassify(x) == FP_NAN)  ).

e.g.
With your asm code, fpclassify(DBL_MIN / 2) == 0x400 (which is FP_NORMAL)
But it should be 0x4400 (FP_SUBNORMAL), and the C code does get it
correctly.

The same goes for other functions which also mostly/always don't return the
correct value.

If I replace the your asm implementations which you modified with the C code
from my original patch, then they do work correctly.



On Tuesday, November 3, 2015 8:29 AM, Sergey Korshunoff <address@hidden> wrote:


Hi avih!

> To address these issues, code which used inline asm with 't' was replaced with
> a C implementation, and the missing __fpclassify functions were added


A patch attached for the "t" issue. It is much faster
Don't throw an asm code away. A C implementation can be as an option
Please test.




reply via email to

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