]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix bug in MOV Iv,Ev when Ev is a reg. Noticed by Magnus Christensson
authorJulian Seward <jseward@acm.org>
Mon, 16 Dec 2002 00:10:30 +0000 (00:10 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 16 Dec 2002 00:10:30 +0000 (00:10 +0000)
<mch@virtutech.se>.  The bug lasted this long because there is an
alternative shorter encoding for the same insn which is usually used
in preference.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1384

coregrind/vg_to_ucode.c

index b60f8aaf6eae07b4267f3fd4c1d13236b39dda6e..66ed490673a7e588c8e4b565eb8653996dc5c9cf 100644 (file)
@@ -3697,6 +3697,7 @@ static Addr disInstr ( UCodeBlock* cb, Addr eip, Bool* isEnd )
    do_Mov_I_E:
       modrm = getUChar(eip);
       if (epartIsReg(modrm)) {
+         eip++; /* mod/rm byte */
          d32 = getUDisp(sz,eip); eip += sz;
          t1 = newTemp(cb);
          uInstr2(cb, MOV, sz, Literal, 0,  TempReg, t1);