Commit 1a7fa9fb authored by Matthias Braun's avatar Matthias Braun
Browse files

sparc: remove entity_sign, gas/elf doesn't support it anyway

[r27950]
parent 044ec2b3
......@@ -186,7 +186,7 @@ static void transform_Reload(ir_node *node)
ir_node *sched_point = sched_prev(node);
load = new_bd_sparc_Ld(dbgi, block, ptr, mem, mode, entity, false, 0, true);
load = new_bd_sparc_Ld(dbgi, block, ptr, mem, mode, entity, 0, true);
sched_add_after(sched_point, load);
sched_remove(node);
......@@ -214,7 +214,7 @@ static void transform_Spill(ir_node *node)
ir_node *store;
sched_point = sched_prev(node);
store = new_bd_sparc_St(dbgi, block, ptr, val, mem, mode, entity, false, 0, true);
store = new_bd_sparc_St(dbgi, block, ptr, val, mem, mode, entity, 0, true);
sched_remove(node);
sched_add_after(sched_point, store);
......
......@@ -113,8 +113,7 @@ static void sparc_dump_node(FILE *F, ir_node *n, dump_reason_t reason)
if (sparc_has_load_store_attr(n)) {
const sparc_load_store_attr_t *attr = get_sparc_load_store_attr_const(n);
ir_fprintf(F, "load store mode: %+F\n", attr->load_store_mode);
ir_fprintf(F, "entity: (sign %d) %+F\n", attr->entity_sign,
attr->entity);
ir_fprintf(F, "entity: %+F\n", attr->entity);
fprintf(F, "offset: %ld\n", attr->offset);
fprintf(F, "is frame entity: %s\n",
attr->is_frame_entity ? "true" : "false");
......@@ -339,13 +338,11 @@ static void init_sparc_attributes(ir_node *node, arch_irn_flags_t flags,
static void init_sparc_load_store_attributes(ir_node *res, ir_mode *ls_mode,
ir_entity *entity,
int entity_sign, long offset,
bool is_frame_entity)
long offset, bool is_frame_entity)
{
sparc_load_store_attr_t *attr = get_sparc_load_store_attr(res);
attr->load_store_mode = ls_mode;
attr->entity = entity;
attr->entity_sign = entity_sign;
attr->is_frame_entity = is_frame_entity;
attr->offset = offset;
}
......@@ -417,7 +414,6 @@ static int cmp_attr_sparc_load_store(ir_node *a, ir_node *b)
return 1;
return attr_a->entity != attr_b->entity
|| attr_a->entity_sign != attr_b->entity_sign
|| attr_a->is_frame_entity != attr_b->is_frame_entity
|| attr_a->load_store_mode != attr_b->load_store_mode
|| attr_a->offset != attr_b->offset;
......
......@@ -80,7 +80,6 @@ struct sparc_load_store_attr_t {
sparc_attr_t base; /**< generic attribute */
ir_mode *load_store_mode;
ir_entity *entity;
int entity_sign;
long offset;
bool is_frame_entity;
};
......
......@@ -147,7 +147,7 @@ $default_copy_attr = "sparc_copy_attr";
%init_attr = (
sparc_attr_t => "\tinit_sparc_attributes(res, flags, in_reqs, exec_units, n_res);",
sparc_load_store_attr_t => "\tinit_sparc_attributes(res, flags, in_reqs, exec_units, n_res);\n".
"\tinit_sparc_load_store_attributes(res, ls_mode, entity, entity_sign, offset, is_frame_entity);",
"\tinit_sparc_load_store_attributes(res, ls_mode, entity, offset, is_frame_entity);",
sparc_symconst_attr_t => "\tinit_sparc_attributes(res, flags, in_reqs, exec_units, n_res);\n".
"\tinit_sparc_symconst_attributes(res, entity);",
sparc_jmp_cond_attr_t => "\tinit_sparc_attributes(res, flags, in_reqs, exec_units, n_res);",
......@@ -283,7 +283,7 @@ Ld => {
outs => [ "res", "M" ],
ins => [ "ptr", "mem" ],
attr_type => "sparc_load_store_attr_t",
attr => "ir_mode *ls_mode, ir_entity *entity, int entity_sign, long offset, bool is_frame_entity",
attr => "ir_mode *ls_mode, ir_entity *entity, long offset, bool is_frame_entity",
emit => '. ld%LM [%S1%O], %D1'
},
......@@ -312,7 +312,7 @@ St => {
ins => [ "ptr", "val", "mem" ],
outs => [ "M" ],
attr_type => "sparc_load_store_attr_t",
attr => "ir_mode *ls_mode, ir_entity *entity, int entity_sign, long offset, bool is_frame_entity",
attr => "ir_mode *ls_mode, ir_entity *entity, long offset, bool is_frame_entity",
emit => '. st%SM %S2, [%S1%O]'
},
......@@ -697,7 +697,7 @@ Ldf => {
ins => [ "ptr", "mem" ],
outs => [ "res", "M" ],
attr_type => "sparc_load_store_attr_t",
attr => "ir_mode *ls_mode, ir_entity *entity, int entity_sign, long offset, bool is_frame_entity",
attr => "ir_mode *ls_mode, ir_entity *entity, long offset, bool is_frame_entity",
emit => '. ld%FLSM [%S1%O], %D1'
},
......@@ -718,7 +718,7 @@ Stf => {
ins => [ "ptr", "val", "mem" ],
outs => [ "M" ],
attr_type => "sparc_load_store_attr_t",
attr => "ir_mode *ls_mode, ir_entity *entity, int entity_sign, long offset, bool is_frame_entity",
attr => "ir_mode *ls_mode, ir_entity *entity, long offset, bool is_frame_entity",
emit => '. st%FLSM %S2, [%S1%O]',
mode => 'mode_M',
},
......
......@@ -321,40 +321,40 @@ static ir_node *gen_Sub(ir_node *node)
static ir_node *create_ldf(dbg_info *dbgi, ir_node *block, ir_node *ptr,
ir_node *mem, ir_mode *mode, ir_entity *entity,
int entity_sign, long offset, bool is_frame_entity)
long offset, bool is_frame_entity)
{
unsigned bits = get_mode_size_bits(mode);
assert(mode_is_float(mode));
if (bits == 32) {
return new_bd_sparc_Ldf_s(dbgi, block, ptr, mem, mode, entity,
entity_sign, offset, is_frame_entity);
offset, is_frame_entity);
} else if (bits == 64) {
return new_bd_sparc_Ldf_d(dbgi, block, ptr, mem, mode, entity,
entity_sign, offset, is_frame_entity);
offset, is_frame_entity);
} else {
assert(bits == 128);
return new_bd_sparc_Ldf_q(dbgi, block, ptr, mem, mode, entity,
entity_sign, offset, is_frame_entity);
offset, is_frame_entity);
}
}
static ir_node *create_stf(dbg_info *dbgi, ir_node *block, ir_node *ptr,
ir_node *value, ir_node *mem, ir_mode *mode,
ir_entity *entity, int entity_sign, long offset,
ir_entity *entity, long offset,
bool is_frame_entity)
{
unsigned bits = get_mode_size_bits(mode);
assert(mode_is_float(mode));
if (bits == 32) {
return new_bd_sparc_Stf_s(dbgi, block, ptr, value, mem, mode, entity,
entity_sign, offset, is_frame_entity);
offset, is_frame_entity);
} else if (bits == 64) {
return new_bd_sparc_Stf_d(dbgi, block, ptr, value, mem, mode, entity,
entity_sign, offset, is_frame_entity);
offset, is_frame_entity);
} else {
assert(bits == 128);
return new_bd_sparc_Stf_q(dbgi, block, ptr, value, mem, mode, entity,
entity_sign, offset, is_frame_entity);
offset, is_frame_entity);
}
}
......@@ -376,9 +376,9 @@ static ir_node *gen_Load(ir_node *node)
ir_node *new_load = NULL;
if (mode_is_float(mode)) {
new_load = create_ldf(dbgi, block, new_ptr, new_mem, mode, NULL, 0, 0, false);
new_load = create_ldf(dbgi, block, new_ptr, new_mem, mode, NULL, 0, false);
} else {
new_load = new_bd_sparc_Ld(dbgi, block, new_ptr, new_mem, mode, NULL, 0, 0, false);
new_load = new_bd_sparc_Ld(dbgi, block, new_ptr, new_mem, mode, NULL, 0, false);
}
set_irn_pinned(new_load, get_irn_pinned(node));
......@@ -405,9 +405,9 @@ static ir_node *gen_Store(ir_node *node)
ir_node *new_store = NULL;
if (mode_is_float(mode)) {
new_store = create_stf(dbgi, block, new_ptr, new_val, new_mem, mode, NULL, 0, 0, false);
new_store = create_stf(dbgi, block, new_ptr, new_val, new_mem, mode, NULL, 0, false);
} else {
new_store = new_bd_sparc_St(dbgi, block, new_ptr, new_val, new_mem, mode, NULL, 0, 0, false);
new_store = new_bd_sparc_St(dbgi, block, new_ptr, new_val, new_mem, mode, NULL, 0, false);
}
set_irn_pinned(new_store, get_irn_pinned(node));
......@@ -685,7 +685,7 @@ static ir_node *gen_Const(ir_node *node)
ir_node *addr = make_addr(dbgi, entity);
ir_node *mem = new_NoMem();
ir_node *new_op
= create_ldf(dbgi, block, addr, mem, mode, NULL, 0, 0, false);
= create_ldf(dbgi, block, addr, mem, mode, NULL, 0, false);
ir_node *proj = new_Proj(new_op, mode, pn_sparc_Ldf_res);
set_irn_pinned(new_op, op_pin_state_floats);
......@@ -1139,7 +1139,7 @@ static ir_node *bitcast_int_to_float(dbg_info *dbgi, ir_node *block,
ir_node *sp = get_irg_frame(irg);
ir_node *nomem = new_NoMem();
ir_node *st = new_bd_sparc_St(dbgi, block, sp, value0, nomem, mode_gp,
NULL, 0, 0, true);
NULL, 0, true);
ir_mode *mode;
ir_node *ldf;
ir_node *mem;
......@@ -1147,7 +1147,7 @@ static ir_node *bitcast_int_to_float(dbg_info *dbgi, ir_node *block,
if (value1 != NULL) {
ir_node *st1 = new_bd_sparc_St(dbgi, block, sp, value1, nomem, mode_gp,
NULL, 0, 4, true);
NULL, 4, true);
ir_node *in[2] = { st, st1 };
ir_node *sync = new_r_Sync(block, 2, in);
set_irn_pinned(st1, op_pin_state_floats);
......@@ -1158,7 +1158,7 @@ static ir_node *bitcast_int_to_float(dbg_info *dbgi, ir_node *block,
mode = mode_fp;
}
ldf = create_ldf(dbgi, block, sp, mem, mode, NULL, 0, 0, true);
ldf = create_ldf(dbgi, block, sp, mem, mode, NULL, 0, true);
set_irn_pinned(ldf, op_pin_state_floats);
return new_Proj(ldf, mode, pn_sparc_Ldf_res);
......@@ -1172,18 +1172,18 @@ static void bitcast_float_to_int(dbg_info *dbgi, ir_node *block,
ir_node *stack = get_irg_frame(irg);
ir_node *nomem = new_NoMem();
ir_node *stf = create_stf(dbgi, block, stack, node, nomem, float_mode,
NULL, 0, 0, true);
NULL, 0, true);
int bits = get_mode_size_bits(float_mode);
ir_node *ld;
set_irn_pinned(stf, op_pin_state_floats);
ld = new_bd_sparc_Ld(dbgi, block, stack, stf, mode_gp, NULL, 0, 0, true);
ld = new_bd_sparc_Ld(dbgi, block, stack, stf, mode_gp, NULL, 0, true);
set_irn_pinned(ld, op_pin_state_floats);
result[0] = new_Proj(ld, mode_gp, pn_sparc_Ld_res);
if (bits == 64) {
ir_node *ld2 = new_bd_sparc_Ld(dbgi, block, stack, stf, mode_gp,
NULL, 0, 4, true);
NULL, 4, true);
set_irn_pinned(ld, op_pin_state_floats);
result[1] = new_Proj(ld2, mode_gp, pn_sparc_Ld_res);
......@@ -1292,10 +1292,10 @@ static ir_node *gen_Call(ir_node *node)
/* create a parameter frame if necessary */
if (mode_is_float(mode)) {
str = create_stf(dbgi, new_block, incsp, new_value, new_mem,
mode, NULL, 0, param->offset, true);
mode, NULL, param->offset, true);
} else {
str = new_bd_sparc_St(dbgi, new_block, incsp, new_value, new_mem,
mode, NULL, 0, param->offset, true);
mode, NULL, param->offset, true);
}
set_irn_pinned(str, op_pin_state_floats);
sync_ins[sync_arity++] = str;
......@@ -1619,7 +1619,7 @@ static ir_node *gen_Proj_Proj_Start(ir_node *node)
ir_node *mem = be_prolog_get_memory(abihelper);
ir_node *ld = new_bd_sparc_Ld(NULL, new_block, fp, mem,
mode_gp, param->entity,
0, 0, true);
0, true);
value1 = new_Proj(ld, mode_gp, pn_sparc_Ld_res);
}
......@@ -1637,11 +1637,11 @@ static ir_node *gen_Proj_Proj_Start(ir_node *node)
if (mode_is_float(mode)) {
load = create_ldf(NULL, new_block, fp, mem, mode,
param->entity, 0, 0, true);
param->entity, 0, true);
value = new_r_Proj(load, mode_fp, pn_sparc_Ldf_res);
} else {
load = new_bd_sparc_Ld(NULL, new_block, fp, mem, mode,
param->entity, 0, 0, true);
param->entity, 0, true);
value = new_r_Proj(load, mode_gp, pn_sparc_Ld_res);
}
set_irn_pinned(load, op_pin_state_floats);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment