[MLton] Re: [MLton-commit] r6887

Matthew Fluet fluet at tti-c.org
Tue Sep 30 14:28:13 PDT 2008


On Tue, 30 Sep 2008, Matthew Fluet wrote:
> On Tue, 23 Sep 2008, Wesley Terpstra wrote:
>>  feround.c and IEEEReal.c carried duplicated fesetround code.
>>  The IEEEReal i386 version also works on x86_64.
>
> This is not technically true, as it only sets the control word on the x87 
> unit and not on the SSE unit.  For amd64, we use the SSE instructions 
> exclusively for floating-point computation, so changing the x87 control word 
> has no effect.  See
>   http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/libc/sysdeps/x86_64/fpu/fesetround.c?rev=1.2&cvsroot=glibc
>
> I doubt that there is any amd64 platform that does not provide 
> fe{get,set}round in libm, so I don't think it is necesary to provide assembly 
> for amd64.

Hmm, I got confused looking at just the patch in the commit log.  I guess 
the SSE control word changes were added some time ago.  And, looking at 
that commit entry (r6693), it seems that MinGW on Win64 does not provide 
(working) fe{get,set}round in libm.



More information about the MLton mailing list