Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
d6b7e949
Commit
d6b7e949
authored
Aug 11, 2006
by
Christian Würdig
Browse files
added new callback to set frame entity
parent
a4cf97f9
Changes
4
Hide whitespace changes
Inline
Side-by-side
ir/be/beabi.c
View file @
d6b7e949
...
...
@@ -1992,6 +1992,10 @@ static entity *abi_get_frame_entity(const void *_self, const ir_node *irn)
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
)
{
}
...
...
@@ -2003,7 +2007,12 @@ static const arch_irn_ops_if_t abi_irn_ops = {
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
=
{
...
...
ir/be/bearch.c
View file @
d6b7e949
...
...
@@ -107,6 +107,12 @@ entity *arch_get_frame_entity(const arch_env_t *env, ir_node *irn)
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
);
...
...
ir/be/bearch.h
View file @
d6b7e949
...
...
@@ -280,6 +280,14 @@ struct _arch_irn_ops_if_t {
*/
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.
...
...
@@ -343,6 +351,7 @@ struct _arch_irn_ops_t {
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
);
...
...
ir/be/benode.c
View file @
d6b7e949
...
...
@@ -1082,6 +1082,11 @@ static entity *be_node_get_frame_entity(const void *self, const ir_node *irn)
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
))
{
...
...
@@ -1106,7 +1111,12 @@ static const arch_irn_ops_if_t be_node_irn_ops_if = {
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
=
{
...
...
@@ -1226,6 +1236,10 @@ static entity *phi_get_frame_entity(const void *_self, const ir_node *irn)
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
)
{
}
...
...
@@ -1237,7 +1251,12 @@ static const arch_irn_ops_if_t phi_irn_ops = {
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
=
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment