From: Matthias Braun Date: Tue, 13 Sep 2011 12:19:26 +0000 (+0200) Subject: beabi: no special treatment of returns_twice X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=f4bc6e999c3ed265059fda5df99cf0ff7e0875a3;p=libfirm beabi: no special treatment of returns_twice returns_twice handling was broken in the ia32-backend (the only real beabi user) for a long time now. Just noone noticed because our frontends lacked the special treatment to set the flag correctly. Turned out setjmp/longjmp on ia32 save/restore the registers anyway so not doing anything is fine here. --- diff --git a/ir/be/beabi.c b/ir/be/beabi.c index a71e41a20..f9227f0ea 100644 --- a/ir/be/beabi.c +++ b/ir/be/beabi.c @@ -387,7 +387,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp) const ir_edge_t *edge; int *reg_param_idxs; int *stack_param_idx; - int i, n, destroy_all_regs; + int i, n; int throws_exception; size_t s; size_t p; @@ -524,20 +524,6 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp) } } - /* check for the return_twice property */ - destroy_all_regs = 0; - if (is_SymConst_addr_ent(call_ptr)) { - ir_entity *ent = get_SymConst_entity(call_ptr); - - if (get_entity_additional_properties(ent) & mtp_property_returns_twice) - destroy_all_regs = 1; - } else { - ir_type *call_tp = get_Call_type(irn); - - if (get_method_additional_properties(call_tp) & mtp_property_returns_twice) - destroy_all_regs = 1; - } - /* Put caller save into the destroyed set and state registers in the states * set */ for (i = 0, n = arch_env->n_register_classes; i < n; ++i) { @@ -558,7 +544,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp) * checking */ continue; } - if (destroy_all_regs || arch_register_is_caller_save(arch_env, reg)) { + if (arch_register_is_caller_save(arch_env, reg)) { if (!(reg->type & arch_register_type_ignore)) { ARR_APP1(const arch_register_t*, destroyed_regs, reg); }