[vlc-devel] commit: Win32: use IsProcessorFeaturePresent() to detect available instructions (Geoffroy Couprie )
Rémi Denis-Courmont
remi at remlab.net
Sun Jan 17 10:39:19 CET 2010
Le samedi 16 janvier 2010 19:51:14 Geoffroy Couprie, vous avez écrit :
> SSE4.1 and SSE.42 are not recognized by IsProcessorFeaturePresent, but
> there's some code at
> http://software.intel.com/en-us/articles/using-cpuid-to-detect-the-presence
> -of-sse-41-and-sse-42-instruction-sets/ that we can use.
*Ahem* that's what the code did right before you committed this change...
Namely check_OS_capability() always suceeds on Windows.
> I would rather add code using cpuid than forking and testing for a SIGILL
> on Windows.
We can't fork. We could execute a dummy executable instead. But I don't know
if we can get the exit reason of a child process on Windows, like waitpid()
does.
But what's the risk that CPUID would be wrong? If I understand right, VLC
checked CPU features with SIGILL because some very very old operating systems
did not handle certain features of some very old processors. I assume this
only ever has been a problem with MMX and SSE if at all.
> Any thoughts?
To me this raises the question the other way. Why do we run CPUID for SSE<4
features if we can check them from the OS.
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list