IRTypeEnv* vx_emptyIRTypeEnv ( void ) { IRTypeEnv* env = (IRTypeEnv *)vx_Alloc(sizeof(IRTypeEnv)); env->types = (IRType *)vx_Alloc(8 * sizeof(IRType)); env->types_size = 8; env->types_used = 0; return env; }
IRTypeEnv* vx_dopyIRTypeEnv ( IRTypeEnv* src ) { Int i; IRTypeEnv* dst = (IRTypeEnv *)vx_Alloc(sizeof(IRTypeEnv)); dst->types_size = src->types_size; dst->types_used = src->types_used; dst->types = (IRType *)vx_Alloc(dst->types_size * sizeof(IRType)); for (i = 0; i < src->types_used; i++) dst->types[i] = src->types[i]; return dst; }
IRSB* vx_emptyIRSB ( void ) { IRSB* bb = (IRSB *)vx_Alloc(sizeof(IRSB)); bb->tyenv = vx_emptyIRTypeEnv(); bb->stmts_used = 0; bb->stmts_size = 8; bb->stmts = (IRStmt **)vx_Alloc(bb->stmts_size * sizeof(IRStmt*)); bb->next = NULL; bb->jumpkind = Ijk_Boring; return bb; }
IRStmt* vx_IRStmt_Dirty ( IRDirty* d ) { IRStmt* s = (IRStmt *)vx_Alloc(sizeof(IRStmt)); s->tag = Ist_Dirty; s->Ist.Dirty.details = d; return s; }
IRConst* vx_IRConst_V128 ( UShort con ) { IRConst* c = (IRConst *)vx_Alloc(sizeof(IRConst)); c->tag = Ico_V128; c->Ico.V128 = con; return c; }
IRConst* vx_IRConst_F64i ( ULong f64i ) { IRConst* c = (IRConst *)vx_Alloc(sizeof(IRConst)); c->tag = Ico_F64i; c->Ico.F64i = f64i; return c; }
IRConst* vx_IRConst_F64 ( Double f64 ) { IRConst* c = (IRConst *)vx_Alloc(sizeof(IRConst)); c->tag = Ico_F64; c->Ico.F64 = f64; return c; }
IRConst* vx_IRConst_U64 ( ULong u64 ) { IRConst* c = (IRConst *)vx_Alloc(sizeof(IRConst)); c->tag = Ico_U64; c->Ico.U64 = u64; return c; }
IRConst* vx_IRConst_U32 ( UInt u32 ) { IRConst* c = (IRConst *)vx_Alloc(sizeof(IRConst)); c->tag = Ico_U32; c->Ico.U32 = u32; return c; }
IRConst* vx_IRConst_U16 ( UShort u16 ) { IRConst* c = (IRConst *)vx_Alloc(sizeof(IRConst)); c->tag = Ico_U16; c->Ico.U16 = u16; return c; }
IRConst* vx_IRConst_U8 ( UChar u8 ) { IRConst* c = (IRConst *)vx_Alloc(sizeof(IRConst)); c->tag = Ico_U8; c->Ico.U8 = u8; return c; }
IRStmt* vx_IRStmt_LoadG ( IREndness end, IRLoadGOp cvt, IRTemp dst, IRExpr* addr, IRExpr* alt, IRExpr* guard ) { IRStmt* s = (IRStmt *)vx_Alloc(sizeof(IRStmt)); s->tag = Ist_LoadG; s->Ist.LoadG.details = mkIRLoadG(end, cvt, dst, addr, alt, guard); return s; }
IRStmt* vx_IRStmt_StoreG ( IREndness end, IRExpr* addr, IRExpr* data, IRExpr* guard ) { IRStmt* s = (IRStmt *)vx_Alloc(sizeof(IRStmt)); s->tag = Ist_StoreG; s->Ist.StoreG.details = mkIRStoreG(end, addr, data, guard); return s; }
IRExpr* vx_IRExpr_Get ( Int off, IRType ty ) { IRExpr* e = (IRExpr *)vx_Alloc(sizeof(IRExpr)); e->tag = Iex_Get; e->Iex.Get.offset = off; e->Iex.Get.ty = ty; return e; }
IRExpr* vx_IRExpr_Unop ( IROp op, IRExpr* arg ) { IRExpr* e = (IRExpr *)vx_Alloc(sizeof(IRExpr)); e->tag = Iex_Unop; e->Iex.Unop.op = op; e->Iex.Unop.arg = arg; return e; }
IRStmt* vx_IRStmt_Put ( Int off, IRExpr* data ) { IRStmt* s = (IRStmt *)vx_Alloc(sizeof(IRStmt)); s->tag = Ist_Put; s->Ist.Put.offset = off; s->Ist.Put.data = data; return s; }
IRStmt* vx_IRStmt_Tmp ( IRTemp tmp, IRExpr* data ) { IRStmt* s = (IRStmt *)vx_Alloc(sizeof(IRStmt)); s->tag = Ist_WrTmp; s->Ist.WrTmp.tmp = tmp; s->Ist.WrTmp.data = data; return s; }
IRStmt* vx_IRStmt_IMark ( Addr64 addr, Int len ) { IRStmt* s = (IRStmt *)vx_Alloc(sizeof(IRStmt)); s->tag = Ist_IMark; s->Ist.IMark.addr = addr; s->Ist.IMark.len = len; return s; }
IRStmt* vx_IRStmt_AbiHint ( IRExpr* base, Int len ) { IRStmt* s = (IRStmt *)vx_Alloc(sizeof(IRStmt)); s->tag = Ist_AbiHint; s->Ist.AbiHint.base = base; s->Ist.AbiHint.len = len; return s; }
IRStmt* vx_IRStmt_MBE ( IRMBusEvent event ) { IRStmt* s = (IRStmt *)vx_Alloc(sizeof(IRStmt)); s->tag = Ist_MBE; s->Ist.MBE.event = event; return s; }
IRExpr* vx_IRExpr_Mux0X ( IRExpr* cond, IRExpr* expr0, IRExpr* exprX ) { IRExpr* e = (IRExpr *)vx_Alloc(sizeof(IRExpr)); e->tag = Iex_Mux0X; e->Iex.Mux0X.cond = cond; e->Iex.Mux0X.expr0 = expr0; e->Iex.Mux0X.exprX = exprX; return e; }
IRExpr* vx_IRExpr_CCall ( IRCallee* cee, IRType retty, IRExpr** args ) { IRExpr* e = (IRExpr *)vx_Alloc(sizeof(IRExpr)); e->tag = Iex_CCall; e->Iex.CCall.cee = cee; e->Iex.CCall.retty = retty; e->Iex.CCall.args = args; return e; }
IRExpr *vx_IRExpr_BBPTR(void) { IRExpr *e = (IRExpr *)vx_Alloc(sizeof(IRExpr)); e->tag = Iex_BBPTR; return e; }
IRExpr* vx_IRExpr_Binop ( IROp op, IRExpr* arg1, IRExpr* arg2 ) { IRExpr* e = (IRExpr *)vx_Alloc(sizeof(IRExpr)); e->tag = Iex_Binop; e->Iex.Binop.op = op; e->Iex.Binop.arg1 = arg1; e->Iex.Binop.arg2 = arg2; return e; }
IRStmt* vx_IRStmt_Exit ( IRExpr* guard, IRJumpKind jk, IRConst* dst ) { IRStmt* s = (IRStmt *)vx_Alloc(sizeof(IRStmt)); s->tag = Ist_Exit; s->Ist.Exit.guard = guard; s->Ist.Exit.jk = jk; s->Ist.Exit.dst = dst; return s; }
IRExpr* vx_IRExpr_GetI ( IRRegArray* descr, IRExpr* ix, Int bias ) { IRExpr* e = (IRExpr *)vx_Alloc(sizeof(IRExpr)); e->tag = Iex_GetI; e->Iex.GetI.descr = descr; e->Iex.GetI.ix = ix; e->Iex.GetI.bias = bias; return e; }
IRExpr* vx_IRExpr_ITE ( IRExpr* cond, IRExpr* expr_t, IRExpr* expr_f ) { IRExpr* e = (IRExpr *)vx_Alloc(sizeof(IRExpr)); e->tag = Iex_ITE; e->Iex.ITE.cond = cond; e->Iex.ITE.iftrue = expr_t; e->Iex.ITE.iffalse = expr_f; return e; }
IRExpr* vx_IRExpr_Load ( IREndness end, IRType ty, IRExpr* addr ) { IRExpr* e = (IRExpr *)vx_Alloc(sizeof(IRExpr)); e->tag = Iex_Load; e->Iex.Load.end = end; e->Iex.Load.ty = ty; e->Iex.Load.addr = addr; assert(end == Iend_LE || end == Iend_BE); return e; }
IRConst* vx_IRConst_U1 ( Bool bit ) { IRConst* c = (IRConst *)vx_Alloc(sizeof(IRConst)); c->tag = Ico_U1; c->Ico.U1 = bit; /* call me paranoid; I don't care :-) */ assert(bit == False || bit == True); return c; }
IRStmt* vx_IRStmt_Store ( IREndness end, IRExpr* addr, IRExpr* data ) { IRStmt* s = (IRStmt *)vx_Alloc(sizeof(IRStmt)); s->tag = Ist_Store; s->Ist.Store.end = end; s->Ist.Store.addr = addr; s->Ist.Store.data = data; assert(end == Iend_LE || end == Iend_BE); return s; }