Example #1
0
void addDynamicDisownNonNullDetached(IRSB* sbOut, IRExpr* st){
  runPureCCall(sbOut,
               mkIRCallee(1, "disownShadowTemp",
                          VG_(fnptr_to_fnentry)(disownShadowTemp)),
               Ity_I64,
               mkIRExprVec_1(st));
}
		IRExpr *transformIRExpr(IRExpr *e) {
			std::map<int, IRExpr *> argVals;
			if (f->matches(e, argVals)) {
				if (!cee)
					cee = mkIRCallee(
						0,
						my_asprintf("f%d", (*f_cntr)++), /* XXX memory leak XXX */
						NULL,
						0);
				IRExpr **args;
				args = alloc_irexpr_array(argVals.size() + 1);
				for (int i = 0; i < (int)argVals.size(); i++) {
					assert(argVals[i+1]);
					args[i] = argVals[i+1];
				}
				args[argVals.size()] = NULL;
				IRExpr *res = IRExpr_CCall(cee, e->type(), args);
				if (debug_use_functions)
					printf("Transform %s to %s using %s\n",
					       nameIRExpr(e),
					       nameIRExpr(res),
					       f->name());
				return res;
			}
			return StateMachineTransformer::transformIRExpr(e);
		}
Example #3
0
IRCallee* pyvex_deepCopyIRCallee ( IRCallee* ce )
{
   IRCallee* ce2 = mkIRCallee(ce->regparms, ce->name, ce->addr);
   ce2->mcx_mask = ce->mcx_mask;
   return ce2;
}