diff options
author | Josh Blum | 2011-11-14 09:48:20 -0800 |
---|---|---|
committer | Josh Blum | 2011-11-30 21:33:57 -0500 |
commit | 6bf88fd950a9606d41d611ace8368f319a4b06e0 (patch) | |
tree | 44cf7c080a5cc16a4d4b0bb981e206a40cfac5fc /volk/gen | |
parent | c2bf4895ca65c9c3f7efaf24c64bc8dae5716830 (diff) | |
download | gnuradio-6bf88fd950a9606d41d611ace8368f319a4b06e0.tar.gz gnuradio-6bf88fd950a9606d41d611ace8368f319a4b06e0.tar.bz2 gnuradio-6bf88fd950a9606d41d611ace8368f319a4b06e0.zip |
volk: avx support for MSVC
Diffstat (limited to 'volk/gen')
-rw-r--r-- | volk/gen/compilers.xml | 14 | ||||
-rw-r--r-- | volk/gen/machines.xml | 8 | ||||
-rw-r--r-- | volk/gen/make_cpuid_c.py | 2 |
3 files changed, 20 insertions, 4 deletions
diff --git a/volk/gen/compilers.xml b/volk/gen/compilers.xml index 70c82e555..005eda2aa 100644 --- a/volk/gen/compilers.xml +++ b/volk/gen/compilers.xml @@ -2,9 +2,21 @@ <grammar> <compiler name="MSVC"> + <!-- remap the following flags to SSE --> <remap name="mmmx">arch:SSE</remap> <remap name="msse">arch:SSE</remap> + + <!-- remap the following flags to SSE2 --> <remap name="msse2">arch:SSE2</remap> + + <!-- remap the following flags to AVX --> + <remap name="msse3">arch:AVX</remap> + <remap name="mssse3">arch:AVX</remap> + <remap name="msse4.1">arch:AVX</remap> + <remap name="msse4.2">arch:AVX</remap> + <remap name="mpopcnt">arch:AVX</remap> + <remap name="mavx">arch:AVX</remap> + <prefix>/</prefix> </compiler> @@ -15,4 +27,4 @@ -</grammar>
\ No newline at end of file +</grammar> diff --git a/volk/gen/machines.xml b/volk/gen/machines.xml index b872b9fb1..9c19c91c6 100644 --- a/volk/gen/machines.xml +++ b/volk/gen/machines.xml @@ -15,9 +15,9 @@ --> <!-- -Create an SSE2 only machine (without 64/32 inline assembly support). +Create an SSE2 and AVX only machine (without 64/32 inline assembly support). This machine is intended to support the MSVC compiler on x86/amd64. -The MSVC compiler has intrinsic support for SSE and SSE2, +The MSVC compiler has intrinsic support for SSE, SSE2, AVX however it does not support the gcc style inline assembly. --> @@ -57,6 +57,10 @@ however it does not support the gcc style inline assembly. <archs>generic 32|64 mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 popcount avx</archs> </machine> +<machine name="avx_only"> +<archs>generic mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 popcount avx</archs> +</machine> + <machine name="altivec"> <archs>generic altivec</archs> </machine> diff --git a/volk/gen/make_cpuid_c.py b/volk/gen/make_cpuid_c.py index 7281f45a3..2be1123a8 100644 --- a/volk/gen/make_cpuid_c.py +++ b/volk/gen/make_cpuid_c.py @@ -39,7 +39,7 @@ struct VOLK_CPU volk_cpu; //implement get cpuid for gcc compilers using a copy of cpuid.h #if defined(__GNUC__) #include <gcc_x86_cpuid.h> -#define cpuid_x86(op, r) __get_cpuid(op, r+0, r+1, r+2, r+3) +#define cpuid_x86(op, r) __get_cpuid(op, (unsigned int *)r+0, (unsigned int *)r+1, (unsigned int *)r+2, (unsigned int *)r+3) //implement get cpuid for MSVC compilers using __cpuid intrinsic #elif defined(_MSC_VER) |