1

我正在尝试使用 valgrind 分析我用英特尔 AVX2 指令编写的程序。程序在memcheck下运行流畅。但是当我使用 callgrind ( valgrind --tool=callgrind) 运行时,它会以无法识别的指令错误终止。我检查了Valgrind 3.9.0的发行说明Support for Intel AVX2 instructions. This is available only on 64 bit code.,它说。我编译我的程序,g++-4.8 -std=c++11 -mavx2 -m64但错误仍然存​​在。部分输出如下:

vex amd64->IR: unhandled instruction bytes: 0x16 0xC5 0xDD 0x64 0xD2 0xC5 0xF5 0xDB
vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=NONE
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
 ==6775== valgrind: Unrecognised instruction at address 0x43d1c9.
==6775==    at 0x43D1C9: byteslice::ByteSliceColumnBlock<16ul, (byteslice::Direction)1>::Scan(bytes
lice::Comparator, unsigned long, byteslice::BitVectorBlock*, byteslice::Bitwise) const (avxintrin.h
:965)
==6775==    by 0x45DEAD: byteslice::Column::Scan(byteslice::Comparator, unsigned long, byteslice::B
itVector*, byteslice::Bitwise) const (column.cpp:113)
==6775==    by 0x4017C9: main (simple.cpp:89)

编辑:我发现错误取决于优化级别。-O0 没有错误。但错误出现在 -O1 及以上。

4

0 回答 0