Commit 9f707bb5 authored by Michael Beck's avatar Michael Beck
Browse files

initial support for exception handling

[r14261]
parent 0664f5c4
......@@ -2143,6 +2143,16 @@ void ia32_gen_labels(ir_node *block, void *data) {
}
}
/**
* Emit an exception label if the current instruction can fail.
*/
void ia32_emit_exc_label(ia32_emit_env_t *env, const ir_node *node) {
if (get_ia32_exc_label(node)) {
be_emit_irprintf(env->emit, ".EXL%u\n", 0);
be_emit_write_line(env);
}
}
/**
* Main driver. Emits the code for one routine.
*/
......
......@@ -58,5 +58,6 @@ void ia32_emit_adr(ia32_emit_env_t *env, const ir_node *node);
void ia32_emit_x87_binop(ia32_emit_env_t *env, const ir_node *node);
void ia32_gen_routine(ia32_code_gen_t *cg, ir_graph *irg);
void ia32_emit_exc_label(ia32_emit_env_t *env, const ir_node *node);
#endif /* FIRM_BE_IA32_IA32_EMITTER_H */
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