ff0fe9a347130ba2e4607ed7a37f2e7044fb0080
[libfirm] / ir / be / amd64 / bearch_amd64_t.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
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.
10  *
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.
14  *
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
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   declarations for TEMPALTE backend -- private header
23  * @version $Id: bearch_amd64_t.h 26542 2009-09-18 09:18:32Z matze $
24  */
25 #ifndef FIRM_BE_amd64_BEARCH_amd64_T_H
26 #define FIRM_BE_amd64_BEARCH_amd64_T_H
27
28 #include "debug.h"
29 #include "amd64_nodes_attr.h"
30 #include "be.h"
31 #include "../beemitter.h"
32 #include "set.h"
33
34 typedef struct amd64_isa_t            amd64_isa_t;
35 typedef struct amd64_code_gen_t       amd64_code_gen_t;
36 typedef struct amd64_transform_env_t  amd64_transform_env_t;
37
38 struct amd64_code_gen_t {
39         const arch_code_generator_if_t *impl;           /**< implementation */
40         ir_graph                       *irg;            /**< current irg */
41         amd64_isa_t                    *isa;            /**< the isa instance */
42         char                            dump;           /**< set to 1 if graphs should be dumped */
43         ir_node                        *noreg_gp;       /**< unique NoReg_GP node */
44 };
45
46 struct amd64_isa_t {
47         arch_env_t  base;      /**< must be derived from arch_isa */
48 };
49
50 /**
51  * this is a struct to minimize the number of parameters
52  * for transformation walker
53  */
54 struct amd64_transform_env_t {
55         dbg_info *dbg;      /**< The node debug info */
56         ir_graph *irg;      /**< The irg, the node should be created in */
57         ir_node  *block;    /**< The block, the node should belong to */
58         ir_node  *irn;      /**< The irn, to be transformed */
59         ir_mode  *mode;     /**< The mode of the irn */
60 };
61
62 ir_node *amd64_new_NoReg_gp(amd64_code_gen_t *cg);
63
64 #endif