|
From: Nicholas N. <nj...@ca...> - 2003-12-02 15:26:22
|
CVS commit by nethercote:
Patch from Tom Hughes:
This patch extends the SFENCE support that is already present to include
support for LFENCE and MFENCE as well. It also stops CLFLUSH being mistaken
for SFENCE by checking the top two bits of the MODRM byte.
MERGE TO HEAD
M +5 -3 vg_to_ucode.c 1.87.2.13
--- valgrind/coregrind/vg_to_ucode.c #1.87.2.12:1.87.2.13
@@ -3791,7 +3791,9 @@ static Addr disInstr ( UCodeBlock* cb, A
}
- /* SFENCE -- flush all pending store operations to memory */
+ /* LFENCE/MFENCE/SFENCE -- flush pending operations to memory */
if (insn[0] == 0x0F && insn[1] == 0xAE
- && (gregOfRM(insn[2]) == 7)) {
+ && (epartIsReg(insn[2]))
+ && (gregOfRM(insn[2]) >= 5 && gregOfRM(insn[2]) <= 7))
+ {
vg_assert(sz == 4);
eip += 3;
|