[Mesa-dev] [PATCH 08/16] st/nine: Change x86 FPU Control word on device creation as on wined3d and windows

Henri Verbeet hverbeet at gmail.com
Fri Apr 24 14:42:41 PDT 2015


On 24 April 2015 at 22:09, Axel Davy <axel.davy at ens.fr> wrote:
> +static void nine_setup_fpu(void)
> +{
> +#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
> +    WORD cw;
> +    __asm__ volatile ("fnstcw %0" : "=m" (cw));
> +    cw = (cw & ~0xf3f) | 0x3f;
> +    __asm__ volatile ("fldcw %0" : : "m" (cw));
> +#else
> +    WARN_ONCE("FPU setup not supported on non-x86 platforms\n");
> +#endif
> +}
> +
This is once again similar enough to the corresponding Wine source
that I feel the need to remind you, this time more strongly, that Wine
is licensed under LGPL 2.1+. ( For the curious, (warning, LGPL)
https://source.winehq.org/git/wine.git/blob/25f0606e84bef7d60ea5c681d19b368660cab8e3:/dlls/d3d9/device.c#l3604)
Besides, proper Gallium style would have been to use PIPE_CC_GCC and
PIPE_ARCH_X86/PIPE_ARCH_X86_64.


More information about the mesa-dev mailing list