]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 328100 - XABORT not implemented.
authorMark Wielaard <mark@klomp.org>
Mon, 9 Dec 2013 12:54:06 +0000 (12:54 +0000)
committerMark Wielaard <mark@klomp.org>
Mon, 9 Dec 2013 12:54:06 +0000 (12:54 +0000)
XABORT can be called even when there is no current transaction.
In such a case XABORT acts as a NOP. Implement xabort as nop.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2800

VEX/priv/guest_amd64_toIR.c

index a17c8f4b0c05d4b8e5e80894ce68ec15b9bac2aa..f54554aa278ab5be54f7fee2ce926efdc773f08d 100644 (file)
@@ -20251,7 +20251,7 @@ Long dis_ESC_NONE (
          return delta;
       }
       /* BEGIN HACKY SUPPORT FOR xbegin */
-      if (modrm == 0xF8 && !have66orF2orF3(pfx) && sz == 4
+      if (opc == 0xC7 && modrm == 0xF8 && !have66orF2orF3(pfx) && sz == 4
           && (archinfo->hwcaps & VEX_HWCAPS_AMD64_AVX)) {
          delta++; /* mod/rm byte */
          d64 = getSDisp(4,delta); 
@@ -20270,6 +20270,16 @@ Long dis_ESC_NONE (
          return delta;
       }
       /* END HACKY SUPPORT FOR xbegin */
+      /* BEGIN HACKY SUPPORT FOR xabort */
+      if (opc == 0xC6 && modrm == 0xF8 && !have66orF2orF3(pfx) && sz == 1
+          && (archinfo->hwcaps & VEX_HWCAPS_AMD64_AVX)) {
+         delta++; /* mod/rm byte */
+         abyte = getUChar(delta); delta++;
+         /* There is never a real transaction in progress, so do nothing. */
+         DIP("xabort $%d", (Int)abyte);
+         return delta;
+      }
+      /* END HACKY SUPPORT FOR xabort */
       goto decode_failure;
 
    case 0xC8: /* ENTER */