]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Observe the memory fencing properties of CPUID.
authorJulian Seward <jseward@acm.org>
Sat, 8 Jan 2005 18:25:05 +0000 (18:25 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 8 Jan 2005 18:25:05 +0000 (18:25 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@702

VEX/priv/guest-x86/toIR.c

index ad4c5500761118f4bcd4dfb9626c32244b82356a..98cf4039f8fe823cd2ac70cb1f2e1a35dedd0672 100644 (file)
@@ -11535,6 +11535,9 @@ DisResult disInstr ( /*IN*/  Bool       resteerOK,
          d->fxState[3].size   = 4;
          /* execute the dirty call, side-effecting guest state */
          stmt( IRStmt_Dirty(d) );
+         /* CPUID is a serialising insn.  So, just in case someone is
+            using it as a memory fence ... */
+         stmt( IRStmt_MFence() );
          DIP("cpuid\n");
          break;
       }