Track Vex API change in rev 1062: pass both the guest and host word
sizes to the instrumentatation functions. Make most of the tools
abort if they are not the same; we can't handle that case yet.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3397 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/memcheck/mc_translate.c b/memcheck/mc_translate.c
index 5dc79be..f6f984b 100644
--- a/memcheck/mc_translate.c
+++ b/memcheck/mc_translate.c
@@ -2383,16 +2383,23 @@
}
-IRBB* TL_(instrument) ( IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
+IRBB* TL_(instrument) ( IRBB* bb_in, VexGuestLayout* layout,
+ IRType gWordTy, IRType hWordTy )
{
Bool verboze = False; //True;
Int i, j, first_stmt;
IRStmt* st;
MCEnv mce;
+ IRBB* bb;
+
+ if (gWordTy != hWordTy) {
+ /* We don't currently support this case. */
+ VG_(tool_panic)("host/guest word size mismatch");
+ }
/* Set up BB */
- IRBB* bb = emptyIRBB();
+ bb = emptyIRBB();
bb->tyenv = dopyIRTypeEnv(bb_in->tyenv);
bb->next = dopyIRExpr(bb_in->next);
bb->jumpkind = bb_in->jumpkind;