X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbearch.c;h=e9561dd883599ba7f9e9aa610eca4996b8c18c02;hb=f8133875ddf70372c10a52b7266f3d04e8129486;hp=101c6e4c6faf8a5769deb395c7fafacb1ce3bb38;hpb=863d31d7a5c8210432fef88b30fc3e8353131538;p=libfirm diff --git a/ir/be/bearch.c b/ir/be/bearch.c index 101c6e4c6..e9561dd88 100644 --- a/ir/be/bearch.c +++ b/ir/be/bearch.c @@ -1,31 +1,41 @@ -/** - * Processor architecture specification. - * @author Sebastian Hack - * @date 11.2.2005 +/* + * 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. * - * $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 Processor architecture specification. + * @author Sebastian Hack + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#ifdef HAVE_ALLOCA_H -#include -#endif - -#ifdef HAVE_MALLOC_H -#include -#endif - #include -#include "bearch.h" +#include "bearch_t.h" #include "ircons_t.h" #include "irnode_t.h" +#include "xmalloc.h" #include "bitset.h" #include "pset.h" -#include "entity.h" #include "raw_bitset.h" #include "irprintf.h" @@ -105,7 +115,7 @@ void arch_set_frame_offset(const arch_env_t *env, ir_node *irn, int offset) ops->impl->set_frame_offset(ops, irn, offset); } -ir_entity *arch_get_frame_entity(const arch_env_t *env, ir_node *irn) +ir_entity *arch_get_frame_entity(const arch_env_t *env, const ir_node *irn) { const arch_irn_ops_t *ops = get_irn_ops(env, irn); return ops->impl->get_frame_entity(ops, irn); @@ -318,13 +328,13 @@ extern char *arch_register_req_format(char *buf, size_t len, } if(arch_register_req_is(req, should_be_same)) { - const ir_node *same = get_irn_n(node, req->other_same); + const ir_node *same = get_irn_n(skip_Proj_const(node), req->other_same); ir_snprintf(tmp, sizeof(tmp), " same to: %+F", same); strncat(buf, tmp, len); } if(arch_register_req_is(req, should_be_different)) { - const ir_node *different = get_irn_n(node, req->other_different); + const ir_node *different = get_irn_n(skip_Proj_const(node), req->other_different); ir_snprintf(tmp, sizeof(tmp), " different to: %+F", different); strncat(buf, tmp, len); }