for(i = 0; i < n_params; ++i) {
be_abi_call_arg_t *arg = get_call_arg(call, 0, i);
assert(arg);
- if(arg->on_stack) {
- stack_size += arg->space_before;
- stack_size = round_up2(stack_size, arg->alignment);
- stack_size += get_type_size_bytes(get_method_param_type(mt, i));
- stack_size += arg->space_after;
+ if (arg->on_stack) {
+ int arg_size = get_type_size_bytes(get_method_param_type(mt, i));
+
+ stack_size += round_up2(arg->space_before, arg->alignment);
+ stack_size += round_up2(arg_size, arg->alignment);
+ stack_size += round_up2(arg->space_after, arg->alignment);
obstack_int_grow(obst, i);
n_pos++;
}
ir_node *bl = get_nodes_block(free);
ir_graph *irg = get_irn_irg(bl);
ir_node *addsp, *mem, *res;
- dbg_info *db = get_irn_dbg_info(free);
/* The stack pointer will be modified in an unknown manner.
We cannot omit it. */
arch_env_push_irn_handler(env->birg->main_env->arch_env, &env->irn_handler);
env->call->cb->done(env->cb);
+ env->cb = NULL;
return env;
}
return pmap_get(abi->regs, (void *) reg);
}
+ir_node *be_abi_get_ignore_irn(be_abi_irg_t *abi, const arch_register_t *reg)
+{
+ assert(arch_register_type_is(reg, ignore));
+ assert(pmap_contains(abi->regs, (void *) reg));
+ return pmap_get(abi->regs, (void *) reg);
+}
+
/*
_____ _____ _ _ _ _ _ _
|_ _| __ \| \ | | | | | | | | |
static const arch_irn_handler_t abi_irn_handler = {
abi_get_irn_ops
};
+
+/**
+ * Returns non-zero if the ABI has omitted the frame pointer in
+ * the current graph.
+ */
+int be_abi_omit_fp(const be_abi_irg_t *abi) {
+ return abi->call->flags.bits.try_omit_fp;
+}