Bug ID 901949
Summary Valgrind does not support recent Intel instructions
Classification openSUSE
Product openSUSE 13.1
Version Final
Hardware x86-64
OS openSUSE 13.1
Status NEW
Severity Normal
Priority P5 - None
Component Development
Assignee bnc-team-screening@forge.provo.novell.com
Reporter mjr19@cam.ac.uk
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

Valgrind does not support the new Haswell instructions. Valgrind is 3.8.1, and
3.9.0 (October 2013) added support for the AVX2 instruction set, as found in
Intel's Haswell (released June 2013). OpenSuSE 13.1 (released November 2013)
might be expected to support this.

pc71:/tmp> cat test.c 
#include "immintrin.h"
#include <stdio.h>

int main(){
  unsigned int value=1234;
  unsigned char c;

  c=_pext_u32(value, 0x11111111);

  printf("%d\n",(int)c);
}
pc71:/tmp> g++ -mbmi2 test.c
pc71:/tmp> ./a.out 
2
pc71:/tmp> valgrind ./a.out
[...]
vex amd64->IR: unhandled instruction bytes: 0xC4 0xE2 0x7A 0xF5 0xC2 0x88 0x45
0xFB
vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=1 VEX.L=0 VEX.nVVVV=0x0 ESC=0F38
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=1
[...]
==23452== valgrind: Unrecognised instruction at address 0x400642.
==23452==    at 0x400642: main (in /tmp/a.out)
==23452== Your program just tried to execute an instruction that Valgrind
==23452== did not recognise.

Of course, the above test make sense only when run on a Haswell.

Given that 13.1 is an evergreen release, Valgrind probably ought to support
fully Intel CPUs released in 2013.

Intel's MKL uses some AVX2 instructions unrecognised by the shipped version of
Valgrind.


You are receiving this mail because: