* @author Sebastian Hack, Michael Beck
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
#include "obst.h"
#include "offset.h"
* @param is_res true for call results, false for call arguments
* @param pos position of the argument
*/
-static INLINE be_abi_call_arg_t *get_call_arg(be_abi_call_t *call, int is_res, int pos)
+static inline be_abi_call_arg_t *get_call_arg(be_abi_call_t *call, int is_res, int pos)
{
return get_or_set_call_arg(call, is_res, pos, 0);
}
* Returns non-zero if the call argument at given position
* is transfered on the stack.
*/
-static INLINE int is_on_stack(be_abi_call_t *call, int pos)
+static inline int is_on_stack(be_abi_call_t *call, int pos)
{
be_abi_call_arg_t *arg = get_call_arg(call, 0, pos);
return arg && !arg->in_reg;
typedef struct fix_stack_walker_env_t {
node_array sp_nodes;
- const arch_env_t *arch_env;
} fix_stack_walker_env_t;
/**
fix_stack_walker_env_t walker_env;
walker_env.sp_nodes = NEW_ARR_F(ir_node*, 0);
- walker_env.arch_env = birg->main_env->arch_env;
irg_walk_graph(birg->irg, collect_stack_nodes_walker, NULL, &walker_env);
len = ARR_LEN(phis);
for(i = 0; i < len; ++i) {
ir_node *phi = phis[i];
- 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);
+ 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);
}
be_ssa_construction_destroy(&senv);