X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeabi.c;h=5b3007dadcd951435cc99db2ee2f7240e98bb608;hb=8057f671ea7f286a27e40bfe1aa45d85e0990cbe;hp=8fa8a37c96370921aa6b06b96e0c7d607e3d14dd;hpb=5619c9122551713adbefc33977572639408dd8b9;p=libfirm diff --git a/ir/be/beabi.c b/ir/be/beabi.c index 8fa8a37c9..5b3007dad 100644 --- a/ir/be/beabi.c +++ b/ir/be/beabi.c @@ -196,11 +196,11 @@ static void remember_call_arg(be_abi_call_arg_t *arg, be_abi_call_t *call, be_ab unsigned hash = arg->is_res * 128 + arg->pos; if (context & ABI_CONTEXT_CALLEE) { arg->callee = 1; - set_insert(be_abi_call_arg_t, call->params, arg, sizeof(*arg), hash); + (void)set_insert(be_abi_call_arg_t, call->params, arg, sizeof(*arg), hash); } if (context & ABI_CONTEXT_CALLER) { arg->callee = 0; - set_insert(be_abi_call_arg_t, call->params, arg, sizeof(*arg), hash); + (void)set_insert(be_abi_call_arg_t, call->params, arg, sizeof(*arg), hash); } } @@ -390,7 +390,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp) arch_env_get_call_abi(arch_env, call_tp, call); /* Insert code to put the stack arguments on the stack. */ - assert(get_Call_n_params(irn) == n_params); + assert((size_t)get_Call_n_params(irn) == n_params); stack_param_idx = ALLOCAN(int, n_params); for (p = 0; p < n_params; ++p) { be_abi_call_arg_t *arg = get_call_arg(call, 0, p, 0); @@ -569,13 +569,15 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp) throws_exception = ir_throws_exception(irn); if (env->call->flags.bits.call_has_imm && is_SymConst(call_ptr)) { /* direct call */ - low_call = be_new_Call(dbgi, irg, bl, curr_mem, curr_sp, curr_sp, + low_call = be_new_Call(dbgi, irg, bl, curr_mem, sp->single_req, curr_sp, + sp->single_req, curr_sp, n_reg_results + pn_be_Call_first_res + ARR_LEN(destroyed_regs), n_ins, in, get_Call_type(irn)); be_Call_set_entity(low_call, get_SymConst_entity(call_ptr)); } else { /* indirect call */ - low_call = be_new_Call(dbgi, irg, bl, curr_mem, curr_sp, call_ptr, + low_call = be_new_Call(dbgi, irg, bl, curr_mem, sp->single_req, curr_sp, + call->cls_addr->class_req, call_ptr, n_reg_results + pn_be_Call_first_res + ARR_LEN(destroyed_regs), n_ins, in, get_Call_type(irn)); } @@ -595,7 +597,6 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp) for (i = 0; i < n_res; ++i) { ir_node *proj = res_projs[i]; be_abi_call_arg_t *arg = get_call_arg(call, 1, i, 0); - long pn = i + pn_be_Call_first_res; /* returns values on stack not supported yet */ assert(arg->in_reg); @@ -605,7 +606,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp) unspeakable Proj_T from the Call. Therefore, all real argument Proj numbers must be increased by pn_be_Call_first_res */ - pn = i + pn_be_Call_first_res; + long pn = i + pn_be_Call_first_res; if (proj == NULL) { ir_type *res_type = get_method_res_type(call_tp, i); @@ -631,12 +632,6 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp) } } - /* - Set the register class of the call address to - the backend provided class (default: stack pointer class) - */ - be_node_set_reg_class_in(low_call, n_be_Call_ptr, call->cls_addr); - DBG((dbg, LEVEL_3, "\tcreated backend call %+F\n", low_call)); /* Set the register classes and constraints of the Call parameters. */