Bug 253436

Summary: vex amd64->IR: unhandled instruction bytes: 0xF2 0xA6 (repne cmps)
Product: [Developer tools] valgrind Reporter: Vince Weaver <vince>
Component: vexAssignee: Paul Floyd <pjfloyd>
Status: RESOLVED FIXED    
Severity: normal CC: itislu.git, jacobly.alt, pjfloyd, researchlover44
Priority: NOR    
Version First Reported In: 3.6 SVN   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 253451    
Attachments: Added missing cmps variants to VEX amd64.
Uncomment tests for cmps variants for VEX amd64.

Description Vince Weaver 2010-10-06 23:26:23 UTC
Version:           3.6 SVN
OS:                Linux

The "repne cmps" string instruction is not supported on amd64

Reproducible: Didn't try
Comment 1 jacobly.alt 2020-01-10 17:53:37 UTC
Created attachment 125021 [details]
Added missing cmps variants to VEX amd64.

I was trying to run valgrind on some assembly code and it also chokes on a plain old cmps.  I implemented both in the attached patch.
Comment 2 Paul Floyd 2021-11-22 11:12:12 UTC
Do you have a testcase for this?
Comment 3 researchlover44 2026-01-19 21:48:22 UTC
(In reply to Paul Floyd from comment #2)
> Do you have a testcase for this?

Hi!
Can you point me to where I could provide this testcase?
BR
Comment 4 Paul Floyd 2026-01-20 09:37:47 UTC
Ideally just attach a small testcase here.
Comment 5 Lukas Dullinger 2026-01-20 19:07:44 UTC
Created attachment 188721 [details]
Uncomment tests for cmps variants for VEX amd64.

The test cases already existed, they were just commented out.
When applying this patch, valgrind reports illegal instructions when running the compiled test-amd64.c.
With the patch from attachment 125021 [details] applied, it does not report any issues anymore.
Comment 6 Paul Floyd 2026-01-22 06:03:11 UTC
!

I should have done a git rep before asking.
Comment 7 Paul Floyd 2026-01-24 10:01:57 UTC
Thanks for the contributions!

commit 1f5118fffdfbfb40405b8493ad6e8fee343c5759 (HEAD -> master, origin/users/paulf/try-bug253436, origin/master, origin/HEAD, bug253436)
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date:   Sat Jan 24 08:20:29 2026 +0100

    Bug 253436 - vex amd64->IR: unhandled instruction bytes: 0xF2 0xA6 (repne cmps)
    
    Patch submitted by jacobly.alt@gmail.com
    Regtest update submitted by Lukas Dullinger <itislu.git@gmail.com>