heyfluke / libyuv

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

vs2010 xgetbv not defined. #282

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
d:\src\webrtc\trunk\third_party\libyuv\source\cpu_id.cc(69) : error C3861: 
'_xgetbv': identifier not found

Original issue reported on code.google.com by fbarch...@google.com on 29 Oct 2013 at 11:32

GoogleCodeExporter commented 9 years ago
Fixed in r834.

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

GoogleCodeExporter commented 9 years ago
Attempting to build libvpx ran into this issue with the download as of 
8/14/2014. Resolved by changing 

#if defined(_MSC_VER) && (_MSC_FULL_VER >= 160040219)

to

#if defined(_MSC_VER) && (_MSC_FULL_VER > 160040219)

VS 2010 sp1 immintrin does NOT define _xgetbv!

Original comment by ch...@burfoots.com on 14 Aug 2014 at 4:52

GoogleCodeExporter commented 9 years ago
Only fixed this locally

Original comment by ch...@burfoots.com on 14 Aug 2014 at 4:54

GoogleCodeExporter commented 9 years ago
It works for me with vs2010sp1.  Investigating.
First thing I notice is the header ifdef's dont match the code ifdef.

This will only pull in the header needed for 64 bit:
#if !defined(__pnacl__) && !defined(__CLR_VER) && \
    !defined(__native_client__) && defined(_M_X64) && \
    defined(_MSC_VER) && (_MSC_FULL_VER >= 160040219)
#include <immintrin.h>  // For _xgetbv()
#endif

so this will do 32 bit
setlocal
set GYP_DEFINES=target_arch=ia32
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
call python build\gyp_chromium -fninja -G msvs_version=2010 --depth=. 
libyuv_test.gyp
will not include the header.

Original comment by fbarch...@google.com on 14 Aug 2014 at 6:53

GoogleCodeExporter commented 9 years ago
r1046 includes the intrinsics header for xgetbv in 32 bit mode.

Original comment by fbarch...@google.com on 15 Aug 2014 at 6:17