From 394fd7e2a9c25e4924fc81c9e187046188609353 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 24 Jan 2007 12:24:49 +0000 Subject: [PATCH] make projs of calle/caller save register and call return values have the same mode as the used registers --- ir/be/beabi.c | 8 ++++++-- ir/be/bespillslots.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ir/be/beabi.c b/ir/be/beabi.c index f41a7aee7..180a59ef2 100644 --- a/ir/be/beabi.c +++ b/ir/be/beabi.c @@ -663,6 +663,11 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp, i /* Correct Proj number since it has been adjusted! (see above) */ const be_abi_call_arg_t *arg = get_call_arg(call, 1, proj - pn_Call_max); + /* correct mode */ + const arch_register_class_t *cls = arch_register_get_class(arg->reg); + ir_mode *mode = arch_register_class_mode(cls); + set_irn_mode(irn, mode); + assert(arg->in_reg); be_set_constr_single_reg(low_call, BE_OUT_POS(proj), arg->reg); } @@ -1692,8 +1697,7 @@ static void modify_irg(be_abi_irg_t *env) rm = reg_map_to_arr(&env->obst, env->regs); for(i = 0, n = pmap_count(env->regs); i < n; ++i) { arch_register_t *reg = (void *) rm[i].reg; - ir_node *arg_proj = rm[i].irn; - ir_mode *mode = arg_proj ? get_irn_mode(arg_proj) : reg->reg_class->mode; + ir_mode *mode = reg->reg_class->mode; long nr = i; int pos = BE_OUT_POS((int) nr); int flags = 0; diff --git a/ir/be/bespillslots.c b/ir/be/bespillslots.c index 3d9993afb..e00e16406 100644 --- a/ir/be/bespillslots.c +++ b/ir/be/bespillslots.c @@ -98,7 +98,7 @@ static spill_t *get_spill(be_fec_env_t *env, ir_node *node) * |_| */ -static ir_node *get_memory_edge(const ir_node *node) +static INLINE ir_node *get_memory_edge(const ir_node *node) { int i, arity; -- 2.20.1