• Home
  • Raw
  • Download

Lines Matching refs:stmt

3860 void sanityCheckFail ( const IRSB* bb, const IRStmt* stmt, const HChar* what )  in sanityCheckFail()  argument
3864 if (stmt) { in sanityCheckFail()
3866 ppIRStmt(stmt); in sanityCheckFail()
3911 void useBeforeDef_Temp ( const IRSB* bb, const IRStmt* stmt, IRTemp tmp, in useBeforeDef_Temp() argument
3915 sanityCheckFail(bb,stmt, "out of range Temp in IRExpr"); in useBeforeDef_Temp()
3917 sanityCheckFail(bb,stmt, "IRTemp use before def in IRExpr"); in useBeforeDef_Temp()
3921 void assignedOnce_Temp(const IRSB *bb, const IRStmt *stmt, IRTemp tmp, in assignedOnce_Temp() argument
3927 sanityCheckFail(bb, stmt, err_msg_out_of_range); in assignedOnce_Temp()
3932 sanityCheckFail(bb, stmt, err_msg_assigned_more_than_once); in assignedOnce_Temp()
3937 void useBeforeDef_Expr ( const IRSB* bb, const IRStmt* stmt, in useBeforeDef_Expr() argument
3945 useBeforeDef_Expr(bb,stmt,expr->Iex.GetI.ix,def_counts); in useBeforeDef_Expr()
3948 useBeforeDef_Temp(bb,stmt,expr->Iex.RdTmp.tmp,def_counts); in useBeforeDef_Expr()
3952 useBeforeDef_Expr(bb,stmt,qop->arg1,def_counts); in useBeforeDef_Expr()
3953 useBeforeDef_Expr(bb,stmt,qop->arg2,def_counts); in useBeforeDef_Expr()
3954 useBeforeDef_Expr(bb,stmt,qop->arg3,def_counts); in useBeforeDef_Expr()
3955 useBeforeDef_Expr(bb,stmt,qop->arg4,def_counts); in useBeforeDef_Expr()
3960 useBeforeDef_Expr(bb,stmt,triop->arg1,def_counts); in useBeforeDef_Expr()
3961 useBeforeDef_Expr(bb,stmt,triop->arg2,def_counts); in useBeforeDef_Expr()
3962 useBeforeDef_Expr(bb,stmt,triop->arg3,def_counts); in useBeforeDef_Expr()
3966 useBeforeDef_Expr(bb,stmt,expr->Iex.Binop.arg1,def_counts); in useBeforeDef_Expr()
3967 useBeforeDef_Expr(bb,stmt,expr->Iex.Binop.arg2,def_counts); in useBeforeDef_Expr()
3970 useBeforeDef_Expr(bb,stmt,expr->Iex.Unop.arg,def_counts); in useBeforeDef_Expr()
3973 useBeforeDef_Expr(bb,stmt,expr->Iex.Load.addr,def_counts); in useBeforeDef_Expr()
3984 sanityCheckFail(bb,stmt, "IRExprP__* value in CCall arg list"); in useBeforeDef_Expr()
3986 useBeforeDef_Expr(bb,stmt,arg,def_counts); in useBeforeDef_Expr()
3991 useBeforeDef_Expr(bb,stmt,expr->Iex.ITE.cond,def_counts); in useBeforeDef_Expr()
3992 useBeforeDef_Expr(bb,stmt,expr->Iex.ITE.iftrue,def_counts); in useBeforeDef_Expr()
3993 useBeforeDef_Expr(bb,stmt,expr->Iex.ITE.iffalse,def_counts); in useBeforeDef_Expr()
4001 void useBeforeDef_Stmt ( const IRSB* bb, const IRStmt* stmt, Int* def_counts ) in useBeforeDef_Stmt() argument
4009 switch (stmt->tag) { in useBeforeDef_Stmt()
4013 useBeforeDef_Expr(bb,stmt,stmt->Ist.AbiHint.base,def_counts); in useBeforeDef_Stmt()
4014 useBeforeDef_Expr(bb,stmt,stmt->Ist.AbiHint.nia,def_counts); in useBeforeDef_Stmt()
4017 useBeforeDef_Expr(bb,stmt,stmt->Ist.Put.data,def_counts); in useBeforeDef_Stmt()
4020 puti = stmt->Ist.PutI.details; in useBeforeDef_Stmt()
4021 useBeforeDef_Expr(bb,stmt,puti->ix,def_counts); in useBeforeDef_Stmt()
4022 useBeforeDef_Expr(bb,stmt,puti->data,def_counts); in useBeforeDef_Stmt()
4025 useBeforeDef_Expr(bb,stmt,stmt->Ist.WrTmp.data,def_counts); in useBeforeDef_Stmt()
4028 useBeforeDef_Expr(bb,stmt,stmt->Ist.Store.addr,def_counts); in useBeforeDef_Stmt()
4029 useBeforeDef_Expr(bb,stmt,stmt->Ist.Store.data,def_counts); in useBeforeDef_Stmt()
4032 sg = stmt->Ist.StoreG.details; in useBeforeDef_Stmt()
4033 useBeforeDef_Expr(bb,stmt,sg->addr,def_counts); in useBeforeDef_Stmt()
4034 useBeforeDef_Expr(bb,stmt,sg->data,def_counts); in useBeforeDef_Stmt()
4035 useBeforeDef_Expr(bb,stmt,sg->guard,def_counts); in useBeforeDef_Stmt()
4038 lg = stmt->Ist.LoadG.details; in useBeforeDef_Stmt()
4039 useBeforeDef_Expr(bb,stmt,lg->addr,def_counts); in useBeforeDef_Stmt()
4040 useBeforeDef_Expr(bb,stmt,lg->alt,def_counts); in useBeforeDef_Stmt()
4041 useBeforeDef_Expr(bb,stmt,lg->guard,def_counts); in useBeforeDef_Stmt()
4044 cas = stmt->Ist.CAS.details; in useBeforeDef_Stmt()
4045 useBeforeDef_Expr(bb,stmt,cas->addr,def_counts); in useBeforeDef_Stmt()
4047 useBeforeDef_Expr(bb,stmt,cas->expdHi,def_counts); in useBeforeDef_Stmt()
4048 useBeforeDef_Expr(bb,stmt,cas->expdLo,def_counts); in useBeforeDef_Stmt()
4050 useBeforeDef_Expr(bb,stmt,cas->dataHi,def_counts); in useBeforeDef_Stmt()
4051 useBeforeDef_Expr(bb,stmt,cas->dataLo,def_counts); in useBeforeDef_Stmt()
4054 useBeforeDef_Expr(bb,stmt,stmt->Ist.LLSC.addr,def_counts); in useBeforeDef_Stmt()
4055 if (stmt->Ist.LLSC.storedata != NULL) in useBeforeDef_Stmt()
4056 useBeforeDef_Expr(bb,stmt,stmt->Ist.LLSC.storedata,def_counts); in useBeforeDef_Stmt()
4059 d = stmt->Ist.Dirty.details; in useBeforeDef_Stmt()
4066 useBeforeDef_Expr(bb,stmt,arg,def_counts); in useBeforeDef_Stmt()
4070 useBeforeDef_Expr(bb,stmt,d->mAddr,def_counts); in useBeforeDef_Stmt()
4076 useBeforeDef_Expr(bb,stmt,stmt->Ist.Exit.guard,def_counts); in useBeforeDef_Stmt()
4084 void assignedOnce_Stmt(const IRSB *bb, const IRStmt *stmt, in assignedOnce_Stmt() argument
4087 switch (stmt->tag) { in assignedOnce_Stmt()
4090 bb, stmt, stmt->Ist.WrTmp.tmp, def_counts, n_def_counts, in assignedOnce_Stmt()
4096 bb, stmt, stmt->Ist.LoadG.details->dst, def_counts, n_def_counts, in assignedOnce_Stmt()
4101 if (stmt->Ist.Dirty.details->tmp != IRTemp_INVALID) { in assignedOnce_Stmt()
4103 bb, stmt, stmt->Ist.Dirty.details->tmp, def_counts, n_def_counts, in assignedOnce_Stmt()
4109 if (stmt->Ist.CAS.details->oldHi != IRTemp_INVALID) { in assignedOnce_Stmt()
4111 bb, stmt, stmt->Ist.CAS.details->oldHi, def_counts, n_def_counts, in assignedOnce_Stmt()
4116 bb, stmt, stmt->Ist.CAS.details->oldLo, def_counts, n_def_counts, in assignedOnce_Stmt()
4122 bb, stmt, stmt->Ist.LLSC.result, def_counts, n_def_counts, in assignedOnce_Stmt()
4136 void tcExpr ( const IRSB* bb, const IRStmt* stmt, const IRExpr* expr, in tcExpr() argument
4147 tcExpr(bb,stmt, expr->Iex.GetI.ix, gWordTy ); in tcExpr()
4149 sanityCheckFail(bb,stmt,"IRExpr.GetI.ix: not :: Ity_I32"); in tcExpr()
4151 sanityCheckFail(bb,stmt,"IRExpr.GetI.descr: invalid descr"); in tcExpr()
4156 tcExpr(bb,stmt, qop->arg1, gWordTy ); in tcExpr()
4157 tcExpr(bb,stmt, qop->arg2, gWordTy ); in tcExpr()
4158 tcExpr(bb,stmt, qop->arg3, gWordTy ); in tcExpr()
4159 tcExpr(bb,stmt, qop->arg4, gWordTy ); in tcExpr()
4167 sanityCheckFail(bb,stmt, in tcExpr()
4199 sanityCheckFail(bb,stmt, in tcExpr()
4208 tcExpr(bb,stmt, triop->arg1, gWordTy ); in tcExpr()
4209 tcExpr(bb,stmt, triop->arg2, gWordTy ); in tcExpr()
4210 tcExpr(bb,stmt, triop->arg3, gWordTy ); in tcExpr()
4218 sanityCheckFail(bb,stmt, in tcExpr()
4244 sanityCheckFail(bb,stmt, in tcExpr()
4252 tcExpr(bb,stmt, expr->Iex.Binop.arg1, gWordTy ); in tcExpr()
4253 tcExpr(bb,stmt, expr->Iex.Binop.arg2, gWordTy ); in tcExpr()
4261 sanityCheckFail(bb,stmt, in tcExpr()
4282 sanityCheckFail(bb,stmt, in tcExpr()
4289 tcExpr(bb,stmt, expr->Iex.Unop.arg, gWordTy ); in tcExpr()
4294 sanityCheckFail(bb,stmt,"Iex.Unop: wrong arity op"); in tcExpr()
4296 sanityCheckFail(bb,stmt,"Iex.Unop: arg ty doesn't match op ty"); in tcExpr()
4299 tcExpr(bb,stmt, expr->Iex.Load.addr, gWordTy); in tcExpr()
4301 sanityCheckFail(bb,stmt,"Iex.Load.addr: not :: guest word type"); in tcExpr()
4303 sanityCheckFail(bb,stmt,"Iex.Load.end: bogus endianness"); in tcExpr()
4307 sanityCheckFail(bb,stmt,"Iex.CCall.cee: bad IRCallee"); in tcExpr()
4309 sanityCheckFail(bb,stmt,"Iex.CCall.cee: #regparms > #args"); in tcExpr()
4312 sanityCheckFail(bb,stmt,"Iex.CCall: > 32 args"); in tcExpr()
4315 sanityCheckFail(bb,stmt,"Iex.CCall.args: is VECRET/GSPTR"); in tcExpr()
4316 tcExpr(bb,stmt, arg, gWordTy); in tcExpr()
4319 sanityCheckFail(bb,stmt,"Iex.CCall.retty: cannot return :: Ity_I1"); in tcExpr()
4322 sanityCheckFail(bb,stmt,"Iex.CCall.arg: arg :: Ity_I1"); in tcExpr()
4326 sanityCheckFail(bb,stmt,"Iex.Const.con: invalid const"); in tcExpr()
4329 tcExpr(bb,stmt, expr->Iex.ITE.cond, gWordTy); in tcExpr()
4330 tcExpr(bb,stmt, expr->Iex.ITE.iftrue, gWordTy); in tcExpr()
4331 tcExpr(bb,stmt, expr->Iex.ITE.iffalse, gWordTy); in tcExpr()
4333 sanityCheckFail(bb,stmt,"Iex.ITE.cond: cond :: Ity_I1"); in tcExpr()
4336 sanityCheckFail(bb,stmt,"Iex.ITE: iftrue/iffalse mismatch"); in tcExpr()
4345 void tcStmt ( const IRSB* bb, const IRStmt* stmt, IRType gWordTy ) in tcStmt() argument
4350 switch (stmt->tag) { in tcStmt()
4354 if (stmt->Ist.IMark.len > 24) in tcStmt()
4355 sanityCheckFail(bb,stmt,"IRStmt.IMark.len: implausible"); in tcStmt()
4356 if (stmt->Ist.IMark.delta > 1) in tcStmt()
4357 sanityCheckFail(bb,stmt,"IRStmt.IMark.delta: implausible"); in tcStmt()
4360 if (typeOfIRExpr(tyenv, stmt->Ist.AbiHint.base) != gWordTy) in tcStmt()
4361 sanityCheckFail(bb,stmt,"IRStmt.AbiHint.base: " in tcStmt()
4363 if (typeOfIRExpr(tyenv, stmt->Ist.AbiHint.nia) != gWordTy) in tcStmt()
4364 sanityCheckFail(bb,stmt,"IRStmt.AbiHint.nia: " in tcStmt()
4368 tcExpr( bb, stmt, stmt->Ist.Put.data, gWordTy ); in tcStmt()
4369 if (typeOfIRExpr(tyenv,stmt->Ist.Put.data) == Ity_I1) in tcStmt()
4370 sanityCheckFail(bb,stmt,"IRStmt.Put.data: cannot Put :: Ity_I1"); in tcStmt()
4373 const IRPutI* puti = stmt->Ist.PutI.details; in tcStmt()
4374 tcExpr( bb, stmt, puti->data, gWordTy ); in tcStmt()
4375 tcExpr( bb, stmt, puti->ix, gWordTy ); in tcStmt()
4377 sanityCheckFail(bb,stmt,"IRStmt.PutI.data: cannot PutI :: Ity_I1"); in tcStmt()
4380 sanityCheckFail(bb,stmt,"IRStmt.PutI.data: data ty != elem ty"); in tcStmt()
4382 sanityCheckFail(bb,stmt,"IRStmt.PutI.ix: not :: Ity_I32"); in tcStmt()
4384 sanityCheckFail(bb,stmt,"IRStmt.PutI.descr: invalid descr"); in tcStmt()
4388 tcExpr( bb, stmt, stmt->Ist.WrTmp.data, gWordTy ); in tcStmt()
4389 if (typeOfIRTemp(tyenv, stmt->Ist.WrTmp.tmp) in tcStmt()
4390 != typeOfIRExpr(tyenv, stmt->Ist.WrTmp.data)) in tcStmt()
4391 sanityCheckFail(bb,stmt, in tcStmt()
4395 tcExpr( bb, stmt, stmt->Ist.Store.addr, gWordTy ); in tcStmt()
4396 tcExpr( bb, stmt, stmt->Ist.Store.data, gWordTy ); in tcStmt()
4397 if (typeOfIRExpr(tyenv, stmt->Ist.Store.addr) != gWordTy) in tcStmt()
4398 sanityCheckFail(bb,stmt, in tcStmt()
4400 if (typeOfIRExpr(tyenv, stmt->Ist.Store.data) == Ity_I1) in tcStmt()
4401 sanityCheckFail(bb,stmt, in tcStmt()
4403 if (stmt->Ist.Store.end != Iend_LE && stmt->Ist.Store.end != Iend_BE) in tcStmt()
4404 sanityCheckFail(bb,stmt,"Ist.Store.end: bogus endianness"); in tcStmt()
4407 const IRStoreG* sg = stmt->Ist.StoreG.details; in tcStmt()
4408 tcExpr( bb, stmt, sg->addr, gWordTy ); in tcStmt()
4409 tcExpr( bb, stmt, sg->data, gWordTy ); in tcStmt()
4410 tcExpr( bb, stmt, sg->guard, gWordTy ); in tcStmt()
4412 sanityCheckFail(bb,stmt,"IRStmtG...addr: not :: guest word type"); in tcStmt()
4414 sanityCheckFail(bb,stmt,"IRStmtG...data: cannot Store :: Ity_I1"); in tcStmt()
4416 sanityCheckFail(bb,stmt,"IRStmtG...guard: not :: Ity_I1"); in tcStmt()
4418 sanityCheckFail(bb,stmt,"IRStmtG...end: bogus endianness"); in tcStmt()
4422 const IRLoadG* lg = stmt->Ist.LoadG.details; in tcStmt()
4423 tcExpr( bb, stmt, lg->addr, gWordTy ); in tcStmt()
4424 tcExpr( bb, stmt, lg->alt, gWordTy ); in tcStmt()
4425 tcExpr( bb, stmt, lg->guard, gWordTy ); in tcStmt()
4427 sanityCheckFail(bb,stmt,"IRStmt.LoadG.guard: not :: Ity_I1"); in tcStmt()
4429 sanityCheckFail(bb,stmt,"IRStmt.LoadG.addr: not " in tcStmt()
4432 sanityCheckFail(bb,stmt,"IRStmt.LoadG: dst/alt type mismatch"); in tcStmt()
4436 sanityCheckFail(bb,stmt,"IRStmt.LoadG: dst/loaded type mismatch"); in tcStmt()
4440 const IRCAS* cas = stmt->Ist.CAS.details; in tcStmt()
4456 tcExpr( bb, stmt, cas->addr, gWordTy ); in tcStmt()
4487 sanityCheckFail(bb,stmt,"IRStmt.CAS: ill-formed"); in tcStmt()
4492 if (typeOfIRExpr(tyenv, stmt->Ist.LLSC.addr) != gWordTy) in tcStmt()
4493 sanityCheckFail(bb,stmt,"IRStmt.LLSC.addr: not :: guest word type"); in tcStmt()
4494 if (stmt->Ist.LLSC.end != Iend_LE && stmt->Ist.LLSC.end != Iend_BE) in tcStmt()
4495 sanityCheckFail(bb,stmt,"Ist.LLSC.end: bogus endianness"); in tcStmt()
4496 tyRes = typeOfIRTemp(tyenv, stmt->Ist.LLSC.result); in tcStmt()
4497 if (stmt->Ist.LLSC.storedata == NULL) { in tcStmt()
4501 sanityCheckFail(bb,stmt,"Ist.LLSC(LL).result :: bogus"); in tcStmt()
4505 sanityCheckFail(bb,stmt,"Ist.LLSC(SC).result: not :: Ity_I1"); in tcStmt()
4506 tyData = typeOfIRExpr(tyenv, stmt->Ist.LLSC.storedata); in tcStmt()
4509 sanityCheckFail(bb,stmt, in tcStmt()
4516 const IRDirty* d = stmt->Ist.Dirty.details; in tcStmt()
4544 tcExpr( bb, stmt, d->guard, gWordTy ); in tcStmt()
4546 sanityCheckFail(bb,stmt,"IRStmt.Dirty.guard not :: Ity_I1"); in tcStmt()
4552 sanityCheckFail(bb,stmt,"IRStmt.Dirty.dst :: Ity_I1"); in tcStmt()
4557 sanityCheckFail(bb,stmt,"IRStmt.Dirty: > 32 args"); in tcStmt()
4565 sanityCheckFail(bb,stmt,"IRStmt.Dirty.arg[i] :: Ity_I1"); in tcStmt()
4568 sanityCheckFail(bb,stmt,"IRStmt.Dirty.args: > 1 GSPTR arg"); in tcStmt()
4573 sanityCheckFail(bb,stmt, in tcStmt()
4579 sanityCheckFail(bb,stmt, in tcStmt()
4583 sanityCheckFail(bb,stmt, in tcStmt()
4588 sanityCheckFail(bb,stmt, in tcStmt()
4594 sanityCheckFail(bb,stmt, in tcStmt()
4600 sanityCheckFail(bb,stmt,"IRStmt.Dirty: ill-formed"); in tcStmt()
4606 switch (stmt->Ist.MBE.event) { in tcStmt()
4609 default: sanityCheckFail(bb,stmt,"IRStmt.MBE.event: unknown"); in tcStmt()
4614 tcExpr( bb, stmt, stmt->Ist.Exit.guard, gWordTy ); in tcStmt()
4615 if (typeOfIRExpr(tyenv,stmt->Ist.Exit.guard) != Ity_I1) in tcStmt()
4616 sanityCheckFail(bb,stmt,"IRStmt.Exit.guard: not :: Ity_I1"); in tcStmt()
4617 if (!saneIRConst(stmt->Ist.Exit.dst)) in tcStmt()
4618 sanityCheckFail(bb,stmt,"IRStmt.Exit.dst: bad dst"); in tcStmt()
4619 if (typeOfIRConst(stmt->Ist.Exit.dst) != gWordTy) in tcStmt()
4620 sanityCheckFail(bb,stmt,"IRStmt.Exit.dst: not :: guest word type"); in tcStmt()
4622 if (stmt->Ist.Exit.offsIP < 16) in tcStmt()
4623 sanityCheckFail(bb,stmt,"IRStmt.Exit.offsIP: too low"); in tcStmt()
4658 const IRStmt* stmt; in sanityCheckIRSB() local
4663 stmt = bb->stmts[i]; in sanityCheckIRSB()
4664 if (!stmt) in sanityCheckIRSB()
4665 sanityCheckFail(bb, stmt, "IRStmt: is NULL"); in sanityCheckIRSB()
4666 if (!isFlatIRStmt(stmt)) in sanityCheckIRSB()
4667 sanityCheckFail(bb, stmt, "IRStmt: is not flat"); in sanityCheckIRSB()
4680 stmt = bb->stmts[i]; in sanityCheckIRSB()
4682 useBeforeDef_Stmt(bb,stmt,def_counts); in sanityCheckIRSB()
4685 assignedOnce_Stmt(bb, stmt, def_counts, n_temps); in sanityCheckIRSB()