cinfo = get_call_info (sig, FALSE);
for (i = 0; i < sig->param_count + sig->hasthis; ++i) {
- MonoInst *ins = cfg->varinfo [i];
+ MonoInst *ins = cfg->args [i];
ArgInfo *ainfo = &cinfo->args [i];
}
for (i = 0; i < sig->param_count + sig->hasthis; ++i) {
- inst = cfg->varinfo [i];
+ inst = cfg->args [i];
if (inst->opcode != OP_REGVAR) {
ArgInfo *ainfo = &cinfo->args [i];
gboolean inreg = TRUE;
case OP_IXOR_IMM:
case OP_AND_IMM:
case OP_SHL_IMM:
+ case OP_SHR_IMM:
case OP_ISHL_IMM:
case OP_LSHL_IMM:
case OP_ISHR_IMM:
switched = TRUE;
break;
case OP_SHL_IMM:
+ case OP_SHR_IMM:
case OP_ISHL_IMM:
case OP_LSHL_IMM:
case OP_ISHR_IMM:
case OP_SHL_IMM:
ins->opcode = OP_LSHL;
break;
+ case OP_SHR_IMM:
+ ins->opcode = OP_LSHR;
+ break;
case OP_LSHL_IMM:
ins->opcode = OP_LSHL;
break;
case OP_ICOMPARE_IMM: {
/* Instead of compare+b<cond>, ia64 has compare<cond>+br */
gboolean imm;
+ CompRelation cond;
/*
* The compare_imm instructions have switched up arguments, and
* some of them take an imm between -127 and 128.
*/
next = ins->next;
- switch (next->opcode) {
- case CEE_BGE:
- case CEE_BLT:
- case OP_COND_EXC_LT:
- case OP_IBGE:
- case OP_IBLT:
+ cond = mono_opcode_to_cond (next->opcode);
+ if ((cond == CMP_LT) || (cond == CMP_GE))
imm = ia64_is_imm8 (ins->inst_imm - 1);
- break;
- case OP_IBGE_UN:
- case OP_IBLT_UN:
- case CEE_BGE_UN:
- case CEE_BLT_UN:
+ else if ((cond == CMP_LT_UN) || (cond == CMP_GE_UN))
imm = ia64_is_imm8 (ins->inst_imm - 1) && (ins->inst_imm > 0);
- break;
- default:
+ else
imm = ia64_is_imm8 (ins->inst_imm);
- break;
- }
if (imm) {
ins->opcode = opcode_to_ia64_cmp_imm (next->opcode, ins->opcode);
ArgInfo *ainfo = cinfo->args + i;
gint32 stack_offset;
MonoType *arg_type;
- ins = cfg->varinfo [i];
+ ins = cfg->args [i];
if (sig->hasthis && (i == 0))
arg_type = &mono_defaults.object_class->byval_arg;
case OP_LSHL_IMM:
ia64_shl_imm (code, ins->dreg, ins->sreg1, ins->inst_imm);
break;
- case OP_LSHR_IMM:
- ia64_shr_imm (code, ins->dreg, ins->sreg1, ins->inst_imm);
- break;
+ case OP_SHR_IMM:
case OP_ISHR_IMM:
+ case OP_LSHR_IMM:
ia64_shr_imm (code, ins->dreg, ins->sreg1, ins->inst_imm);
break;
case OP_ISHR_UN_IMM:
break;
case CEE_CONV_I8:
case CEE_CONV_I:
- /* FIXME: Sign extend ? */
- ia64_mov (code, ins->dreg, ins->sreg1);
+ ia64_sxt4 (code, ins->dreg, ins->sreg1);
break;
case CEE_CONV_U8:
case CEE_CONV_U:
ArgInfo *ainfo = cinfo->args + i;
gint32 stack_offset;
MonoType *arg_type;
- inst = cfg->varinfo [i];
+ inst = cfg->args [i];
if (sig->hasthis && (i == 0))
arg_type = &mono_defaults.object_class->byval_arg;
/* Save arguments to the stack */
for (i = 0; i < n; ++i) {
- ins = cfg->varinfo [i];
+ ins = cfg->args [i];
if (ins->opcode == OP_REGVAR) {
ia64_movl (code, GP_SCRATCH_REG, (i * 8));