[racket-dev] Extflonum type for windows

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Mar 19 15:22:06 EDT 2013

At Tue, 19 Mar 2013 22:08:41 +0400, Michael Filonenko wrote:
> It seems that your changes with precision switching on every function
> call is not required on 32-bit windows.

The 32-bit Windows build does not use SSE for flonum operations, so
setting the precision at the start to extended mode would affect flonum
arithmetic.

It's possible that we should switch the build to use SSE, but I worry
about dropping support for old processors.

Meanwhile, it happens that switching the precision at the last minute
allows the 32-bit Windows build to support extflonums without using SSE
and without affecting flonum arithmetic.

> Small note about extflonum ffi on win platforms:
> 
> It is possible to use long double on win platforms with gcc (mingw,
> mingw-w64) compiler. It is also possible to use compiled DLL with
> Racket FFI. The only one note is that long double data must be 16-byte
> aligned, therefore you should use gcc command line option
> -m128bit-long-double on win32 platform. On win64 platform aligning is
> 16 byte by default.

I don't understand. Which piece of the system requires that `long
double's are 16-byte aligned? And is this an issue about compiling
"longdouble.dll", or with other potential DLLs?

Thanks!


Posted on the dev mailing list.