FreeRDP/FreeRDP — pull request #2138 by dpoe (2014-10-06 20:02:39+00:00)
Title: correct check for lzcnt cpu capability

The current code passes a "1" to cpuid and checks the fifth bit of ECX to determine whether LZCNT is supported. According to the 64-ia-32-architectures-software-developer-manual from Intel, this instead returns whether Virtual Machine Extentions (VMX) are present.

For Intel, instead it should be calling CPUID with %EAX of 0x80000001 and then checking the fifth bit of %ECX. AMD considers this the bit that designates ABM (Advanced Bit Manipulation) support, which includes LZCNT, so it works there too.

Feel free to double-check these values.