From: Julian Seward Date: Mon, 16 Dec 2002 00:10:30 +0000 (+0000) Subject: Fix bug in MOV Iv,Ev when Ev is a reg. Noticed by Magnus Christensson X-Git-Tag: svn/VALGRIND_1_9_4~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac6d39fddeae5f5501af036787e57ab199d1aa5f;p=thirdparty%2Fvalgrind.git Fix bug in MOV Iv,Ev when Ev is a reg. Noticed by Magnus Christensson . 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 --- diff --git a/coregrind/vg_to_ucode.c b/coregrind/vg_to_ucode.c index b60f8aaf6e..66ed490673 100644 --- a/coregrind/vg_to_ucode.c +++ b/coregrind/vg_to_ucode.c @@ -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);