hi,

I think V8 shoud check Windows OS version to enable AVX support.
AVX is only supported by Win7 SP1/Win2008 R2 SP1 and above.
V8 will randomly crash (C000001D, STATUS_ILLEGAL_INSTRUCTION) on my WinXP 
SP3 test machine, if the result of its xgetbv claims that it's AVX enabled.

So please add OS version check for the following code(requires windows 
version >= 6.1 SP1):

chromium\src\v8\src\ia32\assembler-ia32.cc
chromium\src\v8\src\x64\assembler-x64.cc

bool IsAvxEnabledWindows(){
  bool ver_is_ok = false;

   OSVERSIONINFOEX version_info = { sizeof version_info };
  ::GetVersionEx(reinterpret_cast<OSVERSIONINFO*>(&version_info));
  
  if (version_info.dwMajorVersion == 6 ) {
    if(version_info.dwMinorVersion > 1)
      ver_is_ok = true;
    else if((version_info.dwMinorVersion == 1) && 
(version_info.wServicePackMajor >= 1))
      ver_is_ok = true;
  } else if (version_info.dwMajorVersion > 6) {
    ver_is_ok = true;
  }

  return ver_is_ok;
}

if (IsAvxEnabledWindows() && cpu.has_avx() && FLAG_enable_avx && 
cpu.has_osxsave() &&
      OSHasAVXSupport()) {
    supported_ |= 1u << AVX;
  }

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to