[cfe-dev] Clang and SSE4 error: “SSE4A instruction set not enabled”
Reid Kleckner
rnk at google.com
Sat Jun 22 03:59:16 PDT 2013
Compiling C++ with clang and the Visual C++ headers doesn't work yet.
intin.h is one of the blockers. It's prototypes conflict with clang's.
I've been working around it for now with a modified intrin.h that comes
first on the include path.
Also, if you wish to link against the Visual C++ runtime, you'll need to
use '-Xclang -cxx-abi -Xclang microsoft'. Again, most things don't work.
On Fri, Jun 21, 2013 at 11:59 PM, Kim <soldoutseashell at gmail.com> wrote:
> I'm attempting to compile some code using VC11 built Clang but I get the
> result below. Preferably I would like to enable SSE4 (though I really just
> want my code to compile at all without errors) but none of the arguments
> I've tried have changed the error result. The code is nothing special, just
> an exported function and includes for map and vector. Thanks a lot in
> advance for any assistance.
>
> C:\Program Files (x86)\LLVM\vs11\bin\Debug>clang++ -march=corei7 -mavx -mpclmul -msse4 -std=c++11 -c -**fms-compatibility -fms-extensions -v -o simple.o simple.cpp
> clang version 3.4 (trunk)Target: i686-pc-win32Thread model: posix
> "C:/Program Files (x86)/LLVM/vs11/bin/Debug/clang++.exe" -cc1 -triple i686-pc-win32 -emit-obj -mrelax-all -disable-free -main-file-name simple.cpp -mrelocation-****model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu corei7 -target-feature +avx -target-featur
> e +pclmul -target-feature +sse4 -v -coverage-file simple.o -resource-dir "C:/Program Files (x86)/LLVM/vs11/bin/Debug\\..\\lib\\clang\\3.4" -internal-isystem "C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include" -internal**-isystem "C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\include" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\8.0\\\\include" -std=c++11 -fdeprecated-macro -ferror-limit 19 -fmessage-length **150 -mstackrealign -fms-extensions -fms-compatibility -fmsc-version=1300 -fdelayed-template-parsing -fobjc-runtime=gcc -fobjc-default!
> -synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o simple.o -x c!
> ++ simple.cpp
> clang -cc1 version 3.4 based upon LLVM 3.4svn default target i686-pc-win32#include "..." search starts here:#include <...> search starts here:
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include
> C:\Program Files (x86)\Windows Kits\8.0\\includeEnd of search list.In file included from simple.cpp:2:In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector:6:In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory:6:In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory0:942:In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:27:
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\ammintrin.h:28:2: error: "SSE4A instruction set not enabled"**#error "SSE4A instruction set not enabled"
> ^In file included from simple.cpp:2:In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector:6:In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory:6:In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory0:942:
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:527:20: error: expected unqualified-id
> __MACHINEX86(__m64 _m_pshufw(__m64, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\xmmintrin.h:986:19: note: expanded from macro '_m_pshufw'#define _m_pshufw _mm_shuffle_pi16
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\xmmintrin.h:749:32: note: expanded from macro '_mm_shuffle_pi16'!
> #define _mm_shuffle_pi16(a, n) __extension__ ({ \
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:582:26: error: expected unqualified-id
> __MACHINEX86_X64(__m128i _mm_alignr_epi8(__m128i, __m128i, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\tmmintrin.h:69:34: note: expanded from macro '_mm_alignr_epi8'**#define _mm_alignr_epi8(a, b, n) __extension__ ({ \
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:583:24: error: expected unqualified-id
> __MACHINEX86_X64(__m64 _mm_alignr_pi8(__m64, __m64, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\tmmintrin.h:74:33: note: expanded from macro '_mm_alignr_pi8'**#define _mm_alignr_pi8(a, b, n) __extension__ ({ \
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:592:26: error: expected unqualified-id
> __MACHINEX86_X64(__m128i _mm_blend_epi16(__m128i, __m128i, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:110:36: note: expanded from macro '_mm_blend_epi16'**#define _mm_blend_epi16(V1, V2, M) __extension__ ({ \
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:593:26: error: expected unqualified-id
> __MACHINEX86_X64(__m128d _mm_blend_pd(__m128d, __m128d, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:79:33: note: expanded from macro '_mm_blend_pd'**#define _mm_blend_pd(V1, V2, M) __extension__ ({ \
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:594:25: error: expected unqualified-id
> __MACHINEX86_X64(__m128 _mm_blend_ps(__m128, __m128, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:84:33: note: expanded from macro '_mm_blend_ps'**#define _mm_blend_ps(V1, V2, M) __extension__ ({ \
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:607:22: error: redefinition of '__builtin_ia32_pcmpestria128' as different
> kind of symbol
> __MACHINEX86_X64(int _mm_cmpestra(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:416:6: note: expanded from macro '_mm_cmpestra'**
> __builtin_ia32_pcmpestria128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:607:22: note: previous definition is here
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:416:6: note: expanded from macro '_mm_cmpestra'**
> __builtin_ia32_pcmpestria128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:607:22: error: expected expression
> __MACHINEX86_X64(int _mm_cmpestra(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:416:38: note: expanded from macro '_mm_cmpestra'**
> __builtin_ia32_pcmpestria128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:608:22: error: redefinition of '__builtin_ia32_pcmpestric128' as different
> kind of symbol
> __MACHINEX86_X64(int _mm_cmpestrc(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:418:6: note: expanded from macro '_mm_cmpestrc'**
> __builtin_ia32_pcmpestric128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:608:22: note: previous definition is here
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:418:6: note: expanded from macro '_mm_cmpestrc'**
> __builtin_ia32_pcmpestric128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:608:22: error: expected expression
> __MACHINEX86_X64(int _mm_cmpestrc(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:418:38: note: expanded from macro '_mm_cmpestrc'**
> __builtin_ia32_pcmpestric128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:609:22: error: redefinition of '__builtin_ia32_pcmpestri128' as different kind
> of symbol
> __MACHINEX86_X64(int _mm_cmpestri(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:401:6: note: expanded from macro '_mm_cmpestri'**
> __builtin_ia32_pcmpestri128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:609:22: note: previous definition is here
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:401:6: note: expanded from macro '_mm_cmpestri'**
> __builtin_ia32_pcmpestri128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:609:22: error: expected expression
> __MACHINEX86_X64(int _mm_cmpestri(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:401:37: note: expanded from macro '_mm_cmpestri'**
> __builtin_ia32_pcmpestri128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:610:26: error: redefinition of '__builtin_ia32_pcmpestrm128' as different kind
> of symbol
> __MACHINEX86_X64(__m128i _mm_cmpestrm(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:399:6: note: expanded from macro '_mm_cmpestrm'**
> __builtin_ia32_pcmpestrm128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:610:26: note: previous definition is here
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:399:6: note: expanded from macro '_mm_cmpestrm'**
> __builtin_ia32_pcmpestrm128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:610:26: error: expected expression
> __MACHINEX86_X64(__m128i _mm_cmpestrm(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:399:37: note: expanded from macro '_mm_cmpestrm'**
> __builtin_ia32_pcmpestrm128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:611:22: error: redefinition of '__builtin_ia32_pcmpestrio128' as different
> kind of symbol
> __MACHINEX86_X64(int _mm_cmpestro(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:420:6: note: expanded from macro '_mm_cmpestro'**
> __builtin_ia32_pcmpestrio128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:611:22: note: previous definition is here
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:420:6: note: expanded from macro '_mm_cmpestro'**
> __builtin_ia32_pcmpestrio128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:611:22: error: expected expression
> __MACHINEX86_X64(int _mm_cmpestro(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:420:38: note: expanded from macro '_mm_cmpestro'**
> __builtin_ia32_pcmpestrio128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:612:22: error: redefinition of '__builtin_ia32_pcmpestris128' as different
> kind of symbol
> __MACHINEX86_X64(int _mm_cmpestrs(__m128i, int, __m128i, int, int))
> ^
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:422:6: note: expanded from macro '_mm_cmpestrs'**
> __builtin_ia32_pcmpestris128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:612:22: note: previous definition is here
> C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:422:6: note: expanded from macro '_mm_cmpestrs'**
> __builtin_ia32_pcmpestris128((A), (LA), (B), (LB), (M))
> ^
> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'#define __MACHINE(X) X;
> ^
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130622/04b7a8b1/attachment.html>
More information about the cfe-dev
mailing list