From: Julian Seward Date: Sat, 8 Jan 2005 18:25:05 +0000 (+0000) Subject: Observe the memory fencing properties of CPUID. X-Git-Tag: svn/VALGRIND_3_0_1^2~632 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd57f1a169ead3bee1931ff864c19bacd8b46695;p=thirdparty%2Fvalgrind.git Observe the memory fencing properties of CPUID. git-svn-id: svn://svn.valgrind.org/vex/trunk@702 --- diff --git a/VEX/priv/guest-x86/toIR.c b/VEX/priv/guest-x86/toIR.c index ad4c550076..98cf4039f8 100644 --- a/VEX/priv/guest-x86/toIR.c +++ b/VEX/priv/guest-x86/toIR.c @@ -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; }