missing fpresetsticky in ieeefp.h

Bruce Evans bde at zeta.org.au
Fri Feb 3 09:58:49 PST 2006


On Thu, 2 Feb 2006, O. Hartmann wrote:

> Bruce Evans schrieb:
>> On Thu, 2 Feb 2006, O. Hartmann wrote:
>> ...
>>>> Now take a look into <machine/ieeefp.h>, where this function should be 
>>>> declared. Nothing, I can not find this routine, it seems to be 'not 
>>>> available' on my FreeBSD6.1-PRERELEASE AMD64 (no 32Bit compatibility).
>> 
>> It was removed for amd64 and never existed for some other arches.  It was
    [fresetsticky()]
>> apparently unused when it was removed a year ago.
>> ...
>> % RCS file: /home/ncvs/src/sys/amd64/include/ieeefp.h,v
>> ...
>> % revision 1.13
> ...
> Thanks a lot. In prior software compilations of GMT on FBSD/AMD64 I commented 
> out the appropriate line in gmt_init.c without any hazardous effects - but I 
> never used GMT that intensive having ever recognozed any malicious side 
> effects.
>
> I should contact the guys from Soest/Hawaii asking them for any serious 
> effects commenting out this line on amd64 architectures.

I think it is probably used only for error detection, if at all.
Accumulated IEEE exceptions are supposed to be read using fpgetsticky()
and then cleared using fp[re]setsticky() so that the next set accumulated
can be distinguished from the old set.  Applications should now use
fesetexceptflag() instead of fp[re]setsticky().

BTW, the most useful fp* functions other than fp[re]setsticky(), namely
fp{get,set}round(), never worked on ia64 due to the rounding flags
values being misspelled, so there are unlikely to be any portable uses
of the fp* functions in ports.  The corresponding fe{get,set}round()
functions work on at least i386, amd64 and ia64.

Bruce


More information about the freebsd-amd64 mailing list