Commit 61af57b1 authored by Matthias Braun's avatar Matthias Braun
Browse files

fix my last committ

[r13982]
parent 05b8d7e3
......@@ -223,7 +223,7 @@ static int TEMPLATE_dump_node(ir_node *n, FILE *F, dump_reason_t reason) {
const TEMPLATE_attr_t *get_TEMPLATE_attr_const(const ir_node *node) {
assert(is_TEMPLATE_irn(node) && "need TEMPLATE node to get attributes");
return (TEMPLATE_attr_t *)get_irn_generic_attr(node);
return (const TEMPLATE_attr_t *)get_irn_generic_attr_const(node);
}
TEMPLATE_attr_t *get_TEMPLATE_attr(ir_node *node) {
......@@ -290,7 +290,7 @@ 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) {
void set_TEMPLATE_flags(ir_node *node, arch_irn_flags_t flags) {
TEMPLATE_attr_t *attr = get_TEMPLATE_attr(node);
attr->flags = flags;
}
......@@ -298,8 +298,16 @@ 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) {
const TEMPLATE_attr_t *attr = get_TEMPLATE_attr_const(node);
const arch_register_t **get_TEMPLATE_slots(ir_node *node) {
TEMPLATE_attr_t *attr = get_TEMPLATE_attr_const(node);
return attr->slots;
}
/**
* Returns the result register slots of an TEMPLATE node.
*/
const arch_register_t * const *get_TEMPLATE_slots_const(const ir_node *node) {
TEMPLATE_attr_t *attr = get_TEMPLATE_attr_const(node);
return attr->slots;
}
......
......@@ -41,7 +41,9 @@
/**
* Returns the attributes of an TEMPLATE node.
*/
TEMPLATE_attr_t *get_TEMPLATE_attr(const ir_node *node);
TEMPLATE_attr_t *get_TEMPLATE_attr(ir_node *node);
const TEMPLATE_attr_t *get_TEMPLATE_attr_const(const ir_node *node);
/**
* Returns the argument register requirements of an TEMPLATE node.
......@@ -81,12 +83,14 @@ 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);
void set_TEMPLATE_flags(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);
const arch_register_t **get_TEMPLATE_slots(ir_node *node);
const arch_register_t * const *get_TEMPLATE_slots_const(const ir_node *node);
/**
* Returns the name of the OUT register at position pos.
......
......@@ -134,7 +134,9 @@ static void TEMPLATE_set_irn_reg(const void *self, ir_node *irn, const arch_regi
}
}
static const arch_register_t *TEMPLATE_get_irn_reg(const void *self, const ir_node *irn) {
static
const arch_register_t *TEMPLATE_get_irn_reg(const void *self,
const ir_node *irn) {
int pos = 0;
const arch_register_t *reg = NULL;
......@@ -144,8 +146,8 @@ static const arch_register_t *TEMPLATE_get_irn_reg(const void *self, const ir_no
}
if (is_TEMPLATE_irn(irn)) {
const arch_register_t **slots;
slots = get_TEMPLATE_slots(irn);
const arch_register_t * const *slots;
slots = get_TEMPLATE_slots_const(irn);
reg = slots[pos];
}
else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment