On Tue, Jul 22, 2014 at 4:18 PM, Jason Ekstrand <ja...@jlekstrand.net> wrote: > On Mon, Jul 21, 2014 at 5:29 PM, Matt Turner <matts...@gmail.com> wrote: >> >> On Mon, Jul 21, 2014 at 5:16 PM, Jason Ekstrand <ja...@jlekstrand.net> >> wrote: >> > Signed-off-by: Jason Ekstrand <jason.ekstr...@intel.com> >> > --- >> > src/mesa/main/imports.h | 4 ++++ >> > 1 file changed, 4 insertions(+) >> > >> > diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h >> > index af780b2..5d6486b 100644 >> > --- a/src/mesa/main/imports.h >> > +++ b/src/mesa/main/imports.h >> > @@ -285,6 +285,10 @@ static inline int F_TO_I(float f) >> > int r; >> > __asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st"); >> > return r; >> > +#elif defined(USE_X86_64_ASM) && defined(__GNUC__) >> > + int r; >> > + __asm__ ("cvtss2si %1, %0" : "=r" (r) : "xm" (f)); >> >> "xm"? I think you just want "x" > > > No, this is needed because it uses an SSE register.
Right... "x" is SSE register. "m" is memory. Are you meaning to specify both? >> Also "=&r" since it's written without ever being read. > > > Reading the GCC docs, I don't see how earlyclobber is appropreate. Would > you care to explain your reasoning further? It's probably fine without it. The rule of thumb I've always seen is use =& if the argument is written before it could have been read. Both of these make me think that you should just use _mm_cvtss_si32() and let the compiler sort this kind of thing out. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev