summaryrefslogtreecommitdiffhomepage
path: root/ir/ir
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-03-04 20:39:10 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2019-04-05 20:44:55 +0200
commitde004ab7d7fac88f234627738ec444ad2bf54771 (patch)
tree0c53cd11bdd8d543b63d9ea175d6a7b47b2a35e4 /ir/ir
parent2d1d9840a3fb6aa791ff7c077a5e90d0fa49d02e (diff)
ir: Allow ASM nodes as control flow nodes.
This is done by treating them as fragile.
Diffstat (limited to 'ir/ir')
-rw-r--r--ir/ir/irdumptxt.c8
-rw-r--r--ir/ir/irio.c3
2 files changed, 10 insertions, 1 deletions
diff --git a/ir/ir/irdumptxt.c b/ir/ir/irdumptxt.c
index a38f60e..5261b49 100644
--- a/ir/ir/irdumptxt.c
+++ b/ir/ir/irdumptxt.c
@@ -313,7 +313,13 @@ void dump_irnode_to_file(FILE *const F, const ir_node *const n)
ir_asm_constraint const *const cons = get_ASM_constraints(n);
for (size_t i = 0, n_cons = get_ASM_n_constraints(n); i < n_cons; sep = ",", ++i) {
ir_asm_constraint const *const c = &cons[i];
- fprintf(F, "%s %%%zu: \\\"%s\\\"", sep, i, c->constraint);
+ fprintf(F, "%s %%%zu: ", sep, i);
+ char const *const str = get_id_str(c->constraint);
+ if (str) {
+ fprintf(F, "\\\"%s\\\"", str);
+ } else {
+ fprintf(F, "<label>");
+ }
int const in_pos = c->in_pos;
if (in_pos != -1)
fprintf(F, " [in: %d]", n_ASM_max + 1 + in_pos);
diff --git a/ir/ir/irio.c b/ir/ir/irio.c
index 8402426..df9c5ad 100644
--- a/ir/ir/irio.c
+++ b/ir/ir/irio.c
@@ -834,6 +834,7 @@ static void write_ASM(write_env_t *env, const ir_node *node)
write_list_end(env);
write_pin_state(env, get_irn_pinned(node));
+ write_throws(env, ir_throws_exception(node));
write_pred_refs(env, node, n_ASM_max+1);
}
@@ -1999,6 +2000,8 @@ static ir_node *read_ASM(read_env_t *env)
ir_cons_flags flags = cons_none;
if (!read_pinned(env))
flags |= cons_floats;
+ if (read_throws(env))
+ flags |= cons_throws_exception;
int n_in = read_preds(env);
ir_node **in = (ir_node**)obstack_finish(&env->preds_obst);