Change crossgen to always pass USE_SSE2 to the JIT.
authorPat Gavlin <pagavlin@microsoft.com>
Mon, 7 Nov 2016 20:08:00 +0000 (12:08 -0800)
committerPat Gavlin <pagavlin@microsoft.com>
Mon, 7 Nov 2016 20:08:00 +0000 (12:08 -0800)
.NET Core and the RyuJIT x86/x64 backends require SSE2. Always pass this
flag to the JIT.

src/zap/zapper.cpp

index 71f3436..2c7023a 100644 (file)
@@ -3382,10 +3382,15 @@ void Zapper::InitializeCompilerFlags(CORCOMPILE_VERSION_INFO * pVersionInfo)
         m_pOpt->m_compilerFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_USE_FCOMI);
     }
 
+#if !defined(FEATURE_CORECLR)
     if (CPU_X86_USE_SSE2(pVersionInfo->cpuInfo.dwFeatures))
     {
         m_pOpt->m_compilerFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_USE_SSE2);
     }
+#else
+    // .NET Core requires SSE2.
+    m_pOpt->m_compilerFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_USE_SSE2);
+#endif // !defined(FEATURE_CORECLR)
 
 #endif // _TARGET_X86_