<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Le 24/04/2015 23:42, Henri Verbeet a
écrit :<br>
</div>
<blockquote
cite="mid:CAOsNvww_g8MS1y0S_iM23dbT0+wMpCvZyc-yAGAYTw3Xu2U=Lg@mail.gmail.com"
type="cite">
<pre wrap="">On 24 April 2015 at 22:09, Axel Davy <a class="moz-txt-link-rfc2396E" href="mailto:axel.davy@ens.fr"><axel.davy@ens.fr></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">+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
+}
+
</pre>
</blockquote>
<pre wrap="">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)
<a class="moz-txt-link-freetext" href="https://source.winehq.org/git/wine.git/blob/25f0606e84bef7d60ea5c681d19b368660cab8e3:/dlls/d3d9/device.c#l3604">https://source.winehq.org/git/wine.git/blob/25f0606e84bef7d60ea5c681d19b368660cab8e3:/dlls/d3d9/device.c#l3604</a>)
Besides, proper Gallium style would have been to use PIPE_CC_GCC and
PIPE_ARCH_X86/PIPE_ARCH_X86_64.
</pre>
</blockquote>
Thanks for the warning.<br>
<br>
I think something like that would be more appropriate:<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
#if defined(PIPE_CC_GCC) && (defined(PIPE_ARCH_X86) ||
defined(PIPE_ARCH_X86_64))<br>
<br>
#include <fpu_control.h><br>
<br>
static void nine_setup()<br>
{<br>
fpu_control_t c;<br>
<br>
_FPU_GETCW(c);<br>
/* clear the control word */<br>
c &= _FPU_RESERVED;<br>
/* enable interrupts (d3d9 doc, wine tests) */<br>
c |= _FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM |<br>
_FPU_MASK_UM | _FPU_MASK_PM;<br>
_FPU_SETCW(c);<br>
}<br>
#else<br>
static void nine_setup()<br>
{<br>
WARN_ONCE("Ignoring FPU setup for this configuration\n");<span
style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation
Mono', Menlo, Courier, monospace; font-size: 11.818181991577148px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 15.272726058959961px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: pre; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(234, 255, 234); display: inline !important;
float: none;"><br>
</span>}<br>
#endif<br>
</body>
</html>