Commit 36e68846 authored by Matthias Braun's avatar Matthias Braun
Browse files

be: let begnuas call be_dbg_method_begin/end

parent fc1f5076
......@@ -581,7 +581,6 @@ void amd64_gen_routine(ir_graph *irg)
blk_sched = be_create_block_schedule(irg);
be_dbg_method_begin(entity);
be_gas_emit_function_prolog(entity, 4);
irg_block_walk_graph(irg, amd64_gen_labels, NULL, NULL);
......@@ -601,7 +600,4 @@ void amd64_gen_routine(ir_graph *irg)
}
be_gas_emit_function_epilog(entity);
be_dbg_method_end();
be_emit_char('\n');
be_emit_write_line();
}
......@@ -1020,8 +1020,6 @@ void arm_gen_routine(ir_graph *irg)
arm_register_emitters();
be_dbg_method_begin(entity);
/* create the block schedule */
blk_sched = be_create_block_schedule(irg);
......@@ -1083,7 +1081,6 @@ void arm_gen_routine(ir_graph *irg)
del_set(sym_or_tv);
be_gas_emit_function_epilog(entity);
be_dbg_method_end();
}
void arm_init_emitter(void)
......
......@@ -529,7 +529,11 @@ static void emit_visibility(const ir_entity *entity)
void be_gas_emit_function_prolog(const ir_entity *entity, unsigned po2alignment)
{
be_gas_section_t section = determine_section(NULL, entity);
be_gas_section_t section;
be_dbg_method_begin(entity);
section = determine_section(NULL, entity);
emit_section(section, entity);
/* write the begin line (makes the life easier for scripts parsing the
......@@ -597,6 +601,11 @@ void be_gas_emit_function_epilog(const ir_entity *entity)
be_gas_emit_entity(entity);
be_emit_char('\n');
be_emit_write_line();
be_dbg_method_end();
be_emit_char('\n');
be_emit_write_line();
}
/**
......
......@@ -1886,7 +1886,6 @@ void ia32_gen_routine(ir_graph *irg)
get_unique_label(pic_base_label, sizeof(pic_base_label), "PIC_BASE");
be_dbg_method_begin(entity);
be_gas_emit_function_prolog(entity, ia32_cg_config.function_alignment);
/* we use links to point to target blocks */
......@@ -1909,9 +1908,6 @@ void ia32_gen_routine(ir_graph *irg)
}
be_gas_emit_function_epilog(entity);
be_dbg_method_end();
be_emit_char('\n');
be_emit_write_line();
ir_free_resources(irg, IR_RESOURCE_IRN_LINK);
......@@ -3845,9 +3841,6 @@ void ia32_gen_binary_routine(ir_graph *irg)
}
be_gas_emit_function_epilog(entity);
be_dbg_method_end();
be_emit_char('\n');
be_emit_write_line();
ir_free_resources(irg, IR_RESOURCE_IRN_LINK);
}
......
......@@ -1331,9 +1331,8 @@ static void sparc_emit_block(ir_node *block, ir_node *prev)
*/
static void sparc_emit_func_prolog(ir_graph *irg)
{
ir_entity *ent = get_irg_entity(irg);
be_gas_emit_function_prolog(ent, 4);
be_emit_write_line();
ir_entity *entity = get_irg_entity(irg);
be_gas_emit_function_prolog(entity, 4);
}
/**
......@@ -1341,14 +1340,8 @@ static void sparc_emit_func_prolog(ir_graph *irg)
*/
static void sparc_emit_func_epilog(ir_graph *irg)
{
ir_entity *ent = get_irg_entity(irg);
const char *irg_name = get_entity_ld_name(ent);
be_emit_write_line();
be_emit_irprintf("\t.size %s, .-%s\n", irg_name, irg_name);
be_emit_cstring("# -- End ");
be_emit_string(irg_name);
be_emit_cstring("\n");
be_emit_write_line();
ir_entity *entity = get_irg_entity(irg);
be_gas_emit_function_epilog(entity);
}
static void sparc_gen_labels(ir_node *block, void *env)
......@@ -1365,16 +1358,14 @@ static void sparc_gen_labels(ir_node *block, void *env)
void sparc_emit_routine(ir_graph *irg)
{
ir_entity *entity = get_irg_entity(irg);
ir_node **block_schedule;
size_t i;
size_t n;
ir_node **block_schedule;
size_t i;
size_t n;
heights = heights_new(irg);
/* register all emitter functions */
sparc_register_emitters();
be_dbg_method_begin(entity);
/* create the block schedule. For now, we don't need it earlier. */
block_schedule = be_create_block_schedule(irg);
......
Supports Markdown
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