Bug 212353 - vex amd64->IR: unhandled instruction bytes: 0x48 0xE9 (REX.W JMP)
Summary: vex amd64->IR: unhandled instruction bytes: 0x48 0xE9 (REX.W JMP)
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: vex (show other bugs)
Version: 3.5.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks: 253451
  Show dependency treegraph
 
Reported: 2009-10-30 05:13 UTC by Mark Harris
Modified: 2010-11-11 19:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Harris 2009-10-30 05:13:08 UTC
Attempting to use valgrind on a VHDL simulation compiled to x86_64 code on
RHEL 4, I encountered the following message from valgrind:

vex amd64->IR: unhandled instruction bytes: 0x48 0xE9 0x2A 0x7 0x0 0x0
==29986== valgrind: Unrecognised instruction at address 0x686a004.

The instruction is REX.W JMP rel32off.  VEX does not like the redundant
REX.W prefix.

I was able to correct the problem by adding the following line to
VEX/priv/guest_amd64_toIR.c:

--- guest_amd64_toIR.c.orig     2009-08-19 06:37:52.000000000 -0700
+++ guest_amd64_toIR.c  2009-10-29 20:20:58.106941000 -0700
@@ -13941,6 +13941,7 @@

    case 0xE9: /* Jv (jump, 16/32 offset) */
       if (haveF2orF3(pfx)) goto decode_failure;
+      if (sz == 8) sz = 4;
       if (sz != 4)
          goto decode_failure; /* JRS added 2004 July 11 */
       d64 = (guest_RIP_bbstart+delta+sz) + getSDisp(sz,delta);