* @param is_res true for call results, false for call arguments
* @param pos position of the argument
*/
* @param is_res true for call results, false for call arguments
* @param pos position of the argument
*/
{
return get_or_set_call_arg(call, is_res, pos, 0);
}
{
return get_or_set_call_arg(call, is_res, pos, 0);
}
{
be_abi_call_arg_t *arg = get_call_arg(call, 0, pos);
return arg && !arg->in_reg;
{
be_abi_call_arg_t *arg = get_call_arg(call, 0, pos);
return arg && !arg->in_reg;
curr_sp = new_r_Proj(irg, bl, low_call, get_irn_mode(curr_sp),
pn_be_Call_sp);
be_set_constr_single_reg(low_call, BE_OUT_POS(pn_be_Call_sp), sp);
curr_sp = new_r_Proj(irg, bl, low_call, get_irn_mode(curr_sp),
pn_be_Call_sp);
be_set_constr_single_reg(low_call, BE_OUT_POS(pn_be_Call_sp), sp);
be_node_set_flags(low_call, BE_OUT_POS(pn_be_Call_sp),
arch_irn_flags_ignore | arch_irn_flags_modify_sp);
be_node_set_flags(low_call, BE_OUT_POS(pn_be_Call_sp),
arch_irn_flags_ignore | arch_irn_flags_modify_sp);
/* memorize the register in the link field. we need afterwards to set the register class of the keep correctly. */
be_set_constr_single_reg(low_call, BE_OUT_POS(curr_res_proj), reg);
/* memorize the register in the link field. we need afterwards to set the register class of the keep correctly. */
be_set_constr_single_reg(low_call, BE_OUT_POS(curr_res_proj), reg);
/* a call can produce ignore registers, in this case set the flag and register for the Proj */
if (arch_register_type_is(reg, ignore)) {
/* a call can produce ignore registers, in this case set the flag and register for the Proj */
if (arch_register_type_is(reg, ignore)) {
set_irn_link(proj, (void*) reg);
obstack_ptr_grow(obst, proj);
}
set_irn_link(proj, (void*) reg);
obstack_ptr_grow(obst, proj);
}
be_set_constr_single_reg(irn, n, reg);
be_set_constr_single_reg(irn, pos, reg);
be_node_set_reg_class(irn, pos, reg->reg_class);
be_set_constr_single_reg(irn, n, reg);
be_set_constr_single_reg(irn, pos, reg);
be_node_set_reg_class(irn, pos, reg->reg_class);
- if (arch_register_type_is(reg, ignore) || arch_irn_is(env->birg->main_env->arch_env, in[n], ignore))
+ if (arch_register_type_is(reg, ignore) || arch_irn_is(in[n], ignore))
flags |= arch_irn_flags_modify_sp;
be_node_set_flags(irn, pos, flags);
flags |= arch_irn_flags_modify_sp;
be_node_set_flags(irn, pos, flags);
proj = new_r_Proj(irg, reg_params_bl, env->reg_params, mode, nr);
pmap_insert(env->regs, (void *) reg, proj);
be_set_constr_single_reg(env->reg_params, pos, reg);
proj = new_r_Proj(irg, reg_params_bl, env->reg_params, mode, nr);
pmap_insert(env->regs, (void *) reg, proj);
be_set_constr_single_reg(env->reg_params, pos, reg);
create_barrier(env, start_bl, &mem, env->regs, 0);
env->init_sp = be_abi_reg_map_get(env->regs, sp);
create_barrier(env, start_bl, &mem, env->regs, 0);
env->init_sp = be_abi_reg_map_get(env->regs, sp);
frame_pointer = be_abi_reg_map_get(env->regs, fp_reg);
set_irg_frame(irg, frame_pointer);
frame_pointer = be_abi_reg_map_get(env->regs, fp_reg);
set_irg_frame(irg, frame_pointer);
mode = get_irn_mode(pred);
unknown = new_r_Unknown(irg, mode);
pic_base = arch_code_generator_get_pic_base(env->birg->cg);
mode = get_irn_mode(pred);
unknown = new_r_Unknown(irg, mode);
pic_base = arch_code_generator_get_pic_base(env->birg->cg);
pic_symbol = get_pic_symbol(be, entity);
pic_symconst = new_rd_SymConst_addr_ent(dbgi, irg, mode_P_code,
pic_symbol, NULL);
pic_symbol = get_pic_symbol(be, entity);
pic_symconst = new_rd_SymConst_addr_ent(dbgi, irg, mode_P_code,
pic_symbol, NULL);
/* we need an extra indirection for global data outside our current
module. The loads are always safe and can therefore float
/* we need an extra indirection for global data outside our current
module. The loads are always safe and can therefore float
assert(get_irn_mode(node) != mode_M && get_irn_mode(node) != mode_T);
ARR_APP1(ir_node*, env->sp_nodes, node);
}
assert(get_irn_mode(node) != mode_M && get_irn_mode(node) != mode_T);
ARR_APP1(ir_node*, env->sp_nodes, node);
}
fix_stack_walker_env_t walker_env;
walker_env.sp_nodes = NEW_ARR_F(ir_node*, 0);
fix_stack_walker_env_t walker_env;
walker_env.sp_nodes = NEW_ARR_F(ir_node*, 0);
irg_walk_graph(birg->irg, collect_stack_nodes_walker, NULL, &walker_env);
irg_walk_graph(birg->irg, collect_stack_nodes_walker, NULL, &walker_env);
- be_set_phi_reg_req(walker_env.arch_env, phi, &env->sp_req);
- be_set_phi_flags(walker_env.arch_env, phi, arch_irn_flags_ignore | arch_irn_flags_modify_sp);
- arch_set_irn_register(walker_env.arch_env, phi, env->arch_env->sp);
+ be_set_phi_reg_req(phi, &env->sp_req);
+ be_set_phi_flags(phi, arch_irn_flags_ignore | arch_irn_flags_modify_sp);
+ arch_set_irn_register(phi, env->arch_env->sp);
if (ent) {
int bias = omit_fp ? real_bias : 0;
int offset = get_stack_entity_offset(&env->frame, ent, bias);
if (ent) {
int bias = omit_fp ? real_bias : 0;
int offset = get_stack_entity_offset(&env->frame, ent, bias);
DBG((env->dbg, LEVEL_2, "%F has offset %d (including bias %d)\n",
ent, offset, bias));
}
DBG((env->dbg, LEVEL_2, "%F has offset %d (including bias %d)\n",
ent, offset, bias));
}
* If the node modifies the stack pointer by a constant offset,
* record that in the bias.
*/
* If the node modifies the stack pointer by a constant offset,
* record that in the bias.
*/