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
4b9bb36a
Commit
4b9bb36a
authored
Nov 22, 2014
by
Matthias Braun
Browse files
remove arch_get_frame_entity()
Add callbacks on functions that really need them instead.
parent
5232416f
Changes
21
Show whitespace changes
Inline
Side-by-side
ir/be/sparc/sparc_stackframe.c
View file @
4b9bb36a
...
...
@@ -64,6 +64,26 @@ static void set_irn_sp_bias(ir_node *node, int new_bias)
}
}
ir_entity
*
sparc_get_frame_entity
(
const
ir_node
*
node
)
{
if
(
be_is_MemPerm
(
node
))
return
be_get_MemPerm_in_entity
(
node
,
0
);
if
(
is_sparc_FrameAddr
(
node
))
{
const
sparc_attr_t
*
attr
=
get_sparc_attr_const
(
node
);
return
attr
->
immediate_value_entity
;
}
if
(
sparc_has_load_store_attr
(
node
))
{
const
sparc_load_store_attr_t
*
load_store_attr
=
get_sparc_load_store_attr_const
(
node
);
if
(
load_store_attr
->
is_frame_entity
)
{
return
load_store_attr
->
base
.
immediate_value_entity
;
}
}
return
NULL
;
}
static
void
process_bias
(
ir_node
*
block
,
bool
sp_relative
,
int
bias
,
int
free_bytes
)
{
...
...
@@ -74,7 +94,7 @@ static void process_bias(ir_node *block, bool sp_relative, int bias,
int
irn_bias
;
/* set bias to nodes with entities */
ir_entity
*
entity
=
arc
h
_get_frame_entity
(
irn
);
ir_entity
*
entity
=
sp
arc_get_frame_entity
(
irn
);
if
(
entity
!=
NULL
)
{
int
offset
=
get_entity_offset
(
entity
);
if
(
sp_relative
)
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
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