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
77e1381e
Commit
77e1381e
authored
Apr 02, 2007
by
Matthias Braun
Browse files
fix TLS emitting
[r12643]
parent
a926c632
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_emitter.c
View file @
77e1381e
...
...
@@ -530,6 +530,14 @@ void ia32_emit_am(ia32_emit_env_t *env, const ir_node *node) {
if
(
is_ia32_am_sc_sign
(
node
))
be_emit_char
(
env
,
'-'
);
be_emit_ident
(
env
,
id
);
if
(
get_entity_owner
(
ent
)
==
get_tls_type
())
{
if
(
get_entity_visibility
(
ent
)
==
visibility_external_allocated
)
{
be_emit_cstring
(
env
,
"@INDNTPOFF"
);
}
else
{
be_emit_cstring
(
env
,
"@NTPOFF"
);
}
}
}
if
(
offs
!=
0
)
{
...
...
ir/be/ia32/ia32_new_nodes.c
View file @
77e1381e
...
...
@@ -39,46 +39,6 @@
#include "gen_ia32_regalloc_if.h"
#include "gen_ia32_machine.h"
/**
* Returns the ident of an entity
* @param ent The entity
* @return The ident of the entity
*/
ident
*
ia32_get_ent_ident
(
ir_entity
*
ent
)
{
ir_type
*
owner
=
get_entity_owner
(
ent
);
ident
*
id
=
get_entity_ld_ident
(
ent
);
if
(
owner
==
get_tls_type
())
{
if
(
get_entity_visibility
(
ent
)
==
visibility_external_allocated
)
id
=
mangle
(
id
,
new_id_from_chars
(
"@INDNTPOFF"
,
10
));
else
id
=
mangle
(
id
,
new_id_from_chars
(
"@NTPOFF"
,
7
));
}
return
id
;
}
#if 0
/**
* Returns the ident of a SymConst.
* @param symc The SymConst
* @return The ident of the SymConst
*/
static ident *get_sc_ident(ir_node *symc) {
switch (get_SymConst_kind(symc)) {
case symconst_addr_name:
return get_SymConst_name(symc);
case symconst_addr_ent:
return ia32_get_ent_ident(get_SymConst_entity(symc));
default:
assert(0 && "Unsupported SymConst");
}
return NULL;
}
#endif
/**
* returns true if a node has x87 registers
*/
...
...
ir/be/test/thread.c
View file @
77e1381e
...
...
@@ -6,7 +6,7 @@ __thread int tls_i[10];
__thread
int
tls_j
=
5
;
int
test
(
int
i
)
{
tls_j
=
i
;
tls_j
=
i
;
return
tls_i
[
i
];
}
...
...
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