<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 21, 2014 at 5:29 PM, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Mon, Jul 21, 2014 at 5:16 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> Signed-off-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br>
> ---<br>
> src/mesa/main/imports.h | 4 ++++<br>
> 1 file changed, 4 insertions(+)<br>
><br>
> diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h<br>
> index af780b2..5d6486b 100644<br>
> --- a/src/mesa/main/imports.h<br>
> +++ b/src/mesa/main/imports.h<br>
> @@ -285,6 +285,10 @@ static inline int F_TO_I(float f)<br>
> int r;<br>
> __asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st");<br>
> return r;<br>
> +#elif defined(USE_X86_64_ASM) && defined(__GNUC__)<br>
> + int r;<br>
> + __asm__ ("cvtss2si %1, %0" : "=r" (r) : "xm" (f));<br>
<br>
</div>"xm"? I think you just want "x"<br></blockquote><div><br></div><div>No, this is needed because it uses an SSE register.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Also "=&r" since it's written without ever being read.<br></blockquote><div><br></div><div>Reading the GCC docs, I don't see how earlyclobber is appropreate. Would you care to explain your reasoning further?<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class=""><br>
> + return r;<br>
> #elif defined(USE_X86_ASM) && defined(_MSC_VER)<br>
> int r;<br>
> _asm {<br>
> --<br>
<br>
</div>Remove the ' XXX We could use an x86-64/SSE2 version here.' comment<br>
above the function too.<br></blockquote><div><br></div><div>Good catch<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I'd expect some data about this change. Performance data would be<br>
nice, but I'd take just the output of `size` on i965_dri.so.<br>
</blockquote></div><br></div><div class="gmail_extra">Sure, I've got a little performance data if you'd like.<br></div></div>