header = cfg->header;
sig = mono_method_signature (cfg->method);
- cinfo = get_call_info (cfg->mempool, sig);
+ if (!cfg->arch.cinfo)
+ cfg->arch.cinfo = get_call_info (cfg->mempool, sig);
+ cinfo = (CallInfo *)cfg->arch.cinfo;
cfg->frame_reg = X86_EBP;
offset = 0;
if (inst->opcode != OP_REGVAR) {
inst->opcode = OP_REGOFFSET;
inst->inst_basereg = X86_EBP;
+ inst->inst_offset = ainfo->offset + ARGS_OFFSET;
}
- inst->inst_offset = ainfo->offset + ARGS_OFFSET;
}
cfg->stack_offset = offset;
sig = mono_method_signature (cfg->method);
- cinfo = get_call_info (cfg->mempool, sig);
+ if (!cfg->arch.cinfo)
+ cfg->arch.cinfo = get_call_info (cfg->mempool, sig);
+ cinfo = (CallInfo *)cfg->arch.cinfo;
+
sig_ret = mini_get_underlying_type (sig->ret);
if (cinfo->ret.storage == ArgValuetypeInReg)
MonoBasicBlock *bb;
MonoMethodSignature *sig;
MonoInst *inst;
+ CallInfo *cinfo;
+ ArgInfo *ainfo;
int alloc_size, pos, max_offset, i, cfa_offset;
guint8 *code;
gboolean need_stack_frame;
sig = mono_method_signature (method);
pos = 0;
+ cinfo = (CallInfo *)cfg->arch.cinfo;
+
for (i = 0; i < sig->param_count + sig->hasthis; ++i) {
inst = cfg->args [pos];
+ ainfo = &cinfo->args [pos];
if (inst->opcode == OP_REGVAR) {
g_assert (need_stack_frame);
- x86_mov_reg_membase (code, inst->dreg, X86_EBP, inst->inst_offset, 4);
+ x86_mov_reg_membase (code, inst->dreg, X86_EBP, ainfo->offset + ARGS_OFFSET, 4);
if (cfg->verbose_level > 2)
g_print ("Argument %d assigned to register %s\n", pos, mono_arch_regname (inst->dreg));
}
}
/* Load returned vtypes into registers if needed */
- cinfo = get_call_info (cfg->mempool, sig);
+ cinfo = (CallInfo *)cfg->arch.cinfo;
if (cinfo->ret.storage == ArgValuetypeInReg) {
for (quad = 0; quad < 2; quad ++) {
switch (cinfo->ret.pair_storage [quad]) {