return NULL;
}
+static void TEMPLATE_set_frame_entity(const void *self, const ir_node *irn, entity *ent) {
+ /* TODO: set the entity assigned to the frame */
+}
+
/**
* This function is called by the generic backend to correct offsets for
* nodes accessing the stack.
TEMPLATE_classify,
TEMPLATE_get_flags,
TEMPLATE_get_frame_entity,
+ TEMPLATE_set_frame_entity,
TEMPLATE_set_stack_bias
+ NULL, /* get_inverse */
+ NULL, /* get_op_estimated_cost */
+ NULL, /* possible_memory_operand */
+ NULL, /* perform_memory_operand */
};
TEMPLATE_irn_ops_t TEMPLATE_irn_ops = {
entity *ent = be_get_frame_entity(n);
offset = get_entity_offset_bytes(ent);
} else if (irn_op == op_be_Reload || irn_op == op_be_Spill) {
- entity * ent = be_get_spill_entity(n);
+ entity *ent = be_get_frame_entity(n);
offset = get_entity_offset_bytes(ent);
} else if (irn_op == op_be_IncSP) {
int offs = be_get_IncSP_offset(n);
return NULL;
}
+static void arm_set_frame_entity(const void *self, const ir_node *irn, entity *ent) {
+ /* TODO: set the entity assigned to the frame */
+}
+
/**
* This function is called by the generic backend to correct offsets for
* nodes accessing the stack.
arm_classify,
arm_get_flags,
arm_get_frame_entity,
+ arm_set_frame_entity,
arm_set_stack_bias,
- NULL
+ NULL, /* get_inverse */
+ NULL, /* get_op_estimated_cost */
+ NULL, /* possible_memory_operand */
+ NULL, /* perform_memory_operand */
};
arm_irn_ops_t arm_irn_ops = {
return NULL;
}
+static void firm_set_frame_entity(const void *self, const ir_node *irn, entity *ent)
+{
+}
+
static const arch_irn_ops_if_t firm_irn_ops_if = {
firm_get_irn_reg_req,
firm_set_irn_reg,
firm_classify,
firm_get_flags,
firm_get_frame_entity,
- firm_set_stack_bias
+ firm_set_frame_entity,
+ firm_set_stack_bias,
+ NULL, /* get_inverse */
+ NULL, /* get_op_estimated_cost */
+ NULL, /* possible_memory_operand */
+ NULL, /* perform_memory_operand */
};
static const arch_irn_ops_t firm_irn_ops = {
return NULL;
}
+static void mips_set_frame_entity(const void *self, const ir_node *irn, entity *ent) {
+ mips_attr_t *attr = get_mips_attr(irn);
+ assert(is_mips_load_r(irn) || is_mips_store_r(irn));
+ attr->stack_entity = ent;
+}
+
/**
* This function is called by the generic backend to correct offsets for
* nodes accessing the stack.
mips_classify,
mips_get_flags,
mips_get_frame_entity,
+ mips_set_frame_entity,
mips_set_frame_offset,
- NULL
+ NULL, /* get_inverse */
+ NULL, /* get_op_estimated_cost */
+ NULL, /* possible_memory_operand */
+ NULL, /* perform_memory_operand */
};
mips_irn_ops_t mips_irn_ops = {
// test all nodes in the ready set and take the first non-branch that
// is allowed
for (node = nodeset_first(ready_set); node != NULL; node = nodeset_next(ready_set)) {
- if (arch_irn_classify(arch_env, node) == arch_irn_class_branch) {
+ if (arch_irn_class_is(arch_env, node, branch)) {
if (is_irn_forking(node))
condjmp = node;
continue;
return condjmp;
}
node = nodeset_first(ready_set);
- assert(arch_irn_classify(arch_env, node) == arch_irn_class_branch);
+ assert(arch_irn_class_is(arch_env, node, branch));
nodeset_break(ready_set);
return node;
}
return get_ppc32_frame_entity(irn);
}
+static void ppc32_set_frame_entity(const void *self, const ir_node *irn, entity *ent) {
+ if (! is_ppc32_irn(irn) || get_ppc32_type(irn) != ppc32_ac_FrameEntity)
+ return;
+ set_ppc32_frame_entity(irn, ent);
+}
+
/**
* This function is called by the generic backend to correct offsets for
* nodes accessing the stack.
ppc32_classify,
ppc32_get_flags,
ppc32_get_frame_entity,
+ ppc32_set_frame_entity,
ppc32_set_stack_bias,
- NULL
+ NULL, /* get_inverse */
+ NULL, /* get_op_estimated_cost */
+ NULL, /* possible_memory_operand */
+ NULL, /* perform_memory_operand */
};
ppc32_irn_ops_t ppc32_irn_ops = {