On Mon, Sep 17, 2012 at 7:15 PM, Roland Scheidegger <srol...@vmware.com> wrote: > Am 18.09.2012 01:34, schrieb Matt Turner: >> Here is the assembly output of the other two (IEEE being the fi_type >> union hack, and SIGNBIT using signbit(). >> >> <IS_NEGATIVE_IEEE>: >> movd %xmm0,%eax >> shr $0x1f,%eax >> >> <IS_NEGATIVE_SIGNBIT>: >> pmovmskb %xmm0,%eax >> shr $0x3,%eax >> and $0x1,%eax > What optimization level was that?
-O2 -march=native (sandybridge) -mno-avx. > I find it interesting that it used pmovmskb/shr/and. Would be much more > natural imho (and better) to juse use movmskps/and if it wants to > extract the sign bit "directly" (which would probably be roughly as good > as the union hack well there might always be some odd cpus out there > which don't have the same performance for pmovmskb and movmskps but > generally it should be the same). Yeah, it seems like movmskps/and would be better. I'll poke around gcc and file a bug. > The result might look less pretty though when compiling on plain 32-bit > x86 (that is, using fp stack) in any case. > Is there actually a platform where we wouldn't have USE_IEEE? OpenVMS. :) _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev