From: Christoph Mallon Date: Wed, 8 Oct 2008 10:12:44 +0000 (+0000) Subject: Make ia32_assign_exc_label() static and remove redundant test. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=088d2a868cf1e4ed0548659c4cff7d88ff17f5f4;p=libfirm Make ia32_assign_exc_label() static and remove redundant test. [r22601] --- diff --git a/ir/be/ia32/ia32_emitter.c b/ir/be/ia32/ia32_emitter.c index 0c4656ab9..725ef4574 100644 --- a/ir/be/ia32/ia32_emitter.c +++ b/ir/be/ia32/ia32_emitter.c @@ -1923,6 +1923,23 @@ static void ia32_register_emitters(void) typedef void (*emit_func_ptr) (const ir_node *); +/** + * Assign and emit an exception label if the current instruction can fail. + */ +static void ia32_assign_exc_label(ir_node *node) +{ + /* assign a new ID to the instruction */ + set_ia32_exc_label_id(node, ++exc_label_id); + /* print it */ + ia32_emit_exc_label(node); + be_emit_char(':'); + be_emit_pad_comment(); + be_emit_cstring("/* exception to Block "); + ia32_emit_cfop_target(node); + be_emit_cstring(" */\n"); + be_emit_write_line(); +} + /** * Emits code for a node. */ @@ -2149,25 +2166,6 @@ static void ia32_gen_labels(ir_node *block, void *data) } } -/** - * Assign and emit an exception label if the current instruction can fail. - */ -void ia32_assign_exc_label(ir_node *node) -{ - if (get_ia32_exc_label(node)) { - /* assign a new ID to the instruction */ - set_ia32_exc_label_id(node, ++exc_label_id); - /* print it */ - ia32_emit_exc_label(node); - be_emit_char(':'); - be_emit_pad_comment(); - be_emit_cstring("/* exception to Block "); - ia32_emit_cfop_target(node); - be_emit_cstring(" */\n"); - be_emit_write_line(); - } -} - /** * Compare two exception_entries. */ diff --git a/ir/be/ia32/ia32_emitter.h b/ir/be/ia32/ia32_emitter.h index c3ef0df5e..17b7ed7ad 100644 --- a/ir/be/ia32/ia32_emitter.h +++ b/ir/be/ia32/ia32_emitter.h @@ -50,6 +50,5 @@ void ia32_emit_am(const ir_node *node); void ia32_emit_x87_binop(const ir_node *node); void ia32_gen_routine(ia32_code_gen_t *cg, ir_graph *irg); -void ia32_assign_exc_label(ir_node *node); #endif