[PATCH] Fix to PR15810 - _xgetbv not declared

Serge Pavlov sepavloff at gmail.com
Tue Apr 23 00:28:36 PDT 2013


  Changed test for _xgetbv availability

http://llvm-reviews.chandlerc.com/D707

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D707?vs=1720&id=1723#toc

Files:
  lib/Support/Host.cpp

Index: lib/Support/Host.cpp
===================================================================
--- lib/Support/Host.cpp
+++ lib/Support/Host.cpp
@@ -119,7 +119,7 @@
   // there is no easy way to conditionally compile based on the assembler used.
   int rEAX, rEDX;
   __asm__ (".byte 0x0f, 0x01, 0xd0" : "=a" (rEAX), "=d" (rEDX) : "c" (0));
-#elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219
+#elif defined(_XCR_XFEATURE_ENABLED_MASK)
   unsigned long long rEAX = _xgetbv(_XCR_XFEATURE_ENABLED_MASK);
 #else
   int rEAX = 0; // Ensures we return false
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D707.2.patch
Type: text/x-patch
Size: 562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130423/8d136058/attachment.bin>


More information about the llvm-commits mailing list