d5b5434d204d9b56537903c7544214c64495c421
[libfirm] / ir / be / sparc / sparc_new_nodes.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   Function prototypes for the assembler ir node constructors.
23  * @version $Id$
24  */
25 #ifndef FIRM_BE_SPARC_SPARC_NEW_NODES_H
26 #define FIRM_BE_SPARC_SPARC_NEW_NODES_H
27
28 #include "sparc_nodes_attr.h"
29
30 /**
31  * Returns the attributes of an sparc node.
32  */
33 sparc_attr_t *get_sparc_attr(ir_node *node);
34 const sparc_attr_t *get_sparc_attr_const(const ir_node *node);
35
36 sparc_load_store_attr_t *get_sparc_load_store_attr(ir_node *node);
37 const sparc_load_store_attr_t *get_sparc_load_store_attr_const(const ir_node *node);
38
39 sparc_symconst_attr_t *get_sparc_symconst_attr(ir_node *node);
40 const sparc_symconst_attr_t *get_sparc_symconst_attr_const(const ir_node *node);
41
42 sparc_jmp_cond_attr_t *get_sparc_jmp_cond_attr(ir_node *node);
43 const sparc_jmp_cond_attr_t *get_sparc_jmp_cond_attr_const(const ir_node *node);
44
45 sparc_jmp_switch_attr_t *get_sparc_jmp_switch_attr(ir_node *node);
46 const sparc_jmp_switch_attr_t *get_sparc_jmp_switch_attr_const(const ir_node *node);
47
48 sparc_cmp_attr_t *get_sparc_cmp_attr(ir_node *node);
49 const sparc_cmp_attr_t *get_sparc_cmp_attr_const(const ir_node *node);
50
51 sparc_save_attr_t *get_sparc_save_attr(ir_node *node);
52 const sparc_save_attr_t *get_sparc_save_attr_const(const ir_node *node);
53
54 /**
55  * Returns the argument register requirements of an sparc node.
56  */
57 const arch_register_req_t **get_sparc_in_req_all(const ir_node *node);
58
59 /**
60  * Returns the argument register requirements of an sparc node.
61  */
62 const arch_register_req_t *get_sparc_in_req(const ir_node *node, int pos);
63
64 /**
65  * Sets the IN register requirements at position pos.
66  */
67 void set_sparc_req_in(ir_node *node, const arch_register_req_t *req, int pos);
68
69
70 /**
71  * Returns the proj num
72  */
73 int get_sparc_jmp_cond_proj_num(const ir_node *node);
74
75 /**
76  * Sets the proj num
77  */
78 void set_sparc_jmp_cond_proj_num(ir_node *node, int proj_num);
79
80
81 /**
82  * Returns the number of projs of a SwitchJmp.
83  */
84 int get_sparc_jmp_switch_n_projs(const ir_node *node);
85
86 /**
87  * Sets the number of projs of a SwitchJmp.
88  */
89 void set_sparc_jmp_switch_n_projs(ir_node *node, int n_projs);
90
91 /**
92  * Returns the default_proj_num.
93  */
94 long get_sparc_jmp_switch_default_proj_num(const ir_node *node);
95
96 /**
97  * Sets the default_proj_num.
98  */
99 void set_sparc_jmp_switch_default_proj_num(ir_node *node, long default_proj_num);
100
101 /* Include the generated headers */
102 #include "gen_sparc_new_nodes.h"
103
104 #endif