Bug 404272 - vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0x38 0x23 0xC0 0xF3 (PMOVSXWD)
Summary: vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0x38 0x23 0xC0 0xF3 (PMO...
Status: RESOLVED NOT A BUG
Alias: None
Product: valgrind
Classification: Developer tools
Component: vex (show other bugs)
Version: 3.15 SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-13 00:52 UTC by Patrick J. LoPresti
Modified: 2019-03-13 16:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick J. LoPresti 2019-02-13 00:52:34 UTC
Application compiled with Intel Compiler 18.1 generates calls to "_intel_fast_memcpy" which triggers this assertion failure in Valgrind.

Valgrind log:

--00:00:02:34.797 2713-- REDIR: 0x9feac80 (_intel_fast_memcpy) redirected to 0xb774be0 (_intel_fast_memcpy)
vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0x38 0x23 0xC0 0xF3
Comment 1 Julian Seward 2019-03-10 09:57:47 UTC
Wierd.  I wonder why we don't support this, given that support for
AVX2 is generally available in V.
Comment 2 Patrick J. LoPresti 2019-03-11 03:09:14 UTC
Should I try to put together a test case?
Comment 3 Julian Seward 2019-03-12 18:37:01 UTC
(In reply to Patrick J. LoPresti from comment #2)
> Should I try to put together a test case?

Yes, please.  I have had a look around and I am mystified.  PMOVSXWD
appears to be both implemented and tested
(in none/tests/amd64/{sse4-64.c, avx-1.c})
so I'm not sure why it's failing for you.  Or more specifically, which
of the innumerable variants of it might be failing.
Comment 4 Julian Seward 2019-03-12 18:38:07 UTC
I would add: given that you have failing bytes 0x66 0xF 0x38 0x23,
this is an SSE4 variant, not an AVX variant -- since there's no 
C2/C3 (VEX) prefix present.
Comment 5 Julian Seward 2019-03-13 07:48:03 UTC
I made a test case using the failing bytes you sent, as below, and
it runs ok with the trunk.

int main ( void )
{
   // 66 0f 38 23 c0          pmovsxwd %xmm0,%xmm0
   __asm__ __volatile__(".byte 0x66, 0xF, 0x38, 0x23, 0xC0"
                        :::"cc","memory");
   return 0;
}
Comment 6 Patrick J. LoPresti 2019-03-13 16:41:16 UTC
I am so sorry, Julian. Although I compiled Valgrind from trunk, one of my coworkers did not follow my instructions to use it and did not tell me this when he reported the failure.

I should have looked at the header in the log file more carefully.

I apologize again for wasting your time.
Comment 7 Julian Seward 2019-03-13 16:58:20 UTC
(In reply to Patrick J. LoPresti from comment #6)
It's no problem!  I am just happy that I can cross this off my
list of stuff-to-be-fixed.  If only all bugs were this easy to fix!