title: Get SSE version without __asm on x64
body: <p>I'm trying to build slightly modified versions of some functions of the VS2010 CRT library, all is well except for the parts where it tries to access a global variable which presumably holds the instruction set architecture version (ISA):</p>
  
  <pre><code>if (__isa_available &gt; __ISA_AVAILABLE_SSE2)
  {
      // ...
  }
  else if (__isa_available == __ISA_AVAILABLE_SSE2)
  {
      // ...
  }
  </code></pre>
  
  <p>The values it should hold I found in an assembly file</p>
  
  <pre><code>__ISA_AVAILABLE_X86   equ 0
  __ISA_AVAILABLE_SSE2  equ 1
  __ISA_AVAILABLE_SSE42 equ 2
  __ISA_AVAILABLE_AVX   equ 3
  </code></pre>
  
  <p>How and where <code>__isa_available</code> is assigned a value is nowhere to be found (I've tried a find-in-files in all my directories...)</p>
  
  <p>MSDN refers to the <a href="http://msdn.microsoft.com/en-us/library/xs6aek1h.aspx" rel="nofollow">CPUID</a> example to determine the instruction set. The problem with that is it uses <code>__asm</code> blocks and those are not allowed in my x64 build.</p>
  
  <p>Does anyone knows how to quickly assign the correct value to <code>__isa_available</code>?</p>