X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeabi.c;h=749880069fa0555374b93e97d0c052698f4d00bc;hb=52b05829a843d8e3c06aac48e8123db9c71c6ef8;hp=2eadaa4239f4074d6dce98f40bf4cba172c590c7;hpb=c0acb5cc9a2967e31e2b2961a98831d674cea3b8;p=libfirm diff --git a/ir/be/beabi.c b/ir/be/beabi.c index 2eadaa423..749880069 100644 --- a/ir/be/beabi.c +++ b/ir/be/beabi.c @@ -1,9 +1,27 @@ -/** - * ABI lowering. +/* + * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. * - * @author Sebastian Hack - * @date 7.3.2005 - * @cvsid $Id$ + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + +/** + * @file + * @brief Backend ABI implementation. + * @author Sebastian Hack + * @version $Id$ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -31,11 +49,11 @@ #include "be.h" #include "beabi.h" -#include "bearch.h" +#include "bearch_t.h" #include "benode_t.h" #include "belive_t.h" #include "besched_t.h" -#include "beirg.h" +#include "beirg_t.h" #include "bessaconstr.h" typedef struct _be_abi_call_arg_t { @@ -1918,7 +1936,7 @@ void fix_call_state_inputs(be_abi_irg_t *env) { const arch_isa_t *isa = env->isa; int i, n, n_states; - const arch_register_t **stateregs = NEW_ARR_F(const arch_register_t*, 0); + arch_register_t **stateregs = NEW_ARR_F(arch_register_t*, 0); /* Collect caller save registers */ n = arch_isa_get_n_reg_class(isa); @@ -1928,7 +1946,7 @@ void fix_call_state_inputs(be_abi_irg_t *env) for(j = 0; j < cls->n_regs; ++j) { const arch_register_t *reg = arch_register_for_index(cls, j); if(arch_register_type_is(reg, state)) { - ARR_APP1(arch_register_t*, stateregs, reg); + ARR_APP1(arch_register_t*, stateregs, (arch_register_t *)reg); } } } @@ -2034,6 +2052,7 @@ be_abi_irg_t *be_abi_introduce(be_irg_t *birg) void be_abi_free(be_abi_irg_t *env) { + be_abi_call_free(env->call); free_survive_dce(env->dce_survivor); del_pset(env->ignore_regs); pmap_destroy(env->regs);