|
From: <sv...@va...> - 2008-04-24 23:59:45
|
Author: sewardj
Date: 2008-04-25 00:59:49 +0100 (Fri, 25 Apr 2008)
New Revision: 7914
Log:
Fix stupid bug to do with origin tracking for PutI/GetI, in which
origins were stored in the actual guest state rather than the second
shadow. This generated completely bogus origins for x86 floating
point code.
Modified:
branches/OTRACK_BY_INSTRUMENTATION/memcheck/mc_translate.c
Modified: branches/OTRACK_BY_INSTRUMENTATION/memcheck/mc_translate.c
===================================================================
--- branches/OTRACK_BY_INSTRUMENTATION/memcheck/mc_translate.c 2008-04-24 11:29:05 UTC (rev 7913)
+++ branches/OTRACK_BY_INSTRUMENTATION/memcheck/mc_translate.c 2008-04-24 23:59:49 UTC (rev 7914)
@@ -3962,7 +3962,8 @@
return mkU32(0);
tl_assert(sizeofIRType(equivIntTy) >= 4);
tl_assert(sizeofIRType(equivIntTy) == sizeofIRType(descr->elemTy));
- descr_b = mkIRRegArray( descr->base, equivIntTy, descr->nElems );
+ descr_b = mkIRRegArray( descr->base + 2*mce->layout->total_sizeB,
+ equivIntTy, descr->nElems );
/* Do a shadow indexed get of the same size, giving t1. Take
the bottom 32 bits of it, giving t2. Compute into t3 the
origin for the index (almost certainly zero, but there's
@@ -4253,7 +4254,8 @@
tl_assert(sizeofIRType(equivIntTy) >= 4);
tl_assert(sizeofIRType(equivIntTy) == sizeofIRType(descr->elemTy));
descr_b
- = mkIRRegArray( descr->base, equivIntTy, descr->nElems );
+ = mkIRRegArray( descr->base + 2*mce->layout->total_sizeB,
+ equivIntTy, descr->nElems );
/* Compute a value to Put - the conjoinment of the origin for
the data to be Put-ted (obviously) and of the index value
(not so obviously). */
|