return NULL;
}
+static void abi_set_frame_entity(const void *_self, const ir_node *irn, entity *ent)
+{
+}
+
static void abi_set_stack_bias(const void *_self, ir_node *irn, int bias)
{
}
abi_classify,
abi_get_flags,
abi_get_frame_entity,
- abi_set_stack_bias
+ abi_set_frame_entity,
+ abi_set_stack_bias,
+ NULL, /* get_inverse */
+ NULL, /* get_op_estimated_cost */
+ NULL, /* possible_memory_operand */
+ NULL, /* perform_memory_operand */
};
static const arch_irn_handler_t abi_irn_handler = {
return ops->impl->get_frame_entity(ops, irn);
}
+void arch_set_frame_entity(const arch_env_t *env, ir_node *irn, entity *ent)
+{
+ const arch_irn_ops_t *ops = get_irn_ops(env, irn);
+ ops->impl->set_frame_entity(ops, irn, ent);
+}
+
arch_inverse_t *arch_get_inverse(const arch_env_t *env, const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obstack)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
*/
entity *(*get_frame_entity)(const void *self, const ir_node *irn);
+ /**
+ * Set the entity on the stack frame this node depends on.
+ * @param self The this pointer.
+ * @param irn The node in question.
+ * @param ent The entity to set
+ */
+ void (*set_frame_entity)(const void *self, const ir_node *irn, entity *ent);
+
/**
* Set the offset of a node carrying an entity on the stack frame.
* @param self The this pointer.
extern void arch_set_frame_offset(const arch_env_t *env, ir_node *irn, int bias);
extern entity *arch_get_frame_entity(const arch_env_t *env, ir_node *irn);
+extern void arch_set_frame_entity(const arch_env_t *env, ir_node *irn, entity *ent);
extern int arch_get_op_estimated_cost(const arch_env_t *env, const ir_node *irn);
extern arch_inverse_t *arch_get_inverse(const arch_env_t *env, const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obstack);
return be_get_frame_entity(irn);
}
+static void be_node_set_frame_entity(const void *self, const ir_node *irn, entity *ent)
+{
+ be_set_frame_entity(irn, ent);
+}
+
static void be_node_set_frame_offset(const void *self, ir_node *irn, int offset)
{
if(be_has_frame_entity(irn)) {
be_node_classify,
be_node_get_flags,
be_node_get_frame_entity,
- be_node_set_frame_offset
+ be_node_set_frame_entity,
+ be_node_set_frame_offset,
+ NULL, /* get_inverse */
+ NULL, /* get_op_estimated_cost */
+ NULL, /* possible_memory_operand */
+ NULL, /* perform_memory_operand */
};
static const arch_irn_ops_t be_node_irn_ops = {
return NULL;
}
+static void phi_set_frame_entity(const void *_self, const ir_node *irn, entity *ent)
+{
+}
+
static void phi_set_frame_offset(const void *_self, ir_node *irn, int bias)
{
}
phi_classify,
phi_get_flags,
phi_get_frame_entity,
- phi_set_frame_offset
+ phi_set_frame_entity,
+ phi_set_frame_offset,
+ NULL, /* get_inverse */
+ NULL, /* get_op_estimated_cost */
+ NULL, /* possible_memory_operand */
+ NULL, /* perform_memory_operand */
};
static const arch_irn_handler_t phi_irn_handler = {