Lines Matching defs:src

29 static pseudo_t add_cast(struct entrypoint *ep, struct symbol *to, struct symbol *from, int op, pseudo_t src);
33 static pseudo_t cast_pseudo(struct entrypoint *ep, pseudo_t src, struct symbol *from, struct symbol *to);
333 if (insn->src && insn->src != VOID)
334 buf += sprintf(buf, "%s", show_pseudo(insn->src));
400 buf += sprintf(buf, "%s", show_pseudo(insn->src));
427 buf += sprintf(buf, "%s <- %lld[%s]", show_pseudo(insn->target), insn->offset, show_pseudo(insn->src));
430 buf += sprintf(buf, "%s -> %lld[%s]", show_pseudo(insn->target), insn->offset, show_pseudo(insn->src));
454 show_pseudo(insn->src));
469 buf += sprintf(buf, "%s <- (%d) %s, %d", show_pseudo(insn->target), type_size(insn->orig_type), show_pseudo(insn->src), insn->from);
494 buf += sprintf(buf, "%s <- %s", show_pseudo(insn->target), show_pseudo(insn->src));
649 struct basic_block *src = ep->active;
650 if (bb_reachable(src))
656 struct basic_block *src = ep->active;
657 if (bb_reachable(src)) {
660 add_bb(&dst->parents, src);
661 add_bb(&src->children, dst);
662 br->bb = src;
663 add_instruction(&src->insns, br);
980 use_pseudo(insn, ad->address, &insn->src);
997 use_pseudo(store, ad->address, &store->src);
1101 use_pseudo(insn, symbol_pseudo(ep, expr->symbol), &insn->src);
1170 static pseudo_t add_unop(struct entrypoint *ep, struct symbol *ctype, int op, pseudo_t src)
1176 use_pseudo(insn, src, &insn->src1);
1182 struct symbol *from, int op, pseudo_t src)
1184 pseudo_t new = add_unop(ep, to, op, src);
1198 use_pseudo(insn, pre, &insn->src);
1287 static int get_cast_opcode(struct symbol *dst, struct symbol *src)
1289 enum mtype stype = get_mtype(src);
1296 if (dst->bit_size == src->bit_size)
1340 if (dst->bit_size ==src->bit_size)
1342 if (dst->bit_size < src->bit_size)
1350 if (src->type == SYM_NODE)
1351 src = src->ctype.base_type;
1354 if (src == dst)
1360 static pseudo_t cast_pseudo(struct entrypoint *ep, pseudo_t src, struct symbol *from, struct symbol *to)
1367 if (src == VOID)
1376 return src;
1380 if (src == value_pseudo(0))
1384 src = cast_pseudo(ep, src, from, size_t_ctype);
1392 src = cast_pseudo(ep, src, from, size_t_ctype);
1393 return cast_pseudo(ep, src, size_t_ctype, to);
1403 use_pseudo(insn, src, &insn->src);
1421 static inline pseudo_t add_convert_to_bool(struct entrypoint *ep, pseudo_t src, struct symbol *type)
1426 if (!type || src == VOID)
1429 return src;
1430 if (src->type == PSEUDO_VAL && (src->value == 0 || src->value == 1))
1431 return src;
1439 return add_cmp_op(ep, &bool_ctype, op, type, src, zero);
1454 struct expression *src = expr->right;
1458 value = linearize_expression(ep, src);
1478 if (!src)
1481 ctype = src->ctype;
1637 return (phi2 == VOID) ? phi2 : phi2->def->src;
1639 return (phi1 == VOID) ? phi1 : phi1->def->src;
1706 static void insert_phis(struct basic_block *bb, pseudo_t src, struct symbol *ctype,
1712 struct instruction *phisrc = alloc_phisrc(src, ctype);
1828 pseudo_t src;
1834 src = linearize_expression(ep, orig);
1835 return cast_pseudo(ep, src, orig->ctype, expr->ctype);
1995 static void add_return(struct entrypoint *ep, struct basic_block *bb, struct symbol *ctype, pseudo_t src)
2005 phi = alloc_phi(ep->active, src, ctype);
2218 pseudo_t src = linearize_expression(ep, expr);
2221 add_return(ep, bb_return, ret, src);
2421 use_pseudo(goto_ins, pseudo, &goto_ins->src);
2574 use_pseudo(ret, result, &ret->src);
2621 pseudo_t src;
2624 src = linearize_expression(ep, first_expression(expr->args));
2625 use_pseudo(insn, src, &insn->src1);
2627 src = insn->target = alloc_pseudo(insn);
2631 use_pseudo(insn, src, &insn->src1);