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 after AutoDetectSubtargetFeatures() has been called. Kind regards, Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090424/df096752/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: __cpuid.patch Type: application/octet-stream Size: 2951 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090424/df096752/attachment.obj>
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! http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090420/076691.html -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090425/91be8d8d/attachment.html>