Commit 7ba12a1f authored by Matthias Braun's avatar Matthias Braun
Browse files

hacky workaround for some builtin_return_address deficiencies (make gcc testsuite work...)

[r26061]
parent 011a4258
......@@ -1121,12 +1121,12 @@ static int cmp_call_dependency(const void *c1, const void *c2)
*/
static void link_ops_in_block_walker(ir_node *irn, void *data)
{
ir_opcode code = get_irn_opcode(irn);
be_abi_irg_t *env = data;
ir_opcode code = get_irn_opcode(irn);
if (code == iro_Call ||
(code == iro_Alloc && get_Alloc_where(irn) == stack_alloc) ||
(code == iro_Free && get_Free_where(irn) == stack_alloc)) {
be_abi_irg_t *env = data;
ir_node *bl = get_nodes_block(irn);
void *save = get_irn_link(bl);
......@@ -1136,6 +1136,16 @@ static void link_ops_in_block_walker(ir_node *irn, void *data)
set_irn_link(irn, save);
set_irn_link(bl, irn);
}
if (code == iro_Builtin && get_Builtin_kind(irn) == ir_bk_return_address) {
ir_node *param = get_Builtin_param(irn, 0);
tarval *tv = get_Const_tarval(param);
unsigned long value = get_tarval_long(tv);
/* use ebp, so the climbframe algo works... */
if (value > 0) {
env->call->flags.bits.try_omit_fp = 0;
}
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment