| Summary: | Unhandled loopnel insn on amd64 | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Jakub Jelinek <jakub> |
| Component: | vex | Assignee: | Julian Seward <jseward> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 3.6.0 | ||
| Target Milestone: | --- | ||
| Platform: | Unlisted Binaries | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Bug Depends on: | |||
| Bug Blocks: | 253451 | ||
| Attachments: | valgrind-3.6.0-amd64-loopnel.patch | ||
JJ, thanks for the patch. One question: what is the use case for LOOPNEL ? Where did you see it? It was reported to us that some customer's application was using that instruction and valgrind was upset on it. As the insn is valid, I think it makes sense supporting it in valgrind eventhough it isn't widely used. Hmm, are you sure the patch is correct? With 0x67 you do a 32-bit dec (iow, ecx), fine, but the "jump if count != 0" check is still on the 64-bit value. Doesn't the 32-bit dec (iow, ecx) automatically zero-extend (as is normal on x86-64 architecture and really needed for the insn too)? The testcase certainly tests that with 0x200000005UL initial %rcx value the loop iterates just 5 times and the final value of rcx is 0 and rax has been incremented exactly 5 times. Committed with extra comments, r2085/11507. Thanks for the patch. |
Created attachment 53356 [details] valgrind-3.6.0-amd64-loopnel.patch Version: 3.6.0 (using Devel) OS: Linux See attached patch, loopnel insn is not handled. Reproducible: Always