Bug 590785 - njconfig.i386_use_cmov is not initialized properly (r=njn,rreitmai)

--HG--
extra : convert_revision : 59a48227c291c53574b628358d9d581664848382
This commit is contained in:
Steven Johnson 2010-08-26 14:02:14 -07:00
parent 915827dfc0
commit 6a09e1493a

View File

@ -44,7 +44,7 @@
namespace nanojit
{
#ifdef NANOJIT_IA32
static bool CheckForSSE2()
static int getCpuFeatures()
{
int features = 0;
#if defined _MSC_VER
@ -76,7 +76,7 @@ namespace nanojit
: "%eax", "%ecx"
);
#endif
return (features & (1<<26)) != 0;
return features;
}
#endif
@ -87,8 +87,9 @@ namespace nanojit
cseopt = true;
#ifdef NANOJIT_IA32
i386_sse2 = CheckForSSE2();
i386_use_cmov = true;
int const features = getCpuFeatures();
i386_sse2 = (features & (1<<26)) != 0;
i386_use_cmov = (features & (1<<15)) != 0;
i386_fixed_esp = false;
#endif