c++ - Assemble Error for AVX2 -


i've tried compile avx2 program gcc(g++). didn't work right.

#include<immintrin.h> .... __m256i _vector256  = _mm256_loadu_si256((__m256i*)pin); __m256i _vectormask = _mm256_loadu_si256((__m256i*)mask_hbits);  _vector256 = _mm256_slli_epi32 (_vector256, avx_logdesc); // avx_logdesc == 4 __m256i _vectorres = _mm256_and_si256(_vector256, _vectormask); .... 

my compile command (as 1 line in makefile):

g++ avx_shift.cpp -c -mavx2 

i tried one:

g++ avx_shift.cpp -c -march=native 

but error messages same:

/tmp/ccsfs6u0.s: assembler messages: /tmp/ccsfs6u0.s:1083: error: suffix or operands invalid `vpslld' /tmp/ccsfs6u0.s:1091: error: suffix or operands invalid `vpand' .... 

the assembly code (added line number):

vmovdqa 988(%rsp), %ymm0    # __a, d.48219 movl    984(%rsp), %eax # __b, tmp205 movl    %eax, -120(%rsp)    # tmp205, %sfp vmovd   -120(%rsp), %xmm6   # %sfp, tmp205 vpslld  %xmm6, %ymm0, %ymm0 # tmp205, d.48219, d.48220      // 1083 .... vmovdqa 668(%rsp), %ymm0    # __b, tmp220 vmovdqa 700(%rsp), %ymm1    # __a, tmp221 vpand   %ymm0, %ymm1, %ymm0 # tmp220, tmp221, d.48215       // 1091 .... 

my gcc(g++) version 4.8.0. os version centos6.5 x86_64. i've confirmed cpu supports avx2 instructions. can me find errors?

the 2 source lines pasted shouldn't, , on machine don't, generate vpslld or vpand instructions. use -s -g -fverbose-asm switches ask assembly source , try find matching source lines.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -