uname -a Linux edfdf05b67cf 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux SUMMARY vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0xC2 0xC8 0x8 0x2C 0x0 0x0 0x0 0x3 STEPS TO REPRODUCE 1. Try to use the instruction CMPPD with and imm8 greater or equal than 8, for example the following main.asm: global _start section .text _start: cmppd xmm1, xmm0, 0x8 2. nasm -f elf64 -g -F DWARF main.asm 3. ld -o main main.o 4. valgrind -v ./main OBSERVED RESULT vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0xC2 0xC8 0x8 0x2C 0x0 0x0 0x0 0x3 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=0F vex amd64->IR: PFX.66=1 PFX.F2=0 PFX.F3=0 EXPECTED RESULT No invalide instruction SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Ubuntu 20.04.2 LTS (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION valgrind version: 3.18.0.GIT
Created attachment 140556 [details] A patch that solves the bug I have been looking at the code that handles this instruction and it's seems like it is preventing any imm8 greater or equal than 8, but for processors with avx the instruction can handle those imm8. I think that this patch should solve it, please let me know if I'm missing something.