2 * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
6 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the
9 * packaging of this file.
11 * Licensees holding valid libFirm Professional Edition licenses may use
12 * this file in accordance with the libFirm Commercial License.
13 * Agreement provided with the Software.
15 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 #ifndef FIRM_BE_IA32_BEARCH_TEMPLATE_T_H
20 #define FIRM_BE_IA32_BEARCH_TEMPLATE_T_H
23 #include "bearch_TEMPLATE.h"
24 #include "TEMPLATE_nodes_attr.h"
26 #include "../beemitter.h"
29 typedef struct TEMPLATE_isa_t TEMPLATE_isa_t;
30 typedef struct TEMPLATE_code_gen_t TEMPLATE_code_gen_t;
31 typedef struct TEMPLATE_irn_ops_t TEMPLATE_irn_ops_t;
32 typedef struct TEMPLATE_transform_env_t TEMPLATE_transform_env_t;
34 struct TEMPLATE_code_gen_t {
35 const arch_code_generator_if_t *impl; /**< implementation */
36 ir_graph *irg; /**< current irg */
37 const arch_env_t *arch_env; /**< the arch env */
38 set *reg_set; /**< set to memorize registers for FIRM nodes (e.g. phi) */
39 TEMPLATE_isa_t *isa; /**< the isa instance */
40 const be_irg_t *birg; /**< The be-irg (contains additional information about the irg) */
41 DEBUG_ONLY(firm_dbg_module_t *mod;) /**< debugging module */
44 struct TEMPLATE_isa_t {
45 arch_isa_t arch_isa; /**< must be derived from arch_isa */
46 be_emit_env_t emit; /**< emit datastructure */
49 struct TEMPLATE_irn_ops_t {
50 const arch_irn_ops_if_t *impl;
51 TEMPLATE_code_gen_t *cg;
55 * this is a struct to minimize the number of parameters
56 * for transformation walker
58 struct TEMPLATE_transform_env_t {
59 dbg_info *dbg; /**< The node debug info */
60 ir_graph *irg; /**< The irg, the node should be created in */
61 ir_node *block; /**< The block, the node should belong to */
62 ir_node *irn; /**< The irn, to be transformed */
63 ir_mode *mode; /**< The mode of the irn */
64 DEBUG_ONLY(firm_dbg_module_t *mod;) /**< The firm debugger */