Subject: [clisp-list] Re: fenv.h support

From: Bruno Haible <[email-masked]>
Date: Thu Sep 5 07:47:03 2002

Will Newton writes:

> CLISP relies on the fpu_control.h header to set the FPU behaviour on Linux. 
> Unfortunately, fpu_control.h is unportable in many ways. The general anwser 
> seems to be to use fenv.h, a standard header in C99. This patch will enable 
> fenv.h

Thanks for the patch.

But meanwhile this has changed in the clisp CVS: We don't use
fpu_control.h any more, because it was glibc specific. But we don't
want to use fenv.h either, for the following two reasons:

  * According to ISO C 99 section 7.6.1, you need
       #pragma stdc fenv_access on
    in order to obtain *any* non-default behaviour.
    And you don't know the default behaviour.

  * The only platform that I've seen that has <fenv.h>
    is glibc. But the functions declared in it don't work on
    all platforms (in particular they don't work on i686).
    The glibc maintainers don't want to fix it; they say these
    are hardware limitations.

So now we use autoconf checks to optimize clisp's code for the default
FP behaviour.

Bruno

---

From: Will Newton <[email-masked]>
Date: Thu Sep 5 08:13:06 2002

>     are hardware limitations.

That sounds quite unlikely - I'm certainly sure i686 can implement enough 
different modes for clisp. Do you have any link to any discussion of this?

> So now we use autoconf checks to optimize clisp's code for the default

OK, no problem, I'll check out CVS and see if it works for me. I am currently 
trying to get the build working on Linux/hppa. The avcall stuff is still 
broken but I think I am getting towards a solution.