projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rework linkage types in firm.
[libfirm]
/
ir
/
be
/
ia32
/
ia32_common_transform.c
diff --git
a/ir/be/ia32/ia32_common_transform.c
b/ir/be/ia32/ia32_common_transform.c
index
7beb0d6
..
44f69e0
100644
(file)
--- a/
ir/be/ia32/ia32_common_transform.c
+++ b/
ir/be/ia32/ia32_common_transform.c
@@
-93,9
+93,7
@@
static ir_type *ia32_get_prim_type(pmap *types, ir_mode *mode)
ir_type *res;
if (! e) {
ir_type *res;
if (! e) {
- char buf[64];
- snprintf(buf, sizeof(buf), "prim_type_%s", get_mode_name(mode));
- res = new_type_primitive(new_id_from_str(buf), mode);
+ res = new_type_primitive(mode);
if (get_mode_size_bits(mode) >= 80) {
set_type_alignment_bytes(res, 16);
}
if (get_mode_size_bits(mode) >= 80) {
set_type_alignment_bytes(res, 16);
}
@@
-145,9
+143,7
@@
ir_entity *create_float_const_entity(ir_node *cnst)
res = new_entity(get_glob_type(), ia32_unique_id(".LC%u"), tp);
set_entity_ld_ident(res, get_entity_ident(res));
res = new_entity(get_glob_type(), ia32_unique_id(".LC%u"), tp);
set_entity_ld_ident(res, get_entity_ident(res));
- set_entity_visibility(res, visibility_local);
- set_entity_variability(res, variability_constant);
- set_entity_allocation(res, allocation_static);
+ set_entity_linkage(res, IR_LINKAGE_LOCAL | IR_LINKAGE_CONSTANT);
/* we create a new entity here: It's initialization must resist on the
const code irg */
/* we create a new entity here: It's initialization must resist on the
const code irg */
@@
-473,6
+469,7
@@
ir_node *gen_ASM(ir_node *node)
int clobbers_flags = 0;
unsigned clobber_bits[N_CLASSES];
int out_size;
int clobbers_flags = 0;
unsigned clobber_bits[N_CLASSES];
int out_size;
+ backend_info_t *info;
memset(&clobber_bits, 0, sizeof(clobber_bits));
memset(&clobber_bits, 0, sizeof(clobber_bits));
@@
-651,7
+648,7
@@
ir_node *gen_ASM(ir_node *node)
++out_idx;
}
++out_idx;
}
- /* Attempt to make ASM node register pressure faithful
l
.
+ /* Attempt to make ASM node register pressure faithful.
* (This does not work for complicated cases yet!)
*
* Algorithm: Check if there are fewer inputs or outputs (I will call this
* (This does not work for complicated cases yet!)
*
* Algorithm: Check if there are fewer inputs or outputs (I will call this
@@
-780,7
+777,10
@@
ir_node *gen_ASM(ir_node *node)
if (arity == 0)
be_dep_on_frame(new_node);
if (arity == 0)
be_dep_on_frame(new_node);
- set_ia32_out_req_all(new_node, out_reg_reqs);
+ info = be_get_info(new_node);
+ for (i = 0; i < out_arity; ++i) {
+ info->out_infos[i].req = out_reg_reqs[i];
+ }
set_ia32_in_req_all(new_node, in_reg_reqs);
SET_IA32_ORIG_NODE(new_node, node);
set_ia32_in_req_all(new_node, in_reg_reqs);
SET_IA32_ORIG_NODE(new_node, node);