diff options
author | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2009-11-26 17:20:21 +0000 |
---|---|---|
committer | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2009-11-26 17:20:21 +0000 |
commit | db5907d7b94ce492f29a96c95e186fdcda23a149 (patch) | |
tree | 33e37e60ee917a1822688e2c3d4341f5b158316a /callgrind | |
parent | 0ca89e0201db387d572047e9afb5d74786370208 (diff) |
Track vex r1930 (Change the IR representation of load linked and store
conditional.) Completes the fix of #215771.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10957 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'callgrind')
-rw-r--r-- | callgrind/main.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/callgrind/main.c b/callgrind/main.c index fa6a90e9..147e6d05 100644 --- a/callgrind/main.c +++ b/callgrind/main.c @@ -657,14 +657,8 @@ void CLG_(collectBlockInfo)(IRSB* sbIn, static void addConstMemStoreStmt( IRSB* bbOut, UWord addr, UInt val, IRType hWordTy) { - /* JRS 2009june01: re IRTemp_INVALID, am assuming that this - function is used only to create instrumentation, and not to - copy/reconstruct IRStmt_Stores that were in the incoming IR - superblock. If that is not a correct assumption, then things - will break badly on PowerPC, esp w/ threaded apps. */ addStmtToIRSB( bbOut, IRStmt_Store(CLGEndness, - IRTemp_INVALID, IRExpr_Const(hWordTy == Ity_I32 ? IRConst_U32( addr ) : IRConst_U64( addr )), @@ -864,8 +858,24 @@ IRSB* CLG_(instrument)( VgCallbackClosure* closure, addEvent_Dw( &clgs, curr_inode, dataSize, cas->addr ); break; } - - case Ist_Exit: { + + case Ist_LLSC: { + IRType dataTy; + if (st->Ist.LLSC.storedata == NULL) { + /* LL */ + dataTy = typeOfIRTemp(sbIn->tyenv, st->Ist.LLSC.result); + addEvent_Dr( &clgs, curr_inode, + sizeofIRType(dataTy), st->Ist.LLSC.addr ); + } else { + /* SC */ + dataTy = typeOfIRExpr(sbIn->tyenv, st->Ist.LLSC.storedata); + addEvent_Dw( &clgs, curr_inode, + sizeofIRType(dataTy), st->Ist.LLSC.addr ); + } + break; + } + + case Ist_Exit: { UInt jmps_passed; /* We may never reach the next statement, so need to flush |