Commit b599aa34 authored by Michael Beck's avatar Michael Beck
Browse files

emit new block labels

[r15329]
parent 964e7729
......@@ -334,8 +334,13 @@ static ir_node *get_cfop_target_block(const ir_node *irn) {
* Emits a block label for the given block.
*/
static void arm_emit_block_name(be_emit_env_t *emit, const ir_node *block) {
be_emit_cstring(emit, BLOCK_PREFIX);
be_emit_irprintf(emit, "%d", get_irn_node_nr(block));
if (has_Block_label(block)) {
be_emit_string(emit, be_gas_label_prefix());
be_emit_irprintf(emit, "%lu", get_Block_label(block));
} else {
be_emit_cstring(emit, BLOCK_PREFIX);
be_emit_irprintf(emit, "%d", get_irn_node_nr(block));
}
}
/**
......
......@@ -728,8 +728,13 @@ ir_node *get_cfop_target_block(const ir_node *irn) {
static
void ia32_emit_block_name(ia32_emit_env_t *env, const ir_node *block)
{
be_emit_cstring(env, BLOCK_PREFIX);
be_emit_irprintf(env->emit, "%d", get_irn_node_nr(block));
if (has_Block_label(block)) {
be_emit_string(env, be_gas_label_prefix());
be_emit_irprintf(env->emit, "%u", (unsigned)get_Block_label(block));
} else {
be_emit_cstring(env, BLOCK_PREFIX);
be_emit_irprintf(env->emit, "%d", get_irn_node_nr(block));
}
}
/**
......
......@@ -54,6 +54,8 @@
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
#define BLOCK_PREFIX ".L"
#define SNPRINTF_BUF_LEN 128
/**
......@@ -433,7 +435,14 @@ const char* mips_get_block_label(const ir_node* block)
static
void mips_emit_block_label(mips_emit_env_t *env, const ir_node *block)
{
be_emit_irprintf(env->emit, "BLOCK_%d", get_irn_node_nr(block));
if (has_Block_label(block)) {
be_emit_string(env, be_gas_label_prefix());
be_emit_irprintf(env->emit, "%lu", get_Block_label(block));
} else {
be_emit_cstring(env, BLOCK_PREFIX);
be_emit_irprintf(env->emit, "%d", get_irn_node_nr(block));
}
}
static void mips_emit_Jump(mips_emit_env_t *env, const ir_node *node)
......
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