TEMPLATE_new_nodes.h 3.79 KB
Newer Older
Christian Würdig's avatar
Christian Würdig committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
 *
 * This file is part of libFirm.
 *
 * This file may be distributed and/or modified under the terms of the
 * GNU General Public License version 2 as published by the Free Software
 * Foundation and appearing in the file LICENSE.GPL included in the
 * packaging of this file.
 *
 * Licensees holding valid libFirm Professional Edition licenses may use
 * this file in accordance with the libFirm Commercial License.
 * Agreement provided with the Software.
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE.
 */

20
/**
Matthias Braun's avatar
Matthias Braun committed
21
22
23
 * @file
 * @brief   Function prototypes for the assembler ir node constructors.
 * @version $Id$
24
 */
Matthias Braun's avatar
Matthias Braun committed
25
26
#ifndef FIRM_BE_TEMPALTE_TEMPLATE_NEW_NODES_H
#define FIRM_BE_TEMPLATE_TEMPLATE_NEW_NODES_H
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

#include "TEMPLATE_nodes_attr.h"

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

/**
 * Returns the attributes of an TEMPLATE node.
 */
Christian Würdig's avatar
Christian Würdig committed
44
TEMPLATE_attr_t *get_TEMPLATE_attr(const ir_node *node);
45
46
47
48

/**
 * Returns the argument register requirements of an TEMPLATE node.
 */
Matthias Braun's avatar
Matthias Braun committed
49
const arch_register_req_t **get_TEMPLATE_in_req_all(const ir_node *node);
50
51
52
53

/**
 * Returns the result register requirements of an TEMPLATE node.
 */
Matthias Braun's avatar
Matthias Braun committed
54
const arch_register_req_t **get_TEMPLATE_out_req_all(const ir_node *node);
55
56
57
58

/**
 * Returns the argument register requirements of an TEMPLATE node.
 */
Matthias Braun's avatar
Matthias Braun committed
59
const arch_register_req_t *get_TEMPLATE_in_req(const ir_node *node, int pos);
60
61
62
63

/**
 * Returns the result register requirements of an TEMPLATE node.
 */
Matthias Braun's avatar
Matthias Braun committed
64
const arch_register_req_t *get_TEMPLATE_out_req(const ir_node *node, int pos);
65
66
67
68

/**
 * Sets the OUT register requirements at position pos.
 */
Matthias Braun's avatar
Matthias Braun committed
69
void set_TEMPLATE_req_out(ir_node *node, const arch_register_req_t *req, int pos);
70
71
72
73

/**
 * Sets the IN register requirements at position pos.
 */
Matthias Braun's avatar
Matthias Braun committed
74
void set_TEMPLATE_req_in(ir_node *node, const arch_register_req_t *req, int pos);
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

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

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

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

/**
 * Returns the name of the OUT register at position pos.
 */
const char *get_TEMPLATE_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_TEMPLATE_out_regnr(const ir_node *node, int pos);

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

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

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


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

Matthias Braun's avatar
Matthias Braun committed
120
#endif