]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
ir_inject.c now plays according to the new rules.
authorIvo Raisr <ivosh@ivosh.net>
Tue, 8 Aug 2017 04:38:54 +0000 (06:38 +0200)
committerIvo Raisr <ivosh@ivosh.net>
Mon, 28 Aug 2017 21:17:37 +0000 (23:17 +0200)
VEX/priv/ir_inject.c

index c127acad2b47f93db392a4d2f0c5e11ad84ecf9f..249ff305ccad93c46c26146c40ef18ac00ec079f 100644 (file)
@@ -43,7 +43,7 @@
 #define binop(kind, a1, a2)  IRExpr_Binop(kind, a1, a2)
 #define triop(kind, a1, a2, a3)  IRExpr_Triop(kind, a1, a2, a3)
 #define qop(kind, a1, a2, a3, a4)  IRExpr_Qop(kind, a1, a2, a3, a4)
-#define stmt(irsb, st)  addStmtToIRSB(irsb, st)
+#define stmt(irsb, st)  addStmtToIRStmtVec(irsb->stmts, st)
 
 
 /* The IR Injection Control Block. vex_inject_ir will query its contents
@@ -188,7 +188,7 @@ store(IRSB *irsb, IREndness endian, HWord haddr, IRExpr *data)
 
 
 /* Inject IR stmts depending on the data provided in the control
-   block iricb. */
+   block iricb. IR statements are injected into main IRStmtVec with ID #0. */
 void
 vex_inject_ir(IRSB *irsb, IREndness endian)
 {
@@ -310,11 +310,14 @@ vex_inject_ir(IRSB *irsb, IREndness endian)
    if (0) {
       vex_printf("BEGIN inject\n");
       if (iricb.t_result == Ity_I1 || sizeofIRType(iricb.t_result) <= 8) {
-         ppIRStmt(irsb->stmts[irsb->stmts_used - 1]);
+         ppIRStmt(irsb->stmts->stmts[irsb->stmts->stmts_used - 1],
+                  irsb->tyenv, 0);
       } else if (sizeofIRType(iricb.t_result) == 16) {
-         ppIRStmt(irsb->stmts[irsb->stmts_used - 2]);
+         ppIRStmt(irsb->stmts->stmts[irsb->stmts->stmts_used - 2],
+                  irsb->tyenv, 0);
          vex_printf("\n");
-         ppIRStmt(irsb->stmts[irsb->stmts_used - 1]);
+         ppIRStmt(irsb->stmts->stmts[irsb->stmts->stmts_used - 1],
+                  irsb->tyenv, 0);
       }
       vex_printf("\nEND inject\n");
    }