Lines Matching refs:insn
92 ir_insn *insn; in ir_save() local
97 for (i = IR_UNUSED + 1, insn = ctx->ir_base - i; i < ctx->consts_count; i++, insn--) { in ir_save()
98 fprintf(f, "\t%s c_%d = ", ir_type_cname[insn->type], i); in ir_save()
99 if (insn->op == IR_FUNC) { in ir_save()
100 fprintf(f, "func %s", ir_get_str(ctx, insn->val.name)); in ir_save()
101 ir_print_proto(ctx, insn->proto, f); in ir_save()
102 } else if (insn->op == IR_SYM) { in ir_save()
103 fprintf(f, "sym(%s)", ir_get_str(ctx, insn->val.name)); in ir_save()
104 } else if (insn->op == IR_FUNC_ADDR) { in ir_save()
106 ir_print_const(ctx, insn, f, true); in ir_save()
107 ir_print_proto(ctx, insn->proto, f); in ir_save()
109 ir_print_const(ctx, insn, f, true); in ir_save()
114 for (i = IR_UNUSED + 1, insn = ctx->ir_base + i; i < ctx->insns_count;) { in ir_save()
115 flags = ir_op_flags[insn->op]; in ir_save()
165 if (!(flags & IR_OP_FLAG_MEM) || insn->type == IR_VOID) { in ir_save()
168 fprintf(f, "\t%s d_%d", ir_type_cname[insn->type], i); in ir_save()
176 fprintf(f, " {%%%s%s}", ir_reg_name(IR_REG_NUM(reg), insn->type), in ir_save()
186 fprintf(f, "%s d_%d", ir_type_cname[insn->type], i); in ir_save()
194 fprintf(f, " {%%%s%s}", ir_reg_name(IR_REG_NUM(reg), insn->type), in ir_save()
202 fprintf(f, "%s", ir_op_name[insn->op]); in ir_save()
203 n = ir_operands_count(ctx, insn); in ir_save()
204 if ((insn->op == IR_MERGE || insn->op == IR_LOOP_BEGIN) && n != 2) { in ir_save()
206 } else if ((insn->op == IR_CALL || insn->op == IR_TAILCALL) && n != 2) { in ir_save()
208 } else if (insn->op == IR_PHI && n != 3) { in ir_save()
210 } else if (insn->op == IR_SNAPSHOT) { in ir_save()
214 for (j = 1, p = insn->ops + 1; j <= n; j++, p++) { in ir_save()
280 …if (((flags & IR_OP_FLAG_DATA) || ((flags & IR_OP_FLAG_MEM) && insn->type != IR_VOID)) && ctx->bin… in ir_save()
358 insn += n; in ir_save()