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
b599aa34
Commit
b599aa34
authored
Jul 25, 2007
by
Michael Beck
Browse files
emit new block labels
[r15329]
parent
964e7729
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/arm/arm_emitter.c
View file @
b599aa34
...
...
@@ -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
));
}
}
/**
...
...
ir/be/ia32/ia32_emitter.c
View file @
b599aa34
...
...
@@ -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
));
}
}
/**
...
...
ir/be/mips/mips_emitter.c
View file @
b599aa34
...
...
@@ -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
)
...
...
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