]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Support "repe scas" on amd64. Fixes #168943.
authorJulian Seward <jseward@acm.org>
Sat, 8 Nov 2008 15:25:00 +0000 (15:25 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 8 Nov 2008 15:25:00 +0000 (15:25 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1872

VEX/priv/guest-amd64/toIR.c

index 68066c8c3e19bf43a08eb576ce2ce252356dda7e..cef973bb57ec0ae70197b467130377a3c34eeaa3 100644 (file)
@@ -14717,6 +14717,18 @@ DisResult disInstr_AMD64_WRK (
          dres.whatNext = Dis_StopHere;
          break;
       }
+      /* F3 AE/AF: repe scasb/repe scas{w,l,q} */
+      if (haveASO(pfx)) 
+         goto decode_failure;
+      if (!haveF2(pfx) && haveF3(pfx)) {
+         if (opc == 0xAE)
+            sz = 1;
+         dis_REP_op ( AMD64CondZ, dis_SCAS, sz, 
+                      guest_RIP_curr_instr,
+                      guest_RIP_bbstart+delta, "repe scas", pfx );
+         dres.whatNext = Dis_StopHere;
+         break;
+      }
       /* AE/AF: scasb/scas{w,l,q} */
       if (!haveF2(pfx) && !haveF3(pfx)) {
          if (opc == 0xAE)