|
From: <sv...@va...> - 2008-04-18 07:18:05
|
Author: sewardj
Date: 2008-04-18 08:18:08 +0100 (Fri, 18 Apr 2008)
New Revision: 7885
Log:
Fill in a few missing pieces needed to handle Wine on x86.
Modified:
branches/OTRACK_BY_INSTRUMENTATION/memcheck/mc_machine.c
Modified: branches/OTRACK_BY_INSTRUMENTATION/memcheck/mc_machine.c
===================================================================
--- branches/OTRACK_BY_INSTRUMENTATION/memcheck/mc_machine.c 2008-04-16 18:49:11 UTC (rev 7884)
+++ branches/OTRACK_BY_INSTRUMENTATION/memcheck/mc_machine.c 2008-04-18 07:18:08 UTC (rev 7885)
@@ -569,10 +569,10 @@
of those are tracked. */
tl_assert(SZB(CC_OP) == 4);
tl_assert(SZB(CC_NDEP) == 4);
+ tl_assert(SZB(DFLAG) == 4);
tl_assert(SZB(IDFLAG) == 4);
- tl_assert(SZB(ACFLAG) == 4);
if (o == 1+ GOF(EAX) && szB == 1) return GOF(CC_OP);
- //if (o == 1+ GOF(EBX) && szB == 1) return GOF(CC_NDEP);
+ if (o == 1+ GOF(EBX) && szB == 1) return GOF(CC_NDEP);
if (o == 1+ GOF(ECX) && szB == 1) return GOF(DFLAG);
if (o == 1+ GOF(EDX) && szB == 1) return GOF(IDFLAG);
@@ -613,8 +613,17 @@
if (o >= GOF(FPREG[7])
&& o+sz <= GOF(FPREG[7])+SZB(FPREG[7])) return GOF(FPREG[7]);
- /* skip %gs and other segment related stuff */
+ /* skip %GS and other segment related stuff. We could shadow
+ guest_LDT and guest_GDT, although it seems pointless.
+ guest_CS .. guest_SS are too small to shadow directly and it
+ also seems pointless to shadow them indirectly (that is, in
+ the style of %AH .. %DH). */
+ if (o == GOF(CS) && sz == 2) return -1;
+ if (o == GOF(DS) && sz == 2) return -1;
+ if (o == GOF(ES) && sz == 2) return -1;
+ if (o == GOF(FS) && sz == 2) return -1;
if (o == GOF(GS) && sz == 2) return -1;
+ if (o == GOF(SS) && sz == 2) return -1;
if (o == GOF(LDT) && sz == 4) return -1;
if (o == GOF(GDT) && sz == 4) return -1;
|