[LLVMdev] [PATCH] CPUID for Win64

Chris Lattner clattner at apple.com
Sat Apr 25 11:27:52 PDT 2009

On Apr 24, 2009, at 4:16 AM, Nicolas Capens wrote:

> Hi all,
> Please consider applying the attached patch. Currently on Windows  
> x86-64 the processor features are not detected because the inline  
> assembly (which Visual C++ deprecated for x64) does not have an  
> alternative that uses intrinsics. Later tests for x86-64 then only  
> enable SSE2, leaving any more recent instruction set unused.
> The patch uses the __cpuid intrinsic that compile under 32-bit as  
> well as 64-bit. I’ve only tested it with my own experimental project  
> on Windows x64 but I see no potential issues for other platforms. A  
> potential additional improvement would be to cause a compiler error  
> when the GetCpuIDAndInfo does not compile to the intended code, and  
> to remove the test that follows right  
> afterAutoDetectSubtargetFeatures() has been called.

Applied, thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090425/91be8d8d/attachment.html>

More information about the llvm-dev mailing list