| Summary: | vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0x3A 0x62 0x4A 0x10 0x10 0x48 0x83 0xC2 (PCMPxSTRx $0x10) | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Wayne Arnold <wayne.arnold> |
| Component: | vex | Assignee: | Julian Seward <jseward> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ivosh |
| Priority: | NOR | ||
| Version First Reported In: | 3.13 SVN | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | unit test from rapidjson that uses sse4.2 | ||
|
Description
Wayne Arnold
2016-11-07 16:27:41 UTC
sorry, real instance, there are a number when disassembled 1485a0: 66 0f 3a 62 4a 10 10 pcmpistrm $0x10,0x10(%rdx),%xmm1 1485a7: 48 83 c2 10 add $0x10,%rdx 1485ab: 66 0f 7e c0 movd %xmm0,%eax 148a20: 66 0f 3a 62 49 10 10 pcmpistrm $0x10,0x10(%rcx),%xmm1 148a27: 48 83 c1 10 add $0x10,%rcx 148a2b: 66 0f 7e c0 movd %xmm0,%eax 148a2f: 85 c0 test %eax,%eax Created attachment 104388 [details]
unit test from rapidjson that uses sse4.2
unit test from rapidjson that fails with illegal instruction for pcmpistri when using MEM for arg2
SSE 4.2 adds four string text processing instructions PCMPISTRI, PCMPISTRM, PCMPESTRI and PCMPESTRM. These instructions take three parameters, arg1 an xmm register, arg2 an xmm or a 128-bit memory location and IMM8 an 8-bit immediate control byte the current valgrind code implements the 1st case xmm register for both arg1 and arg2 is it possible to add the 2nd case of arg2 being being a memory location the unit test is from: https://github.com/miloyip/rapidjson any suggestions on how to add in the MEM option. are there other instructions that can be used as a guide ? Wayne, I don't think there are any specific instructions of how to add support for new instructions into Valgrind. You need to work by analogy and do a very little investigation. Pick an instruction already supported by Valgrind which does very similar thing as pcmpistrm. Have a look how it is supported in VEX subsystem (guest_amd64_*, host_amd64_*) and also provide a test case for it, possibly under none/tests/amd64 directory. Fixed, vex r3366, valgrind r16367. thank you. I was able to run this updated version on our code. |