[MLton] Re: [MLton-commit] r6887

Wesley W. Terpstra wesley at terpstra.ca
Tue Sep 30 15:24:58 PDT 2008


On Tue, Sep 30, 2008 at 11:17 PM, Matthew Fluet <fluet at tti-c.org> 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.

An earlier commit by me added the SSE instructions to update the SSE
unit at the same time (check IEEEReal.c -- I added 64 bit assembly) as
the x87 unit. At the time I didn't realize there were two copies so
only updated the one. The commit you saw merged them and removed the
old version.

> For amd64, we use the SSE instructions exclusively for floating-point computation, so changing the x87 control word has no effect.
> 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.

Not true. I added that code because it was needed on MinGW/win64. The
"libc" there also uses x87 ops, so we need to set both since MLton
native codegen uses the other. I assume it's supposed to affect
cos/sin/etc? At least it passes the regressions as it is now.



More information about the MLton mailing list