Lines Matching refs:insn
71 static const ir_proto_t *ir_call_proto(const ir_ctx *ctx, ir_insn *insn) in ir_call_proto() argument
73 if (IR_IS_CONST_REF(insn->op2)) { in ir_call_proto()
74 const ir_insn *func = &ctx->ir_base[insn->op2]; in ir_call_proto()
81 } else if (ctx->ir_base[insn->op2].op == IR_PROTO) { in ir_call_proto()
82 return (const ir_proto_t *)ir_get_str(ctx, ctx->ir_base[insn->op2].op2); in ir_call_proto()
91 bool ir_is_fastcall(const ir_ctx *ctx, const ir_insn *insn) in ir_is_fastcall() argument
94 if (IR_IS_CONST_REF(insn->op2)) { in ir_is_fastcall()
95 const ir_insn *func = &ctx->ir_base[insn->op2]; in ir_is_fastcall()
104 } else if (ctx->ir_base[insn->op2].op == IR_PROTO) { in ir_is_fastcall()
105 const ir_proto_t *proto = (const ir_proto_t *)ir_get_str(ctx, ctx->ir_base[insn->op2].op2); in ir_is_fastcall()
114 bool ir_is_fastcall(const ir_ctx *ctx, const ir_insn *insn) in ir_is_fastcall() argument
120 bool ir_is_vararg(const ir_ctx *ctx, ir_insn *insn) in ir_is_vararg() argument
122 const ir_proto_t *proto = ir_call_proto(ctx, insn); in ir_is_vararg()
147 ir_insn *insn; in ir_get_param_reg() local
166 insn = &ctx->ir_base[use]; in ir_get_param_reg()
167 if (insn->op == IR_PARAM) { in ir_get_param_reg()
168 if (IR_IS_TYPE_INT(insn->type)) { in ir_get_param_reg()
182 IR_ASSERT(IR_IS_TYPE_FP(insn->type)); in ir_get_param_reg()
201 static int ir_get_args_regs(const ir_ctx *ctx, const ir_insn *insn, int8_t *regs) in ir_get_args_regs() argument
214 if (sizeof(void*) == 4 && ir_is_fastcall(ctx, insn)) { in ir_get_args_regs()
222 n = insn->inputs_count; in ir_get_args_regs()
225 type = ctx->ir_base[ir_insn_op(insn, j)].type; in ir_get_args_regs()
330 static void *ir_call_addr(ir_ctx *ctx, ir_insn *insn, ir_insn *addr_insn) in ir_call_addr() argument
344 static void *ir_jmp_addr(ir_ctx *ctx, ir_insn *insn, ir_insn *addr_insn) in ir_jmp_addr() argument
346 void *addr = ir_call_addr(ctx, insn, addr_insn); in ir_jmp_addr()
349 if (ctx->ir_base[insn->op1].op == IR_SNAPSHOT) { in ir_jmp_addr()
350 addr = IR_SNAPSHOT_HANDLER(ctx, insn->op1, &ctx->ir_base[insn->op1], addr); in ir_jmp_addr()
919 ir_insn *insn = &ctx->ir_base[ref]; in ir_emit_dessa_moves() local
921 if (insn->op == IR_PHI) { in ir_emit_dessa_moves()
922 ir_ref input = ir_insn_op(insn, k); in ir_emit_dessa_moves()
948 copies[n].type = insn->type; in ir_emit_dessa_moves()
966 ir_insn *insn; in ir_match() local
986 insn = &ctx->ir_base[start]; in ir_match()
987 IR_ASSERT(insn->op == IR_ENTRY); in ir_match()
988 insn->op3 = entries_count; in ir_match()
995 insn = &ctx->ir_base[ref]; in ir_match()
996 if (insn->op == IR_END || insn->op == IR_LOOP_END) { in ir_match()
997 ctx->rules[ref] = insn->op; in ir_match()