2 * Copyright (C) 1995-2008 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
22 * @brief declarations for SPARC backend -- private header
25 #ifndef FIRM_BE_SPARC_BEARCH_TEMPLATE_T_H
26 #define FIRM_BE_SPARC_BEARCH_TEMPLATE_T_H
29 #include "sparc_nodes_attr.h"
31 #include "../beemitter.h"
34 // sparc ABI requires a min stacksize to
35 // save registers in case of a trap etc.
36 // by now we assume only non-leaf procedures: 92 + 4 (padding)
37 #define SPARC_MIN_STACKSIZE 112
39 typedef struct sparc_transform_env_t sparc_transform_env_t;
40 typedef struct _sparc_isa_t sparc_isa_t;
42 typedef struct _sparc_code_gen_t {
43 const arch_code_generator_if_t *impl; /**< implementation */
44 ir_graph *irg; /**< current irg */
45 set *reg_set; /**< set to memorize registers for FIRM nodes (e.g. phi) */
46 sparc_isa_t *isa; /**< the isa instance */
47 char dump; /**< set to 1 if graphs should be dumped */
52 arch_env_t base; /**< must be derived from arch_env_t */
53 sparc_code_gen_t *cg; /**< current code generator */
58 * this is a struct to minimize the number of parameters
59 * for transformation walker
61 struct sparc_transform_env_t {
62 dbg_info *dbg; /**< The node debug info */
63 ir_graph *irg; /**< The irg, the node should be created in */
64 ir_node *block; /**< The block, the node should belong to */
65 ir_node *irn; /**< The irn, to be transformed */
66 ir_mode *mode; /**< The mode of the irn */
69 void sparc_finish_irg(sparc_code_gen_t *cg);