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
341f402f
Commit
341f402f
authored
Jan 18, 2013
by
Matthias Braun
Browse files
block labels are not PIC affected
parent
eefa1524
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/beabi.c
View file @
341f402f
...
...
@@ -1705,6 +1705,9 @@ static void fix_pic_symconsts(ir_node *node, void *data)
trampoline
);
set_irn_n
(
node
,
i
,
trampoline_const
);
continue
;
}
else
if
(
get_entity_type
(
entity
)
==
get_code_type
())
{
/* block labels can always be addressed directly */
continue
;
}
/* everything else is accessed relative to EIP */
...
...
ir/be/ia32/ia32_emitter.c
View file @
341f402f
...
...
@@ -198,7 +198,7 @@ static void ia32_emit_entity(ir_entity *entity, int no_pic_adjust)
}
}
if
(
do_pic
&&
!
no_pic_adjust
)
{
if
(
do_pic
&&
!
no_pic_adjust
&&
get_entity_type
(
entity
)
!=
get_code_type
()
)
{
be_emit_char
(
'-'
);
be_emit_string
(
pic_base_label
);
}
...
...
ir/tr/entity.c
View file @
341f402f
...
...
@@ -992,10 +992,13 @@ int entity_is_externally_visible(const ir_entity *entity)
int
entity_has_definition
(
const
ir_entity
*
entity
)
{
if
(
is_method_entity
(
entity
))
{
switch
(
entity
->
entity_kind
)
{
case
IR_ENTITY_METHOD
:
return
get_entity_irg
(
entity
)
!=
NULL
&&
(
get_entity_linkage
(
entity
)
&
IR_LINKAGE_NO_CODEGEN
)
==
0
;
}
else
{
case
IR_ENTITY_LABEL
:
return
true
;
default:
return
entity
->
initializer
!=
NULL
;
}
}
...
...
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