X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2FTEMPLATE%2FTEMPLATE_transform.c;h=f345e3dbfd94d1a9ee7e7de9249730bc5fe79937;hb=93da909d12b7bec51aa36ee5f05966c331f90fb9;hp=0d0d220c8eaabca28b6e1307faf3719aca2f3db0;hpb=6981dd3274e6753e50f66c8cbe17b37bd41708e5;p=libfirm diff --git a/ir/be/TEMPLATE/TEMPLATE_transform.c b/ir/be/TEMPLATE/TEMPLATE_transform.c index 0d0d220c8..f345e3dbf 100644 --- a/ir/be/TEMPLATE/TEMPLATE_transform.c +++ b/ir/be/TEMPLATE/TEMPLATE_transform.c @@ -1,7 +1,29 @@ -/* The codegenrator (transform FIRM into TEMPLATE FIRM */ -/* $Id$ */ +/* + * Copyright (C) 1995-2008 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. + * + * 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 code selection (transform FIRM into TEMPLATE FIRM) + * @version $Id$ + */ #ifdef HAVE_CONFIG_H -#include +#include "config.h" #endif #include "irnode_t.h" @@ -11,7 +33,6 @@ #include "iredges.h" #include "irvrfy.h" #include "ircons.h" -#include "dbginfo.h" #include "iropt_t.h" #include "debug.h" @@ -19,7 +40,7 @@ #include "bearch_TEMPLATE_t.h" #include "TEMPLATE_nodes_attr.h" -#include "../arch/archop.h" /* we need this for Min and Max nodes */ +#include "archop.h" #include "TEMPLATE_transform.h" #include "TEMPLATE_new_nodes.h" #include "TEMPLATE_map_regs.h" @@ -192,22 +213,6 @@ static ir_node *gen_Shr(TEMPLATE_transform_env_t *env, ir_node *op1, ir_node *op -/** - * Creates an TEMPLATE RotL. - * - * @param dbg firm node dbg - * @param block the block the new node should belong to - * @param op1 first operator - * @param op2 second operator - * @param mode node mode - * @return the created TEMPLATE RotL node - */ -static ir_node *gen_RotL(TEMPLATE_transform_env_t *env, ir_node *op1, ir_node *op2) { - return new_rd_TEMPLATE_RotL(env->dbg, env->irg, env->block, op1, op2, env->mode); -} - - - /** * Transforms a Minus node. * @@ -303,10 +308,13 @@ static ir_node *gen_Store(TEMPLATE_transform_env_t *env) { * @param env the debug module */ void TEMPLATE_transform_node(ir_node *node, void *env) { +#ifdef DEBUG_libfirm TEMPLATE_code_gen_t *cgenv = (TEMPLATE_code_gen_t *)env; +#endif ir_opcode code = get_irn_opcode(node); ir_node *asm_node = NULL; TEMPLATE_transform_env_t tenv; + (void) env; if (is_Block(node)) return; @@ -315,7 +323,9 @@ void TEMPLATE_transform_node(ir_node *node, void *env) { tenv.dbg = get_irn_dbg_info(node); tenv.irg = current_ir_graph; tenv.irn = node; +#ifdef DEBUG_libfirm tenv.mod = cgenv->mod; +#endif tenv.mode = get_irn_mode(node); #define UNOP(a) case iro_##a: asm_node = gen_##a(&tenv, get_##a##_op(node)); break