|
Message-ID: <20111205174016.GC23623@openwall.com> Date: Mon, 5 Dec 2011 21:40:16 +0400 From: Solar Designer <solar@...nwall.com> To: john-dev@...ts.openwall.com Subject: AVX and OSXSAVE All - In 1.7.9, I introduced a check for AVX support by the CPU (and for XOP support when relevant), as well as for OSXSAVE. Now I am thinking if maybe we should drop the OSXSAVE check in builds that only use 128-bit AVX, not 256-bit, since those least significant 128 bits of YMM registers are probably saved/restored as SSE registers by any non-ancient OS. Here's an interesting thread on the topic: http://rt.openssl.org/Ticket/Display.html?id=2633&user=guest&pass=guest Currently, we're only using 256-bit AVX in 32-bit x86 builds (not x86-64), where this provides a very slight speedup over 128-bit AVX. Thus, it'd sort of make sense to start making both 256-bit and 128-bit AVX builds for 32-bit x86, and to have this in the "fallback chain" (so in a package with both builds, we'd get fallback from 256-bit to 128-bit AVX if OSXSAVE is not available, but AVX itself is). But on the other hand, the fallback chain is already too long, and the performance difference between these two builds is very small. Maybe just exclude 256-bit AVX from all builds for now? The fallback chain on 32-bit x86 currently is: XOP -> AVX -> SSE2 -> MMX -> any That's 5 builds. With OpenMP and not, this becomes 10 builds. If we add 256- vs. 128-bit AVX, it'd be 12 builds. Frankly, I don't even have any system that is AVX-capable, but runs a 32-bit OS. I think that slightly older versions of Ubuntu like 10.04 were commonly installed as 32-bit, yet already had XSAVE support, but I doubt that these are any common on AVX-capable hardware (which started shipping in 2011 and generally required newer Linux distro versions for other reasons, such as for integrated graphics support). I am wondering whether and when Mac OS X added XSAVE support. (I did not try searching for info on this yet.) Any comments? Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.