<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>212353</bug_id>
          
          <creation_ts>2009-10-30 05:13:08 +0000</creation_ts>
          <short_desc>vex amd64-&gt;IR: unhandled instruction bytes: 0x48 0xE9 (REX.W JMP)</short_desc>
          <delta_ts>2010-11-11 19:51:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Developer tools</classification>
          <product>valgrind</product>
          <component>vex</component>
          <version>3.5.0</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>253451</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Mark Harris">mark.hsj</reporter>
          <assigned_to name="Julian Seward">jseward</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>852794</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Harris">mark.hsj</who>
    <bug_when>2009-10-30 05:13:08 +0000</bug_when>
    <thetext>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-&gt;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);</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>