arm_new_nodes.h 4.53 KB
Newer Older
Michael Beck's avatar
Michael Beck committed
1
2
#ifndef _ARM_NEW_NODES_H_
#define _ARM_NEW_NODES_H_
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102

/**
 * Function prototypes for the assembler ir node constructors.
 * $Id$
 */

#include "arm_nodes_attr.h"
#include "bearch_arm_t.h"

/***************************************************************************************************
 *        _   _                   _       __        _                    _   _               _
 *       | | | |                 | |     / /       | |                  | | | |             | |
 *   __ _| |_| |_ _ __   ___  ___| |_   / /_ _  ___| |_   _ __ ___   ___| |_| |__   ___   __| |___
 *  / _` | __| __| '__| / __|/ _ \ __| / / _` |/ _ \ __| | '_ ` _ \ / _ \ __| '_ \ / _ \ / _` / __|
 * | (_| | |_| |_| |    \__ \  __/ |_ / / (_| |  __/ |_  | | | | | |  __/ |_| | | | (_) | (_| \__ \
 *  \__,_|\__|\__|_|    |___/\___|\__/_/ \__, |\___|\__| |_| |_| |_|\___|\__|_| |_|\___/ \__,_|___/
 *                                        __/ |
 *                                       |___/
 ***************************************************************************************************/

/**
 * Returns the attributes of an arm node.
 */
arm_attr_t *get_arm_attr(const ir_node *node);

/**
 * Returns the argument register requirements of an arm node.
 */
const arm_register_req_t **get_arm_in_req_all(const ir_node *node);

/**
 * Returns the result register requirements of an arm node.
 */
const arm_register_req_t **get_arm_out_req_all(const ir_node *node);

/**
 * Returns the argument register requirements of an arm node.
 */
const arm_register_req_t *get_arm_in_req(const ir_node *node, int pos);

/**
 * Returns the result register requirements of an arm node.
 */
const arm_register_req_t *get_arm_out_req(const ir_node *node, int pos);

/**
 * Sets the OUT register requirements at position pos.
 */
void set_arm_req_out(ir_node *node, const arm_register_req_t *req, int pos);

/**
 * Sets the complete OUT requirements of node.
 */
void set_arm_req_out_all(ir_node *node, const arm_register_req_t **reqs);

/**
 * Sets the IN register requirements at position pos.
 */
void set_arm_req_in(ir_node *node, const arm_register_req_t *req, int pos);

/**
 * Returns the register flag of an arm node.
 */
arch_irn_flags_t get_arm_flags(const ir_node *node);

/**
 * Sets the register flag of an arm node.
 */
void set_arm_flags(const ir_node *node, arch_irn_flags_t flags);

/**
 * Returns the result register slots of an arm node.
 */
const arch_register_t **get_arm_slots(const ir_node *node);

/**
 * Returns the name of the OUT register at position pos.
 */
const char *get_arm_out_reg_name(const ir_node *node, int pos);

/**
 * Returns the index of the OUT register at position pos within its register class.
 */
int get_arm_out_regnr(const ir_node *node, int pos);

/**
 * Returns the OUT register at position pos.
 */
const arch_register_t *get_arm_out_reg(const ir_node *node, int pos);

/**
 * Sets the number of results.
 */
void set_arm_n_res(ir_node *node, int n_res);

/**
 * Returns the number of results.
 */
int get_arm_n_res(const ir_node *node);

Michael Beck's avatar
Michael Beck committed
103
104
105
/**
 * Set the ARM machine node attributes to default values.
 */
106
void init_arm_attributes(ir_node *node, int flags, const arm_register_req_t ** in_reqs,
Michael Beck's avatar
Michael Beck committed
107
                         const arm_register_req_t ** out_reqs, int n_res);
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

ir_node *arm_new_NoReg_gp(arm_code_gen_t *cg);
ir_node *arm_new_NoReg_fp(arm_code_gen_t *cg);

/**
 * Returns the tarval
 */
tarval *get_arm_value(const ir_node *node);

/**
 * Sets the tarval
 */
void set_arm_value(ir_node *node, tarval *tv);

/**
 * Returns the proj num
 */
int get_arm_proj_num(const ir_node *node);

/**
 * Sets the proj num
 */
void set_arm_proj_num(ir_node *node, int proj_num);

const char *get_arm_symconst_label(ir_node *node);
void set_arm_symconst_label(ir_node *node, const char *symconst_label);

ir_node *new_r_arm_StoreStackMInc(ir_graph *irg, ir_node *block, ir_node *mem, ir_node *sp,
							      int n_regs, ir_node **regs, ir_mode *mode);

/**
 * Returns the number of projs.
 */
int get_arm_n_projs(ir_node *node);

/**
 * Sets the number of projs.
 */
void set_arm_n_projs(ir_node *node, int n_projs);

/**
 * Returns the default_proj_num.
 */
long get_arm_default_proj_num(ir_node *node);

/**
 * Sets the default_proj_num.
 */
void set_arm_default_proj_num(ir_node *node, long default_proj_num);

Michael Beck's avatar
Michael Beck committed
158
159
160
161
162
163
164
165
166
/**
 * Gets the shift modifier attribute.
 */
arm_shift_modifier get_arm_shift_modifier(ir_node *node);

/**
 * Decode an immediate with shifter operand
 */
unsigned int arm_decode_imm_w_shift(tarval *tv);
167
168
169
170

/* Include the generated headers */
#include "gen_arm_new_nodes.h"

Michael Beck's avatar
Michael Beck committed
171
#endif /* _ARM_NEW_NODES_H_ */