<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 24, 2009, at 4:16 AM, Nicolas Capens wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Hi all,<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">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.<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">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<span style="font-size: 10pt; font-family: 'Courier New'; ">AutoDetectSubtargetFeatures()</span><span class="Apple-converted-space"> </span>has been called.<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div></span></blockquote></div><br><div>Applied, thanks!</div><div><a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090420/076691.html">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090420/076691.html</a></div><div><br></div><div>-Chris</div></body></html>