foolab / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Can't compile with VS2005. #283

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to compile r833 with Visual Studio 2005

What is the expected output? What do you see 
error C3861: '__cpuidex': identifier not found

What version of the product are you using? On what operating system?
Visual Studio 2005 (8.0.50727.867 (vsvista.050727-8600))

Please provide any additional information below.
The __cpuidex intrinsic doesn't exist prior to VS2010 SP1.
It doesn't look like the 'ecx' parameter of libyuv::CpuId is being used (it's 
set to 0 in the only two places which call it) so maybe we can use the normal 
__cpuid?

Original issue reported on code.google.com by connor.b...@nchsoftware.com on 30 Oct 2013 at 2:20

GoogleCodeExporter commented 9 years ago
Acknowledged.
The reason for the recent cpuid change is that it wasnt working on OSX, but did 
for Windows and Linux.  While Intel had a sample that did work.  Both use 
identical calls, but implementation details differ.
So I went with Intels method, which sets ecx to zero.  But the code has a 
number of problems.
in r834 i fixed up xgetbv

The cpuidex intinsic is used for 64 bit msvc compatibility.
But this is the one function in libyuv that used intrinsics, and it might be 
best to drop it.

Original comment by fbarch...@google.com on 31 Oct 2013 at 7:44

GoogleCodeExporter commented 9 years ago
Fixed in r835.
Thanks for the bug report!

Original comment by fbarch...@google.com on 31 Oct 2013 at 9:25

GoogleCodeExporter commented 9 years ago
Great.
Thanks for fixing it (so quickly)!

Original comment by connor.b...@nchsoftware.com on 31 Oct 2013 at 10:33