|
From: <sv...@va...> - 2005-09-24 21:05:33
|
Author: njn
Date: 2005-09-24 22:05:29 +0100 (Sat, 24 Sep 2005)
New Revision: 4752
Log:
Backport a commit from the trunk.
Modified:
branches/ASPACEM/cachegrind/cg_main.c
Modified: branches/ASPACEM/cachegrind/cg_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/ASPACEM/cachegrind/cg_main.c 2005-09-24 19:42:41 UTC (rev 47=
51)
+++ branches/ASPACEM/cachegrind/cg_main.c 2005-09-24 21:05:29 UTC (rev 47=
52)
@@ -578,12 +578,6 @@
if (storeAddrExpr)=20
tl_assert(wordTy =3D=3D typeOfIRExpr(bbOut->tyenv, storeAddrExpr))=
;
=20
-
- // Nb: instrLen will be zero if Vex failed to decode it.
- tl_assert( 0 =3D=3D instrLen ||
- (instrLen >=3D VG_MIN_INSTR_SZB &&=20
- instrLen <=3D VG_MAX_INSTR_SZB) );
-
// Large (eg. 28B, 108B, 512B on x86) data-sized instructions will be
// done inaccurately, but they're very rare and this avoids errors fr=
om
// hitting more than two cache lines in the simulation.
@@ -705,6 +699,14 @@
tl_assert(!addedInstrumentation);
addedInstrumentation =3D True;
=20
+ // Nb: instrLen will be zero if Vex failed to decode it.
+ // Also Client requests can appear to be very large (eg. 18
+ // bytes on x86) because they are really multiple instructio=
ns.
+ tl_assert( 0 =3D=3D instrLen ||
+ bbIn->jumpkind =3D=3D Ijk_ClientReq ||
+ (instrLen >=3D VG_MIN_INSTR_SZB &&=20
+ instrLen <=3D VG_MAX_INSTR_SZB) );
+
// Add instrumentation before this statement.
instrumentInstr(bbOut, &bbInfo->instrs[ bbInfo_i ], bbSeenBe=
fore,
instrAddr, instrLen, dataSize, loadAddrExpr, store=
AddrExpr);
|